Update to NeoLegacy Latest
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "UIScene.h"
|
||||
#include "UIControl_Slider.h"
|
||||
#include "UIControl_TexturePackList.h"
|
||||
#include "UIControl_CheckBox.h"
|
||||
#include "UIControl_AchievementsList.h"
|
||||
#include "UIScene_AchievementsMenu.h"
|
||||
#include "../../../Minecraft.World/StringHelpers.h"
|
||||
@@ -615,6 +616,8 @@ void UIController::loadSkins()
|
||||
//used these as skin.swf and skinInGame.swf it breaks some other things
|
||||
m_iggyLibraries[eLibrary_LCDefault] = loadSkin(L"skinLC.swf", L"skinLC.swf");
|
||||
m_iggyLibraries[eLibrary_LCInGame] = loadSkin(L"skinInGameLC.swf", L"skinInGameLC.swf");
|
||||
m_iggyLibraries[eLibrary_LCGraphics] = loadSkin(L"skinGraphicsLC.swf", L"skinGraphicsLC.swf");
|
||||
m_iggyLibraries[eLibrary_LCLabels] = loadSkin(L"skinLabelsLC.swf", L"skinLabelsLC.swf");
|
||||
|
||||
// Some 1080p menu ports (such as LoadCreateJoin) may import DR-specific HD
|
||||
// libraries by distinct names. Load them opportunistically when present so
|
||||
@@ -834,6 +837,7 @@ void UIController::tickInput()
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
m_mouseClickConsumedByScene = false;
|
||||
UIControl* currHitCtrl = NULL;
|
||||
if (!g_KBMInput.IsMouseGrabbed() && g_KBMInput.IsKBMActive())
|
||||
{
|
||||
UIScene *pScene = nullptr;
|
||||
@@ -1008,6 +1012,7 @@ void UIController::tickInput()
|
||||
hitControlId = -1;
|
||||
hitArea = INT_MAX;
|
||||
hitCtrl = NULL;
|
||||
hitCtrl = ctrl;
|
||||
break; // ButtonList takes priority
|
||||
}
|
||||
if (type == UIControl::eAchievementList)
|
||||
@@ -1020,6 +1025,7 @@ void UIController::tickInput()
|
||||
hitControlId = -1;
|
||||
hitArea = INT_MAX;
|
||||
hitCtrl = NULL;
|
||||
hitCtrl = ctrl;
|
||||
break;
|
||||
}
|
||||
if (type == UIControl::eTexturePackList)
|
||||
@@ -1068,6 +1074,8 @@ void UIController::tickInput()
|
||||
}
|
||||
}
|
||||
}
|
||||
currHitCtrl = hitCtrl;
|
||||
UpdateCursorIcon(currHitCtrl);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1194,6 +1202,27 @@ void UIController::tickInput()
|
||||
}
|
||||
}
|
||||
|
||||
void UIController::UpdateCursorIcon(UIControl *hitCtrl)
|
||||
{
|
||||
// from WinUser.h
|
||||
if (hitCtrl && (hitCtrl->getControlType() == UIControl::eButton || hitCtrl->getControlType() == UIControl::eButtonList))
|
||||
g_KBMInput.SetCursorIcon(MAKEINTRESOURCEW(IDC_HAND));
|
||||
else if (hitCtrl && (hitCtrl->getControlType() == UIControl::eSlider || hitCtrl->getControlType() == UIControl::eTexturePackList))
|
||||
g_KBMInput.SetCursorIcon(MAKEINTRESOURCEW(IDC_SIZEWE));
|
||||
else if (hitCtrl && hitCtrl->getControlType() == UIControl::eTextInput)
|
||||
g_KBMInput.SetCursorIcon(MAKEINTRESOURCEW(IDC_IBEAM));
|
||||
else if (hitCtrl && hitCtrl->getControlType() == UIControl::eCheckBox) // Show the cross sign shaped cursor only when the checkbox is disabled/grayed out
|
||||
{
|
||||
UIControl_CheckBox *pCheck = static_cast<UIControl_CheckBox *>(hitCtrl);
|
||||
if (pCheck && !pCheck->IsEnabled())
|
||||
g_KBMInput.SetCursorIcon(MAKEINTRESOURCEW(IDC_NO));
|
||||
else
|
||||
g_KBMInput.SetCursorIcon(MAKEINTRESOURCEW(IDC_HAND));
|
||||
}
|
||||
else
|
||||
g_KBMInput.SetCursorIcon(MAKEINTRESOURCEW(IDC_ARROW));
|
||||
}
|
||||
|
||||
void UIController::handleInput()
|
||||
{
|
||||
// For each user, loop over each key type and send messages based on the state
|
||||
@@ -1487,10 +1516,16 @@ void UIController::handleKeyPress(unsigned int iPad, unsigned int key)
|
||||
// hovering a horizontal list (e.g. TexturePackList), UP/DOWN otherwise.
|
||||
if (pressed && g_KBMInput.IsKBMActive())
|
||||
{
|
||||
if (m_bMouseHoverHorizontalList)
|
||||
key = (key == ACTION_MENU_OTHER_STICK_UP) ? ACTION_MENU_LEFT : ACTION_MENU_RIGHT;
|
||||
else
|
||||
key = (key == ACTION_MENU_OTHER_STICK_UP) ? ACTION_MENU_UP : ACTION_MENU_DOWN;
|
||||
UIScene* pTopScene = GetTopScene(0); // using 0 as default pad for KBM
|
||||
bool isJoinMenu = pTopScene && pTopScene->getSceneType() == eUIScene_JoinMenu;
|
||||
|
||||
if (!isJoinMenu)
|
||||
{
|
||||
if (m_bMouseHoverHorizontalList)
|
||||
key = (key == ACTION_MENU_OTHER_STICK_UP) ? ACTION_MENU_LEFT : ACTION_MENU_RIGHT;
|
||||
else
|
||||
key = (key == ACTION_MENU_OTHER_STICK_UP) ? ACTION_MENU_UP : ACTION_MENU_DOWN;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2070,6 +2105,7 @@ bool UIController::NavigateToScene(int iPad, EUIScene scene, void *initData, EUI
|
||||
SetMenuDisplayed(menuDisplayedPad,true);
|
||||
bool success = m_groups[static_cast<int>(group)]->NavigateToScene(iPad, scene, initData, layer);
|
||||
if(success && group == eUIGroup_Fullscreen) setFullscreenMenuDisplayed(true);
|
||||
UpdateCursorIcon(nullptr);
|
||||
LeaveCriticalSection(&m_navigationLock);
|
||||
|
||||
timer.PrintElapsedTime(L"Navigate to scene");
|
||||
@@ -2109,6 +2145,7 @@ bool UIController::NavigateBack(int iPad, bool forceUsePad, EUIScene eScene, EUI
|
||||
navComplete = m_groups[static_cast<int>(eUIGroup_Fullscreen)]->NavigateBack(iPad, eScene, eLayer);
|
||||
if(!m_groups[static_cast<int>(eUIGroup_Fullscreen)]->GetMenuDisplayed()) SetMenuDisplayed(XUSER_INDEX_ANY,false);
|
||||
}
|
||||
UpdateCursorIcon(nullptr);
|
||||
return navComplete;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user