Add text input on mobile

This commit is contained in:
elasota
2020-11-02 22:06:38 -05:00
parent 2ab1416eef
commit 0d5db76492
7 changed files with 47 additions and 2 deletions

View File

@@ -166,6 +166,7 @@ void GpThreadEvent_Cpp11::Destroy()
}
GpSystemServices_Android::GpSystemServices_Android()
: m_textInputEnabled(false)
{
}
@@ -269,6 +270,16 @@ unsigned int GpSystemServices_Android::GetCPUCount() const
return SDL_GetCPUCount();
}
void GpSystemServices_Android::SetTextInputEnabled(bool isEnabled)
{
m_textInputEnabled = isEnabled;
}
bool GpSystemServices_Android::IsTextInputEnabled() const
{
return m_textInputEnabled;
}
GpSystemServices_Android *GpSystemServices_Android::GetInstance()
{
return &ms_instance;

View File

@@ -20,9 +20,15 @@ public:
bool IsUsingMouseAsTouch() const override;
bool IsTextInputObstructive() const override;
unsigned int GetCPUCount() const override;
void SetTextInputEnabled(bool isEnabled) override;
bool IsTextInputEnabled() const override;
void FlushTextInputEnabled();
static GpSystemServices_Android *GetInstance();
private:
static GpSystemServices_Android ms_instance;
bool m_textInputEnabled;
};