added some kbm stuff

This commit is contained in:
2026-09-13 19:41:44 -07:00
parent 82e802873f
commit 5023e0a8d6
217 changed files with 3744 additions and 235 deletions
+46 -4
View File
@@ -27,6 +27,11 @@ UIScene::UIScene(int iPad, UILayer *parentLayer)
m_bUpdateOpacity = false;
m_backScene = NULL;
#if defined(__PSVITA__) || defined(_WINDOWS64)
m_bTouchBoxRebuildPending = false;
m_touchBoxRebuildUntilMs = 0;
#endif
m_cacheSlotRenders = false;
m_needsCacheRendered = true;
@@ -231,11 +236,15 @@ void UIScene::initialiseMovie()
updateSafeZone();
#if defined(__PSVITA__) || defined(_WINDOWS64)
handleTouchBoxRebuild();
#endif
m_bUpdateOpacity = true;
}
#ifdef __PSVITA__
void UIScene::SetFocusToElement(int iID)
#if defined(__PSVITA__) || defined(_WINDOWS64)
void UIScene::SetFocusToElement(int iID, bool bQuiet)
{
IggyDataValue result;
IggyDataValue value[1];
@@ -245,6 +254,13 @@ void UIScene::SetFocusToElement(int iID)
IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcSetFocus , 1 , value );
if (bQuiet)
{
m_iFocusControl = iID;
m_iFocusChild = 0;
return;
}
// also trigger handle focus change (just in case if anything else in relation needs updating!)
_handleFocusChange(iID, 0);
}
@@ -318,6 +334,15 @@ void UIScene::loadMovie()
moviePath.append(L"720.swf");
m_loadedResolution = eSceneResolution_720;
if(!app.hasArchiveFile(moviePath))
{
#if defined _WINDOWS64
moviePath = getMoviePath();
moviePath.append(L"1080.swf");
m_loadedResolution = eSceneResolution_1080;
#endif
}
if(!app.hasArchiveFile(moviePath))
{
app.DebugPrintf("ERROR: Could not find any iggy movie for %ls!\n", moviePath.c_str());
@@ -437,6 +462,15 @@ void UIScene::tick()
{
if(m_bIsReloading) return;
if(m_hasTickedOnce) m_bCanHandleInput = true;
#if defined(__PSVITA__) || defined(_WINDOWS64)
if (m_bTouchBoxRebuildPending)
{
UpdateSceneControls();
ui.TouchBoxRebuild(this);
if (System::currentTimeMillis() >= m_touchBoxRebuildUntilMs)
m_bTouchBoxRebuildPending = false;
}
#endif
while(IggyPlayerReadyToTick( swf ))
{
tickTimers();
@@ -454,6 +488,14 @@ UIControl* UIScene::GetMainPanel()
return NULL;
}
void UIScene::handleTouchBoxRebuild()
{
#if defined(__PSVITA__) || defined(_WINDOWS64)
m_bTouchBoxRebuildPending = true;
m_touchBoxRebuildUntilMs = System::currentTimeMillis() + 750;
#endif
}
void UIScene::addTimer(int id, int ms)
{
@@ -530,7 +572,7 @@ void UIScene::removeControl( UIControl_Base *control, bool centreScene)
value[1].boolval = centreScene;
IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcRemoveObject , 2 , value );
#ifdef __PSVITA__
#if defined(__PSVITA__) || defined(_WINDOWS64)
// update the button positions since they may have changed
UpdateSceneControls();
@@ -1237,7 +1279,7 @@ UIScene *UIScene::getBackScene()
{
return m_backScene;
}
#ifdef __PSVITA__
#if defined(__PSVITA__) || defined(_WINDOWS64)
void UIScene::UpdateSceneControls()
{
AUTO_VAR(itEnd, GetControls()->end());