This commit is contained in:
GabsPuNs
2026-05-14 21:52:21 -04:00
parent 1b2f5c6fe8
commit f8a2d644f5
291 changed files with 7363 additions and 18368 deletions

View File

@@ -43,7 +43,7 @@ int UIScene_SettingsGraphicsMenu::m_iGraphicsModeTitleSettingA[4]=
int UIScene_SettingsGraphicsMenu::LevelToDistance(int level)
{
static const int table[5] = {2,4,8,16,32};
static const int table[4] = {2,4,8,16};
if(level < 0) level = 0;
if(level > 4) level = 4;
return table[level];
@@ -51,7 +51,7 @@ int UIScene_SettingsGraphicsMenu::LevelToDistance(int level)
int UIScene_SettingsGraphicsMenu::DistanceToLevel(int dist)
{
static const int table[5] = {2,4,8,16,32};
static const int table[4] = {2,4,8,16};
for(int i = 0; i < 5; i++){
if(table[i] == dist)
return i;
@@ -63,26 +63,6 @@ UIScene_SettingsGraphicsMenu::UIScene_SettingsGraphicsMenu(int iPad, void *initD
{
// Setup all the Iggy references we need for this scene
initialiseMovie();
m_labelGeneralOptions.init( L"General" ); //IDS_GENERAL
m_labelQualityOptions.init( L"Quality" ); //IDS_QUALITY
IggyDataValue result;
IggyDataValue value[1];
value[0].type = IGGY_DATATYPE_number;
value[0].number = 0;
IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcSetMenuType , 1 , value );
m_tabIndex = TAB_GENERAL_OPTIONS;
/*
swprintf(TempString, 256, L"%ls: %d", app.GetString( IDS_SLIDER_RENDERDISTANCE ),app.GetGameSettings(m_iPad,eGameSetting_RenderDistance));
m_sliderRenderDistance.init(TempString,eControl_RenderDistance,0,3,DistanceToLevel(app.GetGameSettings(m_iPad,eGameSetting_RenderDistance)));
*/
/*
Minecraft* pMinecraft = Minecraft::GetInstance();
m_bNotInGame=(Minecraft::GetInstance()->level==nullptr);
@@ -111,6 +91,7 @@ UIScene_SettingsGraphicsMenu::UIScene_SettingsGraphicsMenu(int iPad, void *initD
int currentGraphics = app.GetGameSettings(m_iPad, eGameSetting_GraphicsMode);
swprintf(TempString, 256, L"%ls %ls", app.GetString( IDS_GRAPHICS ),app.GetString(m_iGraphicsModeTitleSettingA[app.GetGameSettings(m_iPad,eGameSetting_GraphicsMode)]));
m_sliderGraphicsMode.init(TempString, eControl_GraphicsMode, 0, 3, currentGraphics);
doHorizontalResizeCheck();
@@ -145,23 +126,27 @@ UIScene_SettingsGraphicsMenu::UIScene_SettingsGraphicsMenu(int iPad, void *initD
app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad);
#endif
}
*/
}
UIScene_SettingsGraphicsMenu::~UIScene_SettingsGraphicsMenu()
{
}
wstring UIScene_SettingsGraphicsMenu::getMoviePath()
{
if(app.GetLocalPlayerCount() > 1)
{
return L"SettingsGraphicsMenuSplit";
}
else
{
return L"SettingsGraphicsMenu";
}
}
void UIScene_SettingsGraphicsMenu::updateTooltips()
{
int changeTabTooltip = -1;
// Set tooltip for change tab (only two tabs)
if (m_tabIndex == TAB_QUALITY_OPTIONS)
changeTabTooltip = IDS_GENERAL_OPTIONS;
else
changeTabTooltip = IDS_QUALITY_OPTIONS;
// If there's a change tab tooltip, left bumper symbol should show but not the text (-2)
int lb = changeTabTooltip == -1 ? -1 : -2;
ui.SetTooltips( DEFAULT_XUI_MENU_USER, IDS_TOOLTIPS_SELECT, IDS_TOOLTIPS_BACK, -1, -1, -1, -1, lb, changeTabTooltip);
ui.SetTooltips( m_iPad, IDS_TOOLTIPS_SELECT,IDS_TOOLTIPS_BACK);
}
void UIScene_SettingsGraphicsMenu::updateComponents()
@@ -182,67 +167,40 @@ void UIScene_SettingsGraphicsMenu::updateComponents()
}
}
wstring UIScene_SettingsGraphicsMenu::getMoviePath()
{
return L"SettingsGraphicsMenu";
}
void UIScene_SettingsGraphicsMenu::handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled)
{
if (isDirectEditBlocking()) return;
ui.AnimateKeyPress(iPad, key, repeat, pressed, released);
switch(key)
{
case ACTION_MENU_CANCEL:
if(pressed)
{
/*
// check the checkboxes
app.SetGameSettings(m_iPad,eGameSetting_Clouds,m_checkboxClouds.IsChecked()?1:0);
app.SetGameSettings(m_iPad,eGameSetting_BedrockFog,m_checkboxBedrockFog.IsChecked()?1:0);
app.SetGameSettings(m_iPad,eGameSetting_CustomSkinAnim,m_checkboxCustomSkinAnim.IsChecked()?1:0);
*/
navigateBack();
handled = true;
}
break;
case ACTION_MENU_OK:
#ifdef __ORBIS__
case ACTION_MENU_TOUCHPAD_PRESS:
#endif
sendInputToMovie(key, repeat, pressed, released);
break;
case ACTION_MENU_UP:
case ACTION_MENU_DOWN:
case ACTION_MENU_LEFT:
case ACTION_MENU_RIGHT:
case ACTION_MENU_PAGEUP:
case ACTION_MENU_PAGEDOWN:
case ACTION_MENU_OTHER_STICK_UP:
case ACTION_MENU_OTHER_STICK_DOWN:
sendInputToMovie(key, repeat, pressed, released);
handled = true; //test
break;
case ACTION_MENU_LEFT_SCROLL:
case ACTION_MENU_RIGHT_SCROLL:
if(pressed)
{
// Toggle tab index
m_tabIndex = m_tabIndex == 0 ? 1 : 0;
updateTooltips();
IggyDataValue result;
IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcChangeTab , 0 , nullptr );
}
break;
}
}
UIControl* UIScene_SettingsGraphicsMenu::GetMainPanel()
{
if(m_tabIndex == 0 )
return &m_generalOptions;
else
return &m_qualityOptions;
}
void UIScene_SettingsGraphicsMenu::handleSliderMove(F64 sliderId, F64 currentValue)
{
/*
WCHAR TempString[256];
const int value = static_cast<int>(currentValue);
switch(static_cast<int>(sliderId))
@@ -304,5 +262,4 @@ void UIScene_SettingsGraphicsMenu::handleSliderMove(F64 sliderId, F64 currentVal
}
break;
}
*/
}
}