mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Allow toggling touchscreen mode at runtime (#14075)
Signed-off-by: David Heidelberg <david@ixit.cz> Co-authored-by: Gregor Parzefall <gregor.parzefall@posteo.de>
This commit is contained in:
parent
e3cc26cb7c
commit
34286d77c7
24 changed files with 175 additions and 220 deletions
|
@ -39,10 +39,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "wieldmesh.h"
|
||||
#include "client/renderingengine.h"
|
||||
#include "client/minimap.h"
|
||||
|
||||
#ifdef HAVE_TOUCHSCREENGUI
|
||||
#include "gui/touchscreengui.h"
|
||||
#endif
|
||||
|
||||
#define OBJECT_CROSSHAIR_LINE_SIZE 8
|
||||
#define CROSSHAIR_LINE_SIZE 10
|
||||
|
@ -292,10 +289,8 @@ void Hud::drawItems(v2s32 upperleftpos, v2s32 screen_offset, s32 itemcount,
|
|||
|
||||
drawItem(mainlist->getItem(i), item_rect, (i + 1) == selectitem);
|
||||
|
||||
#ifdef HAVE_TOUCHSCREENGUI
|
||||
if (is_hotbar && g_touchscreengui)
|
||||
g_touchscreengui->registerHotbarRect(i, item_rect);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -749,10 +744,8 @@ void Hud::drawStatbar(v2s32 pos, u16 corner, u16 drawdir,
|
|||
|
||||
void Hud::drawHotbar(u16 playeritem)
|
||||
{
|
||||
#ifdef HAVE_TOUCHSCREENGUI
|
||||
if (g_touchscreengui)
|
||||
g_touchscreengui->resetHotbarRects();
|
||||
#endif
|
||||
|
||||
InventoryList *mainlist = inventory->getList("main");
|
||||
if (mainlist == NULL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue