mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
Made tabs clickable in world settings!
Added mouse click support for tabs "World Options" and "Game Options" in the more settings menu when creating a world.
This commit is contained in:
parent
9a3dfd115f
commit
eab42ba04c
|
|
@ -307,6 +307,9 @@ void UIScene_LaunchMoreOptionsMenu::handleInput(int iPad, int key, bool repeat,
|
||||||
// Toggle tab index
|
// Toggle tab index
|
||||||
m_tabIndex = m_tabIndex == 0 ? 1 : 0;
|
m_tabIndex = m_tabIndex == 0 ? 1 : 0;
|
||||||
updateTooltips();
|
updateTooltips();
|
||||||
|
app.DebugPrintf("WorldOptions: %i , %i\n", m_labelWorldOptions.getXPos(), m_labelWorldOptions.getYPos());
|
||||||
|
app.DebugPrintf("GameOptions: %i , %i\n", m_labelGameOptions.getXPos(), m_labelGameOptions.getYPos());
|
||||||
|
|
||||||
IggyDataValue result;
|
IggyDataValue result;
|
||||||
IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcChangeTab , 0 , nullptr );
|
IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcChangeTab , 0 , nullptr );
|
||||||
}
|
}
|
||||||
|
|
@ -314,6 +317,38 @@ void UIScene_LaunchMoreOptionsMenu::handleInput(int iPad, int key, bool repeat,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef _WINDOWS64
|
||||||
|
bool UIScene_LaunchMoreOptionsMenu::handleMouseClick(F32 x, F32 y){
|
||||||
|
|
||||||
|
F32 tabHeight = (m_labelWorldOptions.getYPos() + 61) - m_labelWorldOptions.getYPos();
|
||||||
|
F32 tabWidth = m_labelGameOptions.getXPos() - m_labelWorldOptions.getXPos();
|
||||||
|
F32 WorldOptionsCenterX = m_labelWorldOptions.getXPos() + (tabWidth / 2);
|
||||||
|
F32 WorldOptionsCenterY = m_labelWorldOptions.getYPos() + (tabHeight / 2);
|
||||||
|
|
||||||
|
if (x >= m_labelWorldOptions.getXPos() && x <= m_labelWorldOptions.getXPos() + tabWidth && y >= m_labelWorldOptions.getYPos() && y <= m_labelWorldOptions.getYPos() + tabHeight && m_tabIndex == 1)
|
||||||
|
{
|
||||||
|
m_tabIndex = 0;
|
||||||
|
updateTooltips();
|
||||||
|
IggyDataValue result;
|
||||||
|
IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcChangeTab , 0 , nullptr );
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if (x >= m_labelGameOptions.getXPos() && x <= m_labelGameOptions.getXPos() + tabWidth && y >= m_labelGameOptions.getYPos() && y <= m_labelGameOptions.getYPos() + tabHeight && m_tabIndex == 0)
|
||||||
|
{
|
||||||
|
m_tabIndex = 1;
|
||||||
|
updateTooltips();
|
||||||
|
IggyDataValue result;
|
||||||
|
IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcChangeTab , 0 , nullptr );
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __PSVITA__
|
#ifdef __PSVITA__
|
||||||
void UIScene_LaunchMoreOptionsMenu::handleTouchInput(unsigned int iPad, S32 x, S32 y, int iId, bool bPressed, bool bRepeat, bool bReleased)
|
void UIScene_LaunchMoreOptionsMenu::handleTouchInput(unsigned int iPad, S32 x, S32 y, int iId, bool bPressed, bool bRepeat, bool bReleased)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ private:
|
||||||
eControl_Count
|
eControl_Count
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef __PSVITA__
|
#ifdef __PSVITA__tab
|
||||||
enum ETouchInput
|
enum ETouchInput
|
||||||
{
|
{
|
||||||
ETouchInput_TabWorld = eControl_Count,
|
ETouchInput_TabWorld = eControl_Count,
|
||||||
|
|
@ -142,6 +142,7 @@ public:
|
||||||
virtual void handleDestroy();
|
virtual void handleDestroy();
|
||||||
#ifdef _WINDOWS64
|
#ifdef _WINDOWS64
|
||||||
virtual void getDirectEditInputs(vector<UIControl_TextInput*> &inputs);
|
virtual void getDirectEditInputs(vector<UIControl_TextInput*> &inputs);
|
||||||
|
virtual bool handleMouseClick(F32 x, F32 y);
|
||||||
virtual void onDirectEditFinished(UIControl_TextInput *input, UIControl_TextInput::EDirectEditResult result);
|
virtual void onDirectEditFinished(UIControl_TextInput *input, UIControl_TextInput::EDirectEditResult result);
|
||||||
#endif
|
#endif
|
||||||
// INPUT
|
// INPUT
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue