Files
MinecraftConsoles/Minecraft.Client/Common/UI/UIScene_DebugOptions.cpp
daoge b3feddfef3 feat: TU19 (Dec 2014) Features & Content (#155)
* try to resolve merge conflict

* feat: TU19 (Dec 2014) Features & Content (#32)

* December 2014 files

* Working release build

* Fix compilation issues

* Add sound to Windows64Media

* Add DLC content and force Tutorial DLC

* Revert "Add DLC content and force Tutorial DLC"

This reverts commit 97a4399472.

* Disable broken light packing

* Disable breakpoint during DLC texture map load

Allows DLC loading but the DLC textures are still broken

* Fix post build not working

* ...

* fix vs2022 build

* fix cmake build

---------

Co-authored-by: Loki <lokirautio@gmail.com>
2026-03-03 03:04:10 +08:00

97 lines
2.6 KiB
C++

#include "stdafx.h"
#include "UI.h"
#include "UIScene_DebugOptions.h"
LPCWSTR UIScene_DebugOptionsMenu::m_DebugCheckboxTextA[eDebugSetting_Max+1]=
{
L"Load Saves From Local Folder Mode",
L"Write Saves To Local Folder Mode",
L"Freeze Players", //L"Not Used",
L"Display Safe Area",
L"Mobs don't attack",
L"Freeze Time",
L"Disable Weather",
L"Craft Anything",
L"Use DPad for debug",
L"Mobs don't tick",
L"Art tools", //L"Instant Mine",
L"Show UI Console",
L"Distributable Save",
L"Debug Leaderboards",
L"Height-Water Maps",
L"Superflat Nether",
//L"Light/Dark background",
L"More lightning when thundering",
L"Biome override",
//L"Go To End",
L"Go To Overworld",
L"Unlock All DLC", //L"Toggle Font",
L"Show Marketing Guide",
};
UIScene_DebugOptionsMenu::UIScene_DebugOptionsMenu(int iPad, void *initData, UILayer *parentLayer) : UIScene(iPad, parentLayer)
{
// Setup all the Iggy references we need for this scene
initialiseMovie();
unsigned int uiDebugBitmask=app.GetGameSettingsDebugMask(iPad);
IggyValuePath *root = IggyPlayerRootPath ( getMovie() );
for(m_iTotalCheckboxElements = 0; m_iTotalCheckboxElements < eDebugSetting_Max && m_iTotalCheckboxElements < 21; ++m_iTotalCheckboxElements)
{
wstring label(m_DebugCheckboxTextA[m_iTotalCheckboxElements]);
m_checkboxes[m_iTotalCheckboxElements].init(label,m_iTotalCheckboxElements,(uiDebugBitmask&(1<<m_iTotalCheckboxElements)) ? true : false);
}
}
wstring UIScene_DebugOptionsMenu::getMoviePath()
{
return L"DebugOptionsMenu";
}
void UIScene_DebugOptionsMenu::handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled)
{
//app.DebugPrintf("UIScene_DebugOptionsMenu handling input for pad %d, key %d, repeat- %s, pressed- %s, released- %s\n", iPad, key, repeat?"TRUE":"FALSE", pressed?"TRUE":"FALSE", released?"TRUE":"FALSE");
switch(key)
{
case ACTION_MENU_CANCEL:
if(pressed)
{
int iCurrentBitmaskIndex=0;
unsigned int uiDebugBitmask=0L;
for(int i=0;i<m_iTotalCheckboxElements;i++)
{
uiDebugBitmask|=m_checkboxes[i].IsChecked()?(1<<iCurrentBitmaskIndex):0;
iCurrentBitmaskIndex++;
}
if(uiDebugBitmask!=app.GetGameSettingsDebugMask(iPad))
{
app.SetGameSettingsDebugMask(iPad,uiDebugBitmask);
if(app.DebugSettingsOn())
{
app.ActionDebugMask(iPad);
}
else
{
// force debug mask off
app.ActionDebugMask(iPad,true);
}
app.CheckGameSettingsChanged(true,iPad);
}
navigateBack();
}
break;
case ACTION_MENU_OK:
case ACTION_MENU_UP:
case ACTION_MENU_DOWN:
case ACTION_MENU_PAGEUP:
case ACTION_MENU_PAGEDOWN:
sendInputToMovie(key, repeat, pressed, released);
break;
}
}