mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-30 19:22:14 +00:00
Auto-toggle TouchControls in-game when receiving touch/mouse input
This commit is contained in:
parent
3c5f05b284
commit
4952f17df4
15 changed files with 152 additions and 89 deletions
|
@ -23,6 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include <vector>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include "client/inputhandler.h"
|
||||
#include "irrlichttypes_extrabloated.h"
|
||||
#include "debug.h"
|
||||
#include "client/shader.h"
|
||||
|
@ -82,7 +83,7 @@ class RenderingEngine
|
|||
public:
|
||||
static const video::SColor MENU_SKY_COLOR;
|
||||
|
||||
RenderingEngine(IEventReceiver *eventReceiver);
|
||||
RenderingEngine(MyEventReceiver *eventReceiver);
|
||||
~RenderingEngine();
|
||||
|
||||
void setResizable(bool resize);
|
||||
|
@ -167,6 +168,12 @@ public:
|
|||
const irr::core::dimension2d<u32> initial_screen_size,
|
||||
const bool initial_window_maximized);
|
||||
|
||||
static PointerType getLastPointerType()
|
||||
{
|
||||
sanity_check(s_singleton && s_singleton->m_receiver);
|
||||
return s_singleton->m_receiver->getLastPointerType();
|
||||
}
|
||||
|
||||
private:
|
||||
static void settingChangedCallback(const std::string &name, void *data);
|
||||
v2u32 _getWindowSize() const;
|
||||
|
@ -174,5 +181,6 @@ private:
|
|||
std::unique_ptr<RenderingCore> core;
|
||||
irr::IrrlichtDevice *m_device = nullptr;
|
||||
irr::video::IVideoDriver *driver;
|
||||
MyEventReceiver *m_receiver = nullptr;
|
||||
static RenderingEngine *s_singleton;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue