]> git.lizzy.rs Git - dragonfireclient.git/commitdiff
Improved Killaura and Chat position
authorElias Fleckenstein <eliasfleckenstein@web.de>
Sun, 26 Jul 2020 13:35:02 +0000 (15:35 +0200)
committerElias Fleckenstein <eliasfleckenstein@web.de>
Sun, 26 Jul 2020 13:35:02 +0000 (15:35 +0200)
src/client/game.cpp
src/client/gameui.cpp
src/gui/CMakeLists.txt
src/gui/guiCheatMenu.cpp [new file with mode: 0644]
src/gui/guiCheatMenu.h [new file with mode: 0644]

index 8bb9d1d81501eceacb6674370c897fee1ac206be..b366ac0a3808cb517927b2af192b3e8d70a202fc 100644 (file)
@@ -2511,7 +2511,6 @@ void Game::handleKillaura(v3f origin, f32 max_d)
                        continue;
                PointedThing pointed(id, v3f(0,0,0), v3s16(0,0,0), 0);
                client->interact(INTERACT_START_DIGGING, pointed);
-               break;
        }
 }
 
index 239e518f77b9c2c3e2acbfe5c214f86fb87a794d..a20c2c40d491cf556f579828b7e756fbfe5e12ca 100644 (file)
@@ -223,7 +223,7 @@ void GameUI::setChatText(const EnrichedString &chat_text, u32 recent_chat_count)
        
        const v2u32 &window_size = RenderingEngine::get_instance()->getWindowSize();
        
-       s32 chat_y = window_size.Y - 100 - m_guitext_chat->getTextHeight();
+       s32 chat_y = window_size.Y - 150 - m_guitext_chat->getTextHeight();
 
        if (m_flags.show_debug)
                chat_y += 2 * g_fontengine->getLineHeight();
index 147f445f4dcbc418216974be6f686d9872a7bd9a..ae54adcffbe9219c6cdca72a47bf3cecdb383138 100644 (file)
@@ -6,6 +6,7 @@ set(gui_SRCS
        ${CMAKE_CURRENT_SOURCE_DIR}/guiButtonImage.cpp
        ${CMAKE_CURRENT_SOURCE_DIR}/guiButtonItemImage.cpp
        ${CMAKE_CURRENT_SOURCE_DIR}/guiChatConsole.cpp
+       ${CMAKE_CURRENT_SOURCE_DIR}/guiCheatMenu.cpp
        ${CMAKE_CURRENT_SOURCE_DIR}/guiConfirmRegistration.cpp
        ${CMAKE_CURRENT_SOURCE_DIR}/guiEditBoxWithScrollbar.cpp
        ${CMAKE_CURRENT_SOURCE_DIR}/guiEngine.cpp
diff --git a/src/gui/guiCheatMenu.cpp b/src/gui/guiCheatMenu.cpp
new file mode 100644 (file)
index 0000000..41c9fb8
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+Dragonfire
+Copyright (C) 2020 Elias Fleckenstein <eliasfleckenstein@web.de>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 2.1 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License along
+with this program; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/ 
diff --git a/src/gui/guiCheatMenu.h b/src/gui/guiCheatMenu.h
new file mode 100644 (file)
index 0000000..99f9b0e
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+Dragonfire
+Copyright (C) 2020 Elias Fleckenstein <eliasfleckenstein@web.de>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 2.1 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License along
+with this program; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/ 
+
+#pragma once
+
+#include "irrlichttypes_extrabloated.h"
+#include "modalMenu.h"
+#include "config.h"
+
+class GUICheatMenuEntry : public gui::IGUIElement
+{
+       GUICheatMenu(gui::IGUIEnvironment* env,
+                       gui::IGUIElement* parent,
+                       s32 id,
+                       Client* client,
+                       IMenuManager* menumgr);
+       
+};