mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
Remove some logic that didn't work
This commit is contained in:
parent
158881800c
commit
f4d0693714
|
|
@ -1219,16 +1219,16 @@ void UIController::getRenderDimensions(C4JRender::eViewportType viewport, S32 &w
|
|||
float targetAspect = 16.0f / 9.0f;
|
||||
float currentAspect = aar_Width / aar_Height;
|
||||
|
||||
// Screen is Ultrawide (Wider than 16:9):
|
||||
if (currentAspect > targetAspect)
|
||||
{
|
||||
// Screen is Ultrawide (Wider than 16:9):
|
||||
// Lock height to screen, calculate width based on 16:9 ratio
|
||||
width = (S32)(aar_Height * targetAspect);
|
||||
height = (S32)aar_Height;
|
||||
}
|
||||
// Screen is Tall (Taller than 16:9, e.g. 4:3, 16:10, Steam Deck):
|
||||
else if (currentAspect < targetAspect)
|
||||
{
|
||||
// Screen is Tall (Taller than 16:9, e.g. 4:3, 16:10, Steam Deck):
|
||||
// Lock width to screen, calculate height based on 16:9 ratio
|
||||
width = (S32)aar_Width;
|
||||
// Height = Width / 1.777
|
||||
|
|
@ -1262,31 +1262,11 @@ void UIController::getRenderDimensions(C4JRender::eViewportType viewport, S32 &w
|
|||
}
|
||||
}
|
||||
|
||||
// AAR - Handle window resizing by updating the width and height variables
|
||||
// AAR - Handle window resizing by updating the width and height variables
|
||||
// AAR - Handle window resizing by updating the width and height variables
|
||||
void UIController::resize(S32 width, S32 height)
|
||||
{
|
||||
// Store the new dimensions
|
||||
aar_Width = (float)width;
|
||||
aar_Height = (float)height;
|
||||
m_fScreenWidth = (float)width;
|
||||
m_fScreenHeight = (float)height;
|
||||
|
||||
// Notify all UIGroups about the resize
|
||||
for (unsigned int i = 0; i < eUIGroup_COUNT; ++i)
|
||||
{
|
||||
if (m_groups[i])
|
||||
{
|
||||
m_groups[i]->OnResize(width, height);
|
||||
}
|
||||
}
|
||||
|
||||
// Force a render position update on next render
|
||||
m_currentRenderViewport = (C4JRender::eViewportType)-1; // Force recalculation
|
||||
|
||||
// Update the Iggy global display if needed
|
||||
// (Some Iggy versions need global display size updates)
|
||||
}
|
||||
|
||||
void UIController::setupRenderPosition(C4JRender::eViewportType viewport)
|
||||
|
|
@ -1301,9 +1281,9 @@ void UIController::setupRenderPosition(C4JRender::eViewportType viewport)
|
|||
|
||||
switch( viewport )
|
||||
{
|
||||
// AnyAspectRatio support by Fayaz (related code has AAR prefix)
|
||||
case C4JRender::VIEWPORT_TYPE_FULLSCREEN:
|
||||
{
|
||||
// AnyAspectRatio support by Fayaz (related code has AAR prefix)
|
||||
// Calculate target 16:9 width based on current height
|
||||
float targetAspect = 16.0f / 9.0f;
|
||||
float currentAspect = aar_Width / aar_Height;
|
||||
|
|
|
|||
|
|
@ -333,42 +333,6 @@ bool UIGroup::IsFullscreenGroup()
|
|||
return m_group == eUIGroup_Fullscreen;
|
||||
}
|
||||
|
||||
void UIGroup::OnResize(S32 width, S32 height)
|
||||
{
|
||||
// Update all layers in this group
|
||||
for (int layer = 0; layer < LAYER_COUNT; ++layer)
|
||||
{
|
||||
if (m_layers[layer])
|
||||
{
|
||||
m_layers[layer]->OnResize();
|
||||
}
|
||||
}
|
||||
|
||||
//// Update HUD if it exists
|
||||
//if (m_hud)
|
||||
//{
|
||||
// m_hud->OnResize();
|
||||
//}
|
||||
|
||||
//// Update tooltips if they exist
|
||||
//if (m_tooltips)
|
||||
//{
|
||||
// m_tooltips->OnResize();
|
||||
//}
|
||||
|
||||
//// Update tutorial popup if it exists
|
||||
//if (m_tutorialPopup)
|
||||
//{
|
||||
// m_tutorialPopup->OnResize();
|
||||
//}
|
||||
|
||||
//// Update press start to play if it exists
|
||||
//if (m_pressStartToPlay)
|
||||
//{
|
||||
// m_pressStartToPlay->OnResize();
|
||||
//}
|
||||
}
|
||||
|
||||
void UIGroup::handleUnlockFullVersion()
|
||||
{
|
||||
for(unsigned int i = 0; i < eUILayer_COUNT; ++i)
|
||||
|
|
|
|||
|
|
@ -102,8 +102,6 @@ public:
|
|||
|
||||
void handleUnlockFullVersion();
|
||||
|
||||
void OnResize(S32 width, S32 height);
|
||||
|
||||
static const int LAYER_COUNT = eUILayer_COUNT;
|
||||
|
||||
void PrintTotalMemoryUsage(__int64 &totalStatic, __int64 &totalDynamic);
|
||||
|
|
|
|||
|
|
@ -872,36 +872,6 @@ C4JRender::eViewportType UILayer::getViewport()
|
|||
return m_parentGroup->GetViewportType();
|
||||
}
|
||||
|
||||
void UILayer::OnResize()
|
||||
{
|
||||
// Update all components
|
||||
for (auto component : m_components)
|
||||
{
|
||||
if (component)
|
||||
{
|
||||
component->OnResize();
|
||||
}
|
||||
}
|
||||
|
||||
// Update all scenes in the stack
|
||||
for (auto scene : m_sceneStack)
|
||||
{
|
||||
if (scene)
|
||||
{
|
||||
scene->OnResize();
|
||||
}
|
||||
}
|
||||
|
||||
// Update any scenes pending deletion
|
||||
for (auto scene : m_scenesToDelete)
|
||||
{
|
||||
if (scene)
|
||||
{
|
||||
scene->OnResize();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UILayer::handleUnlockFullVersion()
|
||||
{
|
||||
for(AUTO_VAR(it, m_sceneStack.begin()); it != m_sceneStack.end(); ++it)
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ public:
|
|||
UIGroup *m_parentGroup;
|
||||
public:
|
||||
UILayer(UIGroup *parent);
|
||||
void UILayer::OnResize();
|
||||
void tick();
|
||||
void render(S32 width, S32 height, C4JRender::eViewportType viewport);
|
||||
void getRenderDimensions(S32 &width, S32 &height);
|
||||
|
|
|
|||
|
|
@ -1199,33 +1199,6 @@ void UIScene::_handleFocusChange(F64 controlId, F64 childId)
|
|||
ui.PlayUISFX(eSFX_Focus);
|
||||
}
|
||||
|
||||
void UIScene::OnResize()
|
||||
{
|
||||
if (!swf)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Update the Iggy player with new display size
|
||||
S32 width, height;
|
||||
m_parentLayer->getRenderDimensions(width, height);
|
||||
IggyPlayerSetDisplaySize(swf, width, height);
|
||||
|
||||
// Update safe zone
|
||||
updateSafeZone();
|
||||
|
||||
// Notify the Flash movie about resize (if it has a resize handler)
|
||||
IggyDataValue result;
|
||||
IggyResult out = IggyPlayerCallMethodRS(getMovie(), &result,
|
||||
IggyPlayerRootPath(getMovie()),
|
||||
registerFastName(L"OnResize"),
|
||||
0, NULL);
|
||||
|
||||
|
||||
// Force a redraw of cached content
|
||||
m_needsCacheRendered = true;
|
||||
}
|
||||
|
||||
void UIScene::UpdateDisplaySize()
|
||||
{
|
||||
if (!swf)
|
||||
|
|
|
|||
|
|
@ -122,7 +122,6 @@ protected:
|
|||
virtual bool mapElementsAndNames();
|
||||
void initialiseMovie();
|
||||
void loadMovie();
|
||||
virtual void OnResize();
|
||||
virtual void UpdateDisplaySize();
|
||||
|
||||
private:
|
||||
|
|
|
|||
Loading…
Reference in a new issue