mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-07-17 17:38:09 +00:00
restructure codebase according to vcproj filters
This commit is contained in:
@@ -0,0 +1,213 @@
|
||||
#include "../../../../../../Minecraft.World/Header Files/stdafx.h"
|
||||
|
||||
#ifdef _DEBUG_MENUS_ENABLED
|
||||
#include "../../UI.h"
|
||||
#include "UIScene_DebugCreateSchematic.h"
|
||||
#include "../../../../../net/minecraft/client/Minecraft.h"
|
||||
#include "../../../../../../Minecraft.World/ConsoleHelpers/StringHelpers.h"
|
||||
#include "../../../../../../Minecraft.World/net/minecraft/world/level/net.minecraft.world.level.h"
|
||||
|
||||
UIScene_DebugCreateSchematic::UIScene_DebugCreateSchematic(int iPad,
|
||||
void* initData,
|
||||
UILayer* parentLayer)
|
||||
: UIScene(iPad, parentLayer) {
|
||||
// Setup all the Iggy references we need for this scene
|
||||
initialiseMovie();
|
||||
|
||||
m_labelTitle.init(L"Name");
|
||||
m_labelStartX.init(L"StartX");
|
||||
m_labelStartY.init(L"StartY");
|
||||
m_labelStartZ.init(L"StartZ");
|
||||
m_labelEndX.init(L"EndX");
|
||||
m_labelEndY.init(L"EndY");
|
||||
m_labelEndZ.init(L"EndZ");
|
||||
|
||||
m_textInputStartX.init(L"", eControl_StartX);
|
||||
m_textInputStartY.init(L"", eControl_StartY);
|
||||
m_textInputStartZ.init(L"", eControl_StartZ);
|
||||
m_textInputEndX.init(L"", eControl_EndX);
|
||||
m_textInputEndY.init(L"", eControl_EndY);
|
||||
m_textInputEndZ.init(L"", eControl_EndZ);
|
||||
m_textInputName.init(L"", eControl_Name);
|
||||
|
||||
m_checkboxSaveMobs.init(L"Save Mobs", eControl_SaveMobs, false);
|
||||
m_checkboxUseCompression.init(L"Use Compression", eControl_UseCompression,
|
||||
false);
|
||||
|
||||
m_buttonCreate.init(L"Create", eControl_Create);
|
||||
|
||||
m_data = new ConsoleSchematicFile::XboxSchematicInitParam();
|
||||
}
|
||||
|
||||
std::wstring UIScene_DebugCreateSchematic::getMoviePath() {
|
||||
return L"DebugCreateSchematic";
|
||||
}
|
||||
|
||||
void UIScene_DebugCreateSchematic::handleInput(int iPad, int key, bool repeat,
|
||||
bool pressed, bool released,
|
||||
bool& handled) {
|
||||
ui.AnimateKeyPress(iPad, key, repeat, pressed, released);
|
||||
|
||||
switch (key) {
|
||||
case ACTION_MENU_CANCEL:
|
||||
if (pressed) {
|
||||
navigateBack();
|
||||
}
|
||||
break;
|
||||
case ACTION_MENU_OK:
|
||||
case ACTION_MENU_UP:
|
||||
case ACTION_MENU_DOWN:
|
||||
case ACTION_MENU_PAGEUP:
|
||||
case ACTION_MENU_PAGEDOWN:
|
||||
case ACTION_MENU_LEFT:
|
||||
case ACTION_MENU_RIGHT:
|
||||
sendInputToMovie(key, repeat, pressed, released);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void UIScene_DebugCreateSchematic::handlePress(F64 controlId, F64 childId) {
|
||||
switch ((int)controlId) {
|
||||
case eControl_Create: {
|
||||
// We want the start to be even
|
||||
if (m_data->startX > 0 && m_data->startX % 2 != 0)
|
||||
m_data->startX -= 1;
|
||||
else if (m_data->startX < 0 && m_data->startX % 2 != 0)
|
||||
m_data->startX -= 1;
|
||||
if (m_data->startY < 0)
|
||||
m_data->startY = 0;
|
||||
else if (m_data->startY > 0 && m_data->startY % 2 != 0)
|
||||
m_data->startY -= 1;
|
||||
if (m_data->startZ > 0 && m_data->startZ % 2 != 0)
|
||||
m_data->startZ -= 1;
|
||||
else if (m_data->startZ < 0 && m_data->startZ % 2 != 0)
|
||||
m_data->startZ -= 1;
|
||||
|
||||
// We want the end to be odd to have a total size that is even
|
||||
if (m_data->endX > 0 && m_data->endX % 2 == 0)
|
||||
m_data->endX += 1;
|
||||
else if (m_data->endX < 0 && m_data->endX % 2 == 0)
|
||||
m_data->endX += 1;
|
||||
if (m_data->endY > Level::maxBuildHeight)
|
||||
m_data->endY = Level::maxBuildHeight;
|
||||
else if (m_data->endY > 0 && m_data->endY % 2 == 0)
|
||||
m_data->endY += 1;
|
||||
else if (m_data->endY < 0 && m_data->endY % 2 == 0)
|
||||
m_data->endY += 1;
|
||||
if (m_data->endZ > 0 && m_data->endZ % 2 == 0)
|
||||
m_data->endZ += 1;
|
||||
else if (m_data->endZ < 0 && m_data->endZ % 2 == 0)
|
||||
m_data->endZ += 1;
|
||||
|
||||
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),
|
||||
eXuiServerAction_ExportSchematic,
|
||||
(void*)m_data);
|
||||
|
||||
navigateBack();
|
||||
} break;
|
||||
case eControl_Name:
|
||||
case eControl_StartX:
|
||||
case eControl_StartY:
|
||||
case eControl_StartZ:
|
||||
case eControl_EndX:
|
||||
case eControl_EndY:
|
||||
case eControl_EndZ:
|
||||
m_keyboardCallbackControl = (eControls)((int)controlId);
|
||||
InputManager.RequestKeyboard(
|
||||
L"Enter something", L"", 0, 25,
|
||||
&UIScene_DebugCreateSchematic::KeyboardCompleteCallback, this,
|
||||
C_4JInput::EKeyboardMode_Default);
|
||||
break;
|
||||
};
|
||||
}
|
||||
|
||||
void UIScene_DebugCreateSchematic::handleCheckboxToggled(F64 controlId,
|
||||
bool selected) {
|
||||
switch ((int)controlId) {
|
||||
case eControl_SaveMobs:
|
||||
m_data->bSaveMobs = selected;
|
||||
break;
|
||||
case eControl_UseCompression:
|
||||
if (selected)
|
||||
m_data->compressionType = APPROPRIATE_COMPRESSION_TYPE;
|
||||
else
|
||||
m_data->compressionType = Compression::eCompressionType_RLE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int UIScene_DebugCreateSchematic::KeyboardCompleteCallback(void* lpParam,
|
||||
bool bRes) {
|
||||
UIScene_DebugCreateSchematic* pClass =
|
||||
(UIScene_DebugCreateSchematic*)lpParam;
|
||||
|
||||
const char* text = InputManager.GetText();
|
||||
if (text[0] != '\0') {
|
||||
std::wstring value = convStringToWstring(text);
|
||||
int iVal = 0;
|
||||
if (!value.empty()) iVal = _fromString<int>(value);
|
||||
switch (pClass->m_keyboardCallbackControl) {
|
||||
case eControl_Name:
|
||||
pClass->m_textInputName.setLabel(value);
|
||||
if (!value.empty()) {
|
||||
swprintf(pClass->m_data->name, 64, L"%ls", value.c_str());
|
||||
} else {
|
||||
swprintf(pClass->m_data->name, 64, L"schematic");
|
||||
}
|
||||
break;
|
||||
case eControl_StartX:
|
||||
pClass->m_textInputStartX.setLabel(value);
|
||||
|
||||
if (iVal >= (LEVEL_MAX_WIDTH * -16) ||
|
||||
iVal < (LEVEL_MAX_WIDTH * 16)) {
|
||||
pClass->m_data->startX = iVal;
|
||||
}
|
||||
break;
|
||||
case eControl_StartY:
|
||||
pClass->m_textInputStartY.setLabel(value);
|
||||
|
||||
if (iVal >= (LEVEL_MAX_WIDTH * -16) ||
|
||||
iVal < (LEVEL_MAX_WIDTH * 16)) {
|
||||
pClass->m_data->startY = iVal;
|
||||
}
|
||||
break;
|
||||
case eControl_StartZ:
|
||||
pClass->m_textInputStartZ.setLabel(value);
|
||||
|
||||
if (iVal >= (LEVEL_MAX_WIDTH * -16) ||
|
||||
iVal < (LEVEL_MAX_WIDTH * 16)) {
|
||||
pClass->m_data->startZ = iVal;
|
||||
}
|
||||
break;
|
||||
case eControl_EndX:
|
||||
pClass->m_textInputEndX.setLabel(value);
|
||||
|
||||
if (iVal >= (LEVEL_MAX_WIDTH * -16) ||
|
||||
iVal < (LEVEL_MAX_WIDTH * 16)) {
|
||||
pClass->m_data->endX = iVal;
|
||||
}
|
||||
break;
|
||||
case eControl_EndY:
|
||||
pClass->m_textInputEndY.setLabel(value);
|
||||
|
||||
if (iVal >= (LEVEL_MAX_WIDTH * -16) ||
|
||||
iVal < (LEVEL_MAX_WIDTH * 16)) {
|
||||
pClass->m_data->endY = iVal;
|
||||
}
|
||||
break;
|
||||
case eControl_EndZ:
|
||||
pClass->m_textInputEndZ.setLabel(value);
|
||||
|
||||
if (iVal >= (LEVEL_MAX_WIDTH * -16) ||
|
||||
iVal < (LEVEL_MAX_WIDTH * 16)) {
|
||||
pClass->m_data->endZ = iVal;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,75 @@
|
||||
#pragma once
|
||||
#ifdef _DEBUG_MENUS_ENABLED
|
||||
#include "../../UIScene.h"
|
||||
#include "../../../GameRules/LevelGeneration/ConsoleSchematicFile.h"
|
||||
|
||||
class UIScene_DebugCreateSchematic : public UIScene {
|
||||
private:
|
||||
enum eControls {
|
||||
eControl_Name,
|
||||
eControl_StartX,
|
||||
eControl_StartY,
|
||||
eControl_StartZ,
|
||||
eControl_EndX,
|
||||
eControl_EndY,
|
||||
eControl_EndZ,
|
||||
eControl_SaveMobs,
|
||||
eControl_UseCompression,
|
||||
eControl_Create,
|
||||
};
|
||||
|
||||
eControls m_keyboardCallbackControl;
|
||||
|
||||
ConsoleSchematicFile::XboxSchematicInitParam* m_data;
|
||||
|
||||
public:
|
||||
UIScene_DebugCreateSchematic(int iPad, void* initData,
|
||||
UILayer* parentLayer);
|
||||
|
||||
virtual EUIScene getSceneType() { return eUIScene_DebugCreateSchematic; }
|
||||
|
||||
protected:
|
||||
UIControl_TextInput m_textInputStartX, m_textInputStartY, m_textInputStartZ,
|
||||
m_textInputEndX, m_textInputEndY, m_textInputEndZ, m_textInputName;
|
||||
UIControl_CheckBox m_checkboxSaveMobs, m_checkboxUseCompression;
|
||||
UIControl_Button m_buttonCreate;
|
||||
UIControl_Label m_labelStartX, m_labelStartY, m_labelStartZ, m_labelEndX,
|
||||
m_labelEndY, m_labelEndZ, m_labelTitle;
|
||||
UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene)
|
||||
UI_MAP_ELEMENT(m_textInputStartX, "StartX")
|
||||
UI_MAP_ELEMENT(m_textInputStartY, "StartY")
|
||||
UI_MAP_ELEMENT(m_textInputStartZ, "StartZ")
|
||||
UI_MAP_ELEMENT(m_textInputEndX, "EndX")
|
||||
UI_MAP_ELEMENT(m_textInputEndY, "EndY")
|
||||
UI_MAP_ELEMENT(m_textInputEndZ, "EndZ")
|
||||
UI_MAP_ELEMENT(m_textInputName, "Name")
|
||||
|
||||
UI_MAP_ELEMENT(m_checkboxSaveMobs, "SaveMobs")
|
||||
UI_MAP_ELEMENT(m_checkboxUseCompression, "UseCompression")
|
||||
|
||||
UI_MAP_ELEMENT(m_buttonCreate, "Create")
|
||||
|
||||
UI_MAP_ELEMENT(m_labelStartX, "LabelStartX")
|
||||
UI_MAP_ELEMENT(m_labelStartY, "LabelStartY")
|
||||
UI_MAP_ELEMENT(m_labelStartZ, "LabelStartZ")
|
||||
UI_MAP_ELEMENT(m_labelEndX, "LabelEndX")
|
||||
UI_MAP_ELEMENT(m_labelEndY, "LabelEndY")
|
||||
UI_MAP_ELEMENT(m_labelEndZ, "LabelEndZ")
|
||||
UI_MAP_ELEMENT(m_labelTitle, "LabelTitle")
|
||||
UI_END_MAP_ELEMENTS_AND_NAMES()
|
||||
|
||||
virtual std::wstring getMoviePath();
|
||||
|
||||
public:
|
||||
// INPUT
|
||||
virtual void handleInput(int iPad, int key, bool repeat, bool pressed,
|
||||
bool released, bool& handled);
|
||||
|
||||
protected:
|
||||
void handlePress(F64 controlId, F64 childId);
|
||||
virtual void handleCheckboxToggled(F64 controlId, bool selected);
|
||||
|
||||
private:
|
||||
static int KeyboardCompleteCallback(void* lpParam, const bool bRes);
|
||||
};
|
||||
#endif
|
||||
@@ -0,0 +1,98 @@
|
||||
#include "../../../../../../Minecraft.World/Header Files/stdafx.h"
|
||||
#include "../../UI.h"
|
||||
#include "UIScene_DebugOptions.h"
|
||||
|
||||
const wchar_t*
|
||||
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) {
|
||||
std::wstring label(m_DebugCheckboxTextA[m_iTotalCheckboxElements]);
|
||||
m_checkboxes[m_iTotalCheckboxElements].init(
|
||||
label, m_iTotalCheckboxElements,
|
||||
(uiDebugBitmask & (1 << m_iTotalCheckboxElements)) ? true : false);
|
||||
}
|
||||
}
|
||||
|
||||
std::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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
#pragma once
|
||||
|
||||
#include "../../UIScene.h"
|
||||
#include "../../Controls/UIControl_CheckBox.h"
|
||||
|
||||
class UIScene_DebugOptionsMenu : public UIScene {
|
||||
private:
|
||||
static const wchar_t* m_DebugCheckboxTextA[eDebugSetting_Max + 1];
|
||||
|
||||
int m_iTotalCheckboxElements;
|
||||
|
||||
public:
|
||||
UIScene_DebugOptionsMenu(int iPad, void* initData, UILayer* parentLayer);
|
||||
|
||||
virtual EUIScene getSceneType() { return eUIScene_DebugOptions; }
|
||||
|
||||
protected:
|
||||
UIControl_CheckBox m_checkboxes[21];
|
||||
UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene)
|
||||
UI_MAP_ELEMENT(m_checkboxes[0], "checkbox1")
|
||||
UI_MAP_ELEMENT(m_checkboxes[1], "checkbox2")
|
||||
UI_MAP_ELEMENT(m_checkboxes[2], "checkbox3")
|
||||
UI_MAP_ELEMENT(m_checkboxes[3], "checkbox4")
|
||||
UI_MAP_ELEMENT(m_checkboxes[4], "checkbox5")
|
||||
UI_MAP_ELEMENT(m_checkboxes[5], "checkbox6")
|
||||
UI_MAP_ELEMENT(m_checkboxes[6], "checkbox7")
|
||||
UI_MAP_ELEMENT(m_checkboxes[7], "checkbox8")
|
||||
UI_MAP_ELEMENT(m_checkboxes[8], "checkbox9")
|
||||
UI_MAP_ELEMENT(m_checkboxes[9], "checkbox10")
|
||||
UI_MAP_ELEMENT(m_checkboxes[10], "checkbox11")
|
||||
UI_MAP_ELEMENT(m_checkboxes[11], "checkbox12")
|
||||
UI_MAP_ELEMENT(m_checkboxes[12], "checkbox13")
|
||||
UI_MAP_ELEMENT(m_checkboxes[13], "checkbox14")
|
||||
UI_MAP_ELEMENT(m_checkboxes[14], "checkbox15")
|
||||
UI_MAP_ELEMENT(m_checkboxes[15], "checkbox16")
|
||||
UI_MAP_ELEMENT(m_checkboxes[16], "checkbox17")
|
||||
UI_MAP_ELEMENT(m_checkboxes[17], "checkbox18")
|
||||
UI_MAP_ELEMENT(m_checkboxes[18], "checkbox19")
|
||||
UI_MAP_ELEMENT(m_checkboxes[19], "checkbox20")
|
||||
UI_MAP_ELEMENT(m_checkboxes[20], "checkbox21")
|
||||
UI_END_MAP_ELEMENTS_AND_NAMES()
|
||||
|
||||
virtual std::wstring getMoviePath();
|
||||
|
||||
public:
|
||||
// INPUT
|
||||
virtual void handleInput(int iPad, int key, bool repeat, bool pressed,
|
||||
bool released, bool& handled);
|
||||
};
|
||||
@@ -0,0 +1,270 @@
|
||||
#include "../../../../../../Minecraft.World/Header Files/stdafx.h"
|
||||
|
||||
#ifdef _DEBUG_MENUS_ENABLED
|
||||
#include "../../UI.h"
|
||||
#include "UIScene_DebugOverlay.h"
|
||||
#include "../../../../../net/minecraft/client/Minecraft.h"
|
||||
#include "../../../../../net/minecraft/server/MinecraftServer.h"
|
||||
#include "../../../../../net/minecraft/client/renderer/GameRenderer.h"
|
||||
#include "../../../../../net/minecraft/client/multiplayer/MultiPlayerLevel.h"
|
||||
#include "../../../../../net/minecraft/client/multiplayer/ClientConnection.h"
|
||||
#include "../../../../../net/minecraft/client/multiplayer/MultiPlayerLocalPlayer.h"
|
||||
#include "../../../../../../Minecraft.World/ConsoleHelpers/StringHelpers.h"
|
||||
#include "../../../../../../Minecraft.World/net/minecraft/world/item/net.minecraft.world.item.h"
|
||||
#include "../../../../../../Minecraft.World/net/minecraft/world/level/net.minecraft.world.level.h"
|
||||
#include "../../../../../../Minecraft.World/net/minecraft/world/level/storage/net.minecraft.world.level.storage.h"
|
||||
#include "../../../../../../Minecraft.World/net/minecraft/commands/common/net.minecraft.commands.common.h"
|
||||
#include "../../../../../../Minecraft.World/net/minecraft/world/item/enchantment/net.minecraft.world.item.enchantment.h"
|
||||
|
||||
UIScene_DebugOverlay::UIScene_DebugOverlay(int iPad, void* initData,
|
||||
UILayer* parentLayer)
|
||||
: UIScene(iPad, parentLayer) {
|
||||
// Setup all the Iggy references we need for this scene
|
||||
initialiseMovie();
|
||||
|
||||
Minecraft* pMinecraft = Minecraft::GetInstance();
|
||||
wchar_t TempString[256];
|
||||
swprintf(TempString, 256, L"Set fov (%d)",
|
||||
(int)pMinecraft->gameRenderer->GetFovVal());
|
||||
m_sliderFov.init(TempString, eControl_FOV, 0, 100,
|
||||
(int)pMinecraft->gameRenderer->GetFovVal());
|
||||
|
||||
float currentTime =
|
||||
pMinecraft->level->getLevelData()->getGameTime() % 24000;
|
||||
swprintf((wchar_t*)TempString, 256, L"Set time (unsafe) (%d)",
|
||||
(int)currentTime);
|
||||
m_sliderTime.init(TempString, eControl_Time, 0, 240, currentTime / 100);
|
||||
|
||||
m_buttonRain.init(L"Toggle Rain", eControl_Rain);
|
||||
m_buttonThunder.init(L"Toggle Thunder", eControl_Thunder);
|
||||
m_buttonSchematic.init(L"Create Schematic", eControl_Schematic);
|
||||
m_buttonResetTutorial.init(L"Reset profile tutorial progress",
|
||||
eControl_ResetTutorial);
|
||||
m_buttonSetCamera.init(L"Set camera", eControl_SetCamera);
|
||||
m_buttonSetDay.init(L"Set Day", eControl_SetDay);
|
||||
m_buttonSetNight.init(L"Set Night", eControl_SetNight);
|
||||
|
||||
m_buttonListItems.init(eControl_Items);
|
||||
|
||||
int listId = 0;
|
||||
for (unsigned int i = 0; i < Item::items.length; ++i) {
|
||||
if (Item::items[i] != nullptr) {
|
||||
m_itemIds.push_back(i);
|
||||
m_buttonListItems.addItem(
|
||||
app.GetString(Item::items[i]->getDescriptionId()), listId);
|
||||
++listId;
|
||||
}
|
||||
}
|
||||
|
||||
m_buttonListEnchantments.init(eControl_Enchantments);
|
||||
|
||||
for (unsigned int i = 0; i < Enchantment::validEnchantments.size(); ++i) {
|
||||
Enchantment* ench = Enchantment::validEnchantments.at(i);
|
||||
|
||||
for (unsigned int level = ench->getMinLevel();
|
||||
level <= ench->getMaxLevel(); ++level) {
|
||||
m_enchantmentIdAndLevels.push_back(
|
||||
std::pair<int, int>(ench->id, level));
|
||||
m_buttonListEnchantments.addItem(
|
||||
app.GetString(ench->getDescriptionId()) +
|
||||
_toString<int>(level));
|
||||
}
|
||||
}
|
||||
|
||||
m_buttonListMobs.init(eControl_Mobs);
|
||||
m_buttonListMobs.addItem(L"Chicken");
|
||||
m_mobFactories.push_back(eTYPE_CHICKEN);
|
||||
m_buttonListMobs.addItem(L"Cow");
|
||||
m_mobFactories.push_back(eTYPE_COW);
|
||||
m_buttonListMobs.addItem(L"Pig");
|
||||
m_mobFactories.push_back(eTYPE_PIG);
|
||||
m_buttonListMobs.addItem(L"Sheep");
|
||||
m_mobFactories.push_back(eTYPE_SHEEP);
|
||||
m_buttonListMobs.addItem(L"Squid");
|
||||
m_mobFactories.push_back(eTYPE_SQUID);
|
||||
m_buttonListMobs.addItem(L"Wolf");
|
||||
m_mobFactories.push_back(eTYPE_WOLF);
|
||||
m_buttonListMobs.addItem(L"Creeper");
|
||||
m_mobFactories.push_back(eTYPE_CREEPER);
|
||||
m_buttonListMobs.addItem(L"Ghast");
|
||||
m_mobFactories.push_back(eTYPE_GHAST);
|
||||
m_buttonListMobs.addItem(L"Pig Zombie");
|
||||
m_mobFactories.push_back(eTYPE_PIGZOMBIE);
|
||||
m_buttonListMobs.addItem(L"Skeleton");
|
||||
m_mobFactories.push_back(eTYPE_SKELETON);
|
||||
m_buttonListMobs.addItem(L"Slime");
|
||||
m_mobFactories.push_back(eTYPE_SLIME);
|
||||
m_buttonListMobs.addItem(L"Spider");
|
||||
m_mobFactories.push_back(eTYPE_SPIDER);
|
||||
m_buttonListMobs.addItem(L"Zombie");
|
||||
m_mobFactories.push_back(eTYPE_ZOMBIE);
|
||||
m_buttonListMobs.addItem(L"Enderman");
|
||||
m_mobFactories.push_back(eTYPE_ENDERMAN);
|
||||
m_buttonListMobs.addItem(L"Silverfish");
|
||||
m_mobFactories.push_back(eTYPE_SILVERFISH);
|
||||
m_buttonListMobs.addItem(L"Cave Spider");
|
||||
m_mobFactories.push_back(eTYPE_CAVESPIDER);
|
||||
m_buttonListMobs.addItem(L"Mooshroom");
|
||||
m_mobFactories.push_back(eTYPE_MUSHROOMCOW);
|
||||
m_buttonListMobs.addItem(L"Snow Golem");
|
||||
m_mobFactories.push_back(eTYPE_SNOWMAN);
|
||||
m_buttonListMobs.addItem(L"Ender Dragon");
|
||||
m_mobFactories.push_back(eTYPE_ENDERDRAGON);
|
||||
m_buttonListMobs.addItem(L"Blaze");
|
||||
m_mobFactories.push_back(eTYPE_BLAZE);
|
||||
m_buttonListMobs.addItem(L"Magma Cube");
|
||||
m_mobFactories.push_back(eTYPE_LAVASLIME);
|
||||
}
|
||||
|
||||
std::wstring UIScene_DebugOverlay::getMoviePath() { return L"DebugMenu"; }
|
||||
|
||||
void UIScene_DebugOverlay::customDraw(IggyCustomDrawCallbackRegion* region) {
|
||||
Minecraft* pMinecraft = Minecraft::GetInstance();
|
||||
if (pMinecraft->localplayers[m_iPad] == nullptr ||
|
||||
pMinecraft->localgameModes[m_iPad] == nullptr)
|
||||
return;
|
||||
|
||||
int itemId = -1;
|
||||
// 4jcraft TODO: UB on our platform since this casts char16_t* to wchar_t*
|
||||
swscanf((wchar_t*)region->name, L"item_%d", &itemId);
|
||||
if (itemId == -1 || itemId > Item::ITEM_NUM_COUNT ||
|
||||
Item::items[itemId] == nullptr) {
|
||||
app.DebugPrintf("This is not the control we are looking for\n");
|
||||
} else {
|
||||
std::shared_ptr<ItemInstance> item =
|
||||
std::shared_ptr<ItemInstance>(new ItemInstance(itemId, 1, 0));
|
||||
if (item != nullptr)
|
||||
customDrawSlotControl(region, m_iPad, item, 1.0f, false, false);
|
||||
}
|
||||
}
|
||||
|
||||
void UIScene_DebugOverlay::handleInput(int iPad, int key, bool repeat,
|
||||
bool pressed, bool released,
|
||||
bool& handled) {
|
||||
ui.AnimateKeyPress(iPad, key, repeat, pressed, released);
|
||||
|
||||
switch (key) {
|
||||
case ACTION_MENU_CANCEL:
|
||||
if (pressed) {
|
||||
navigateBack();
|
||||
}
|
||||
break;
|
||||
case ACTION_MENU_OK:
|
||||
case ACTION_MENU_UP:
|
||||
case ACTION_MENU_DOWN:
|
||||
case ACTION_MENU_PAGEUP:
|
||||
case ACTION_MENU_PAGEDOWN:
|
||||
case ACTION_MENU_LEFT:
|
||||
case ACTION_MENU_RIGHT:
|
||||
if (pressed) {
|
||||
sendInputToMovie(key, repeat, pressed, released);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void UIScene_DebugOverlay::handlePress(F64 controlId, F64 childId) {
|
||||
switch ((int)controlId) {
|
||||
case eControl_Items: {
|
||||
app.DebugPrintf(
|
||||
"UIScene_DebugOverlay::handlePress for itemsList: %f\n",
|
||||
childId);
|
||||
int id = childId;
|
||||
// app.SetXuiServerAction(m_iPad, eXuiServerAction_DropItem, (void
|
||||
// *)m_itemIds[id]);
|
||||
ClientConnection* conn = Minecraft::GetInstance()->getConnection(
|
||||
ProfileManager.GetPrimaryPad());
|
||||
conn->send(GiveItemCommand::preparePacket(
|
||||
std::dynamic_pointer_cast<Player>(
|
||||
Minecraft::GetInstance()
|
||||
->localplayers[ProfileManager.GetPrimaryPad()]),
|
||||
m_itemIds[id]));
|
||||
} break;
|
||||
case eControl_Mobs: {
|
||||
int id = childId;
|
||||
if (id < m_mobFactories.size()) {
|
||||
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),
|
||||
eXuiServerAction_SpawnMob,
|
||||
(void*)m_mobFactories[id]);
|
||||
}
|
||||
} break;
|
||||
case eControl_Enchantments: {
|
||||
int id = childId;
|
||||
ClientConnection* conn = Minecraft::GetInstance()->getConnection(
|
||||
ProfileManager.GetPrimaryPad());
|
||||
conn->send(EnchantItemCommand::preparePacket(
|
||||
std::dynamic_pointer_cast<Player>(
|
||||
Minecraft::GetInstance()
|
||||
->localplayers[ProfileManager.GetPrimaryPad()]),
|
||||
m_enchantmentIdAndLevels[id].first,
|
||||
m_enchantmentIdAndLevels[id].second));
|
||||
} break;
|
||||
case eControl_Schematic: {
|
||||
#ifndef _CONTENT_PACKAGE
|
||||
ui.NavigateToScene(ProfileManager.GetPrimaryPad(),
|
||||
eUIScene_DebugCreateSchematic, nullptr,
|
||||
eUILayer_Debug);
|
||||
#endif
|
||||
} break;
|
||||
case eControl_SetCamera: {
|
||||
#ifndef _CONTENT_PACKAGE
|
||||
ui.NavigateToScene(ProfileManager.GetPrimaryPad(),
|
||||
eUIScene_DebugSetCamera, nullptr,
|
||||
eUILayer_Debug);
|
||||
#endif
|
||||
} break;
|
||||
case eControl_Rain: {
|
||||
// app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_ToggleRain);
|
||||
ClientConnection* conn = Minecraft::GetInstance()->getConnection(
|
||||
ProfileManager.GetPrimaryPad());
|
||||
conn->send(ToggleDownfallCommand::preparePacket());
|
||||
} break;
|
||||
case eControl_Thunder:
|
||||
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),
|
||||
eXuiServerAction_ToggleThunder);
|
||||
break;
|
||||
case eControl_ResetTutorial:
|
||||
Tutorial::debugResetPlayerSavedProgress(
|
||||
ProfileManager.GetPrimaryPad());
|
||||
break;
|
||||
case eControl_SetDay: {
|
||||
ClientConnection* conn = Minecraft::GetInstance()->getConnection(
|
||||
ProfileManager.GetPrimaryPad());
|
||||
conn->send(TimeCommand::preparePacket(false));
|
||||
} break;
|
||||
case eControl_SetNight: {
|
||||
ClientConnection* conn = Minecraft::GetInstance()->getConnection(
|
||||
ProfileManager.GetPrimaryPad());
|
||||
conn->send(TimeCommand::preparePacket(true));
|
||||
} break;
|
||||
};
|
||||
}
|
||||
|
||||
void UIScene_DebugOverlay::handleSliderMove(F64 sliderId, F64 currentValue) {
|
||||
switch ((int)sliderId) {
|
||||
case eControl_Time: {
|
||||
Minecraft* pMinecraft = Minecraft::GetInstance();
|
||||
|
||||
// Need to set the time on both levels to stop the flickering as the
|
||||
// local level tries to predict the time Only works if we are on the
|
||||
// host machine, but shouldn't break if not
|
||||
MinecraftServer::SetTime(currentValue * 100);
|
||||
pMinecraft->level->getLevelData()->setGameTime(currentValue * 100);
|
||||
|
||||
wchar_t TempString[256];
|
||||
float currentTime = currentValue * 100;
|
||||
swprintf(TempString, 256, L"Set time (unsafe) (%d)",
|
||||
(int)currentTime);
|
||||
m_sliderTime.setLabel(TempString);
|
||||
} break;
|
||||
case eControl_FOV: {
|
||||
Minecraft* pMinecraft = Minecraft::GetInstance();
|
||||
pMinecraft->gameRenderer->SetFovVal((float)currentValue);
|
||||
|
||||
wchar_t TempString[256];
|
||||
swprintf(TempString, 256, L"Set fov (%d)", (int)currentValue);
|
||||
m_sliderFov.setLabel(TempString);
|
||||
} break;
|
||||
};
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,68 @@
|
||||
#pragma once
|
||||
#ifdef _DEBUG_MENUS_ENABLED
|
||||
#include "../../UIScene.h"
|
||||
#include "../../Controls/UIControl_ButtonList.h"
|
||||
|
||||
class UIScene_DebugOverlay : public UIScene {
|
||||
private:
|
||||
enum eControls {
|
||||
eControl_SetCamera,
|
||||
eControl_ResetTutorial,
|
||||
eControl_Schematic,
|
||||
eControl_Thunder,
|
||||
eControl_Rain,
|
||||
eControl_FOV,
|
||||
eControl_SetDay,
|
||||
eControl_SetNight,
|
||||
eControl_Time,
|
||||
eControl_Mobs,
|
||||
eControl_Enchantments,
|
||||
eControl_Items,
|
||||
};
|
||||
|
||||
std::vector<int> m_itemIds;
|
||||
std::vector<eINSTANCEOF> m_mobFactories;
|
||||
std::vector<std::pair<int, int> > m_enchantmentIdAndLevels;
|
||||
|
||||
public:
|
||||
UIScene_DebugOverlay(int iPad, void* initData, UILayer* parentLayer);
|
||||
|
||||
virtual EUIScene getSceneType() { return eUIScene_DebugOverlay; }
|
||||
|
||||
protected:
|
||||
UIControl_ButtonList m_buttonListItems, m_buttonListMobs,
|
||||
m_buttonListEnchantments;
|
||||
UIControl_Slider m_sliderFov, m_sliderTime;
|
||||
UIControl_Button m_buttonRain, m_buttonThunder, m_buttonSchematic,
|
||||
m_buttonResetTutorial, m_buttonSetCamera, m_buttonSetDay,
|
||||
m_buttonSetNight;
|
||||
UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene)
|
||||
UI_MAP_ELEMENT(m_buttonListItems, "itemsList")
|
||||
UI_MAP_ELEMENT(m_buttonListEnchantments, "enchantmentsList")
|
||||
UI_MAP_ELEMENT(m_buttonListMobs, "mobList")
|
||||
UI_MAP_ELEMENT(m_sliderFov, "fov")
|
||||
UI_MAP_ELEMENT(m_sliderTime, "time")
|
||||
UI_MAP_ELEMENT(m_buttonSetDay, "setDay")
|
||||
UI_MAP_ELEMENT(m_buttonSetNight, "setNight")
|
||||
UI_MAP_ELEMENT(m_buttonRain, "rain")
|
||||
UI_MAP_ELEMENT(m_buttonThunder, "thunder")
|
||||
UI_MAP_ELEMENT(m_buttonSchematic, "schematic")
|
||||
UI_MAP_ELEMENT(m_buttonResetTutorial, "resetTutorial")
|
||||
UI_MAP_ELEMENT(m_buttonSetCamera, "setCamera")
|
||||
UI_END_MAP_ELEMENTS_AND_NAMES()
|
||||
|
||||
virtual std::wstring getMoviePath();
|
||||
|
||||
public:
|
||||
virtual void customDraw(IggyCustomDrawCallbackRegion* region);
|
||||
|
||||
public:
|
||||
// INPUT
|
||||
virtual void handleInput(int iPad, int key, bool repeat, bool pressed,
|
||||
bool released, bool& handled);
|
||||
|
||||
protected:
|
||||
void handlePress(F64 controlId, F64 childId);
|
||||
virtual void handleSliderMove(F64 sliderId, F64 currentValue);
|
||||
};
|
||||
#endif
|
||||
@@ -0,0 +1,155 @@
|
||||
#include "../../../../../../Minecraft.World/Header Files/stdafx.h"
|
||||
|
||||
#ifdef _DEBUG_MENUS_ENABLED
|
||||
#include "../../UI.h"
|
||||
#include "UIScene_DebugSetCamera.h"
|
||||
#include "../../../../../net/minecraft/client/Minecraft.h"
|
||||
#include "../../../../../net/minecraft/client/multiplayer/MultiPlayerLocalPlayer.h"
|
||||
#include "../../../../../../Minecraft.World/ConsoleHelpers/StringHelpers.h"
|
||||
|
||||
UIScene_DebugSetCamera::UIScene_DebugSetCamera(int iPad, void* initData,
|
||||
UILayer* parentLayer)
|
||||
: UIScene(iPad, parentLayer) {
|
||||
// Setup all the Iggy references we need for this scene
|
||||
initialiseMovie();
|
||||
|
||||
int playerNo = 0;
|
||||
currentPosition = new DebugSetCameraPosition();
|
||||
currentPosition->player = playerNo;
|
||||
|
||||
Minecraft* pMinecraft = Minecraft::GetInstance();
|
||||
if (pMinecraft != nullptr) {
|
||||
Vec3 vec = pMinecraft->localplayers[playerNo]->getPos(1.0);
|
||||
|
||||
currentPosition->m_camX = vec.x;
|
||||
currentPosition->m_camY =
|
||||
vec.y -
|
||||
1.62; // pMinecraft->localplayers[playerNo]->getHeadHeight();
|
||||
currentPosition->m_camZ = vec.z;
|
||||
|
||||
currentPosition->m_yRot = pMinecraft->localplayers[playerNo]->yRot;
|
||||
currentPosition->m_elev = pMinecraft->localplayers[playerNo]->xRot;
|
||||
}
|
||||
|
||||
wchar_t TempString[256];
|
||||
|
||||
swprintf(TempString, 256, L"%f", currentPosition->m_camX);
|
||||
m_textInputX.init(TempString, eControl_CamX);
|
||||
|
||||
swprintf(TempString, 256, L"%f", currentPosition->m_camY);
|
||||
m_textInputY.init(TempString, eControl_CamY);
|
||||
|
||||
swprintf(TempString, 256, L"%f", currentPosition->m_camZ);
|
||||
m_textInputZ.init(TempString, eControl_CamZ);
|
||||
|
||||
swprintf(TempString, 256, L"%f", currentPosition->m_yRot);
|
||||
m_textInputYRot.init(TempString, eControl_YRot);
|
||||
|
||||
swprintf(TempString, 256, L"%f", currentPosition->m_elev);
|
||||
m_textInputElevation.init(TempString, eControl_Elevation);
|
||||
|
||||
m_checkboxLockPlayer.init(L"Lock Player", eControl_LockPlayer,
|
||||
app.GetFreezePlayers());
|
||||
|
||||
m_buttonTeleport.init(L"Teleport", eControl_Teleport);
|
||||
|
||||
m_labelTitle.init(L"Set Camera Position");
|
||||
m_labelCamX.init(L"CamX");
|
||||
m_labelCamY.init(L"CamY");
|
||||
m_labelCamZ.init(L"CamZ");
|
||||
m_labelYRotElev.init(L"Y-Rot & Elevation (Degs)");
|
||||
}
|
||||
|
||||
std::wstring UIScene_DebugSetCamera::getMoviePath() {
|
||||
return L"DebugSetCamera";
|
||||
}
|
||||
|
||||
void UIScene_DebugSetCamera::handleInput(int iPad, int key, bool repeat,
|
||||
bool pressed, bool released,
|
||||
bool& handled) {
|
||||
ui.AnimateKeyPress(iPad, key, repeat, pressed, released);
|
||||
|
||||
switch (key) {
|
||||
case ACTION_MENU_CANCEL:
|
||||
if (pressed) {
|
||||
navigateBack();
|
||||
}
|
||||
break;
|
||||
case ACTION_MENU_OK:
|
||||
case ACTION_MENU_UP:
|
||||
case ACTION_MENU_DOWN:
|
||||
case ACTION_MENU_PAGEUP:
|
||||
case ACTION_MENU_PAGEDOWN:
|
||||
case ACTION_MENU_LEFT:
|
||||
case ACTION_MENU_RIGHT:
|
||||
sendInputToMovie(key, repeat, pressed, released);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void UIScene_DebugSetCamera::handlePress(F64 controlId, F64 childId) {
|
||||
switch ((int)controlId) {
|
||||
case eControl_Teleport:
|
||||
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),
|
||||
eXuiServerAction_SetCameraLocation,
|
||||
(void*)currentPosition);
|
||||
break;
|
||||
case eControl_CamX:
|
||||
case eControl_CamY:
|
||||
case eControl_CamZ:
|
||||
case eControl_YRot:
|
||||
case eControl_Elevation:
|
||||
m_keyboardCallbackControl = (eControls)((int)controlId);
|
||||
InputManager.RequestKeyboard(
|
||||
L"Enter something", L"", 0, 25,
|
||||
&UIScene_DebugSetCamera::KeyboardCompleteCallback, this,
|
||||
C_4JInput::EKeyboardMode_Default);
|
||||
break;
|
||||
};
|
||||
}
|
||||
|
||||
void UIScene_DebugSetCamera::handleCheckboxToggled(F64 controlId,
|
||||
bool selected) {
|
||||
switch ((int)controlId) {
|
||||
case eControl_LockPlayer:
|
||||
app.SetFreezePlayers(selected);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int UIScene_DebugSetCamera::KeyboardCompleteCallback(void* lpParam, bool bRes) {
|
||||
UIScene_DebugSetCamera* pClass = (UIScene_DebugSetCamera*)lpParam;
|
||||
const char* text = InputManager.GetText();
|
||||
if (text[0] != '\0') {
|
||||
std::wstring value = convStringToWstring(text);
|
||||
double val = 0;
|
||||
if (!value.empty()) val = _fromString<double>(value);
|
||||
switch (pClass->m_keyboardCallbackControl) {
|
||||
case eControl_CamX:
|
||||
pClass->m_textInputX.setLabel(value);
|
||||
pClass->currentPosition->m_camX = val;
|
||||
break;
|
||||
case eControl_CamY:
|
||||
pClass->m_textInputY.setLabel(value);
|
||||
pClass->currentPosition->m_camY = val;
|
||||
break;
|
||||
case eControl_CamZ:
|
||||
pClass->m_textInputZ.setLabel(value);
|
||||
pClass->currentPosition->m_camZ = val;
|
||||
break;
|
||||
case eControl_YRot:
|
||||
pClass->m_textInputYRot.setLabel(value);
|
||||
pClass->currentPosition->m_yRot = val;
|
||||
break;
|
||||
case eControl_Elevation:
|
||||
pClass->m_textInputElevation.setLabel(value);
|
||||
pClass->currentPosition->m_elev = val;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,69 @@
|
||||
#pragma once
|
||||
#ifdef _DEBUG_MENUS_ENABLED
|
||||
#include "../../UIScene.h"
|
||||
|
||||
class UIScene_DebugSetCamera : public UIScene {
|
||||
private:
|
||||
enum eControls {
|
||||
eControl_CamX,
|
||||
eControl_CamY,
|
||||
eControl_CamZ,
|
||||
eControl_YRot,
|
||||
eControl_Elevation,
|
||||
eControl_LockPlayer,
|
||||
eControl_Teleport,
|
||||
};
|
||||
|
||||
typedef struct _FreezePlayerParam {
|
||||
int player;
|
||||
bool freeze;
|
||||
} FreezePlayerParam;
|
||||
|
||||
DebugSetCameraPosition* currentPosition;
|
||||
FreezePlayerParam* fpp;
|
||||
|
||||
eControls m_keyboardCallbackControl;
|
||||
|
||||
public:
|
||||
UIScene_DebugSetCamera(int iPad, void* initData, UILayer* parentLayer);
|
||||
|
||||
virtual EUIScene getSceneType() { return eUIScene_DebugSetCamera; }
|
||||
|
||||
protected:
|
||||
UIControl_TextInput m_textInputX, m_textInputY, m_textInputZ,
|
||||
m_textInputYRot, m_textInputElevation;
|
||||
UIControl_CheckBox m_checkboxLockPlayer;
|
||||
UIControl_Button m_buttonTeleport;
|
||||
UIControl_Label m_labelTitle, m_labelCamX, m_labelCamY, m_labelCamZ,
|
||||
m_labelYRotElev;
|
||||
UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene)
|
||||
UI_MAP_ELEMENT(m_textInputX, "CamX")
|
||||
UI_MAP_ELEMENT(m_textInputY, "CamY")
|
||||
UI_MAP_ELEMENT(m_textInputZ, "CamZ")
|
||||
UI_MAP_ELEMENT(m_textInputYRot, "YRot")
|
||||
UI_MAP_ELEMENT(m_textInputElevation, "Elevation")
|
||||
UI_MAP_ELEMENT(m_checkboxLockPlayer, "LockPlayer")
|
||||
UI_MAP_ELEMENT(m_buttonTeleport, "Teleport")
|
||||
|
||||
UI_MAP_ELEMENT(m_labelTitle, "LabelTitle")
|
||||
UI_MAP_ELEMENT(m_labelCamX, "LabelCamX")
|
||||
UI_MAP_ELEMENT(m_labelCamY, "LabelCamY")
|
||||
UI_MAP_ELEMENT(m_labelCamZ, "LabelCamZ")
|
||||
UI_MAP_ELEMENT(m_labelYRotElev, "LabelYRotElev")
|
||||
UI_END_MAP_ELEMENTS_AND_NAMES()
|
||||
|
||||
virtual std::wstring getMoviePath();
|
||||
|
||||
public:
|
||||
// INPUT
|
||||
virtual void handleInput(int iPad, int key, bool repeat, bool pressed,
|
||||
bool released, bool& handled);
|
||||
|
||||
protected:
|
||||
void handlePress(F64 controlId, F64 childId);
|
||||
virtual void handleCheckboxToggled(F64 controlId, bool selected);
|
||||
|
||||
private:
|
||||
static int KeyboardCompleteCallback(void* lpParam, const bool bRes);
|
||||
};
|
||||
#endif
|
||||
Reference in New Issue
Block a user