World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
Класс GUIWindow_DebugMenu

#include <UIGame.h>

+ Граф наследования:GUIWindow_DebugMenu:
+ Граф связей класса GUIWindow_DebugMenu:

Открытые члены

 GUIWindow_DebugMenu ()
 
virtual ~GUIWindow_DebugMenu ()
 
virtual void Update ()
 
- Открытые члены унаследованные от GUIWindow
 GUIWindow ()
 
 GUIWindow (WindowType windowType, unsigned int uX, unsigned int uY, unsigned int uWidth, unsigned int uHeight, int pButton, const String &hint=String())
 
virtual ~GUIWindow ()
 
GUIButtonCreateButton (int x, int y, int width, int height, int a6, int a7, UIMessageType msg, unsigned int msg_param, uint8_t hotkey, const String &label, const std::vector< Image * > &textures=std::vector< Image * >())
 
bool Contains (unsigned int x, unsigned int y)
 
void DrawFlashingInputCursor (int uX, int uY, GUIFont *a2)
 
int DrawTextInRect (GUIFont *font, unsigned int x, unsigned int y, unsigned int color, const char *text, int rect_width, int reverse_text)
 
int DrawTextInRect (GUIFont *font, unsigned int x, unsigned int y, unsigned int color, String &str, int rect_width, int reverse_text)
 
void DrawText (GUIFont *font, int x, int y, unsigned short uFontColor, const char *str, bool present_time_transparency=false, int max_text_height=0, int uFontShadowColor=0)
 
void DrawText (GUIFont *font, int x, int y, unsigned short uFontColor, const String &str, bool present_time_transparency=false, int max_text_height=0, int uFontShadowColor=0)
 
void DrawTitleText (GUIFont *font, int horizontal_margin, int vertical_margin, unsigned __int16 uDefaultColor, const char *pInString, int line_spacing)
 
void DrawTitleText (GUIFont *font, int horizontal_margin, int vertical_margin, unsigned __int16 uDefaultColor, const String &str, int line_spacing)
 
void DrawShops_next_generation_time_string (GameTime time)
 
void HouseDialogManager ()
 
void DrawMessageBox (bool inside_game_viewport)
 
GUIButtonGetControl (unsigned int uID)
 
void _41D08F_set_keyboard_control_group (int num_buttons, int a3, int a4, int a5)
 
void _41D73D_draw_buff_tooltip ()
 
virtual void Release ()
 
void DeleteButtons ()
 

Дополнительные унаследованные члены

- Открытые статические члены унаследованные от GUIWindow
static void InitializeGUI ()
 
- Открытые атрибуты унаследованные от GUIWindow
unsigned int uFrameX
 
unsigned int uFrameY
 
unsigned int uFrameWidth
 
unsigned int uFrameHeight
 
unsigned int uFrameZ
 
unsigned int uFrameW
 
WindowType eWindowType
 
union {
   void *   ptr_1C
 
   unsigned int   par1C
 
}; 
 
int field_24
 
int pNumPresenceButton
 
int pCurrentPosActiveItem
 
int field_30
 
int field_34
 
int pStartingPosActiveItem
 
int receives_keyboard_input_2
 
bool receives_keyboard_input
 
String sHint
 
std::vector< GUIButton * > vButtons
 
Mousemouse = nullptr
 
Loglog = nullptr
 

Подробное описание

См. определение в файле UIGame.h строка 46

Конструктор(ы)

◆ GUIWindow_DebugMenu()

GUIWindow_DebugMenu::GUIWindow_DebugMenu ( )

См. определение в файле UIGame.cpp строка 2449

2450  : GUIWindow(WINDOW_DebugMenu, 0, 0, window->GetWidth(), window->GetHeight(), 0) {
2451 
2452  pEventTimer->Pause();
2453  int width = 108;
2454  int height = 20;
2455 
2456  game_ui_menu_options = assets->GetImage_ColorKey("options", 0x7FF);
2457 
2458  GUIButton *pBtn_DebugTownPortal = CreateButton(13, 140, width, height, 1, 0, UIMSG_DebugTownPortal, 0, 0, "DEBUG TOWN PORTAL");
2459  GUIButton *pBtn_DebugGiveGold = CreateButton(127, 140, width, height, 1, 0, UIMSG_DebugGiveGold, 0, 0, "DEBUG GIVE GOLD (10000)");
2460  GUIButton *pBtn_DebugGiveEXP = CreateButton(241, 140, width, height, 1, 0, UIMSG_DebugGiveEXP, 0, 0, "DEBUG GIVE EXP (20000)");
2461  GUIButton *pBtn_DebugGiveSkillP = CreateButton(354, 140, width, height, 1, 0, UIMSG_DebugGiveSkillP, 0, 0, "DEBUG GIVE SKILL POINT (50)");
2462 
2463  GUIButton *pBtn_DebugLearnSkill = CreateButton(13, 167, width, height, 1, 0, UIMSG_DebugLearnSkills, 0, 0, "DEBUG LEARN CLASS SKILLS");
2464  GUIButton *pBtn_DebugRemoveGold = CreateButton(127, 167, width, height, 1, 0, UIMSG_DebugTakeGold, 0, 0, "DEBUG REMOVE GOLD");
2465  GUIButton *pBtn_DebugAddFood = CreateButton(241, 167, width, height, 1, 0, UIMSG_DebugGiveFood, 0, 0, "DEBUG GIVE FOOD (20)");
2466  GUIButton *pBtn_DebugTakeFood = CreateButton(354, 167, width, height, 1, 0, UIMSG_DebugTakeFood, 0, 0, "DEBUG REMOVE FOOD");
2467 
2468  GUIButton *pBtn_DebugCycleAlign = CreateButton(13, 194, width, height, 1, 0, UIMSG_DebugCycleAlign, 0, 0, "DEBUG CYCLE ALIGNMENT");
2469  GUIButton *pBtn_DebugWizardEye = CreateButton(127, 194, width, height, 1, 0, UIMSG_DebugWizardEye, 0, 0, "DEBUG TOGGLE WIZARD EYE");
2470  GUIButton *pBtn_DebugAllMagic = CreateButton(241, 194, width, height, 1, 0, UIMSG_DebugAllMagic, 0, 0, "DEBUG TOGGLE All MAGIC");
2471  GUIButton *pBtn_DebugTerrain = CreateButton(354, 194, width, height, 1, 0, UIMSG_DebugTerrain, 0, 0, "DEBUG TOGGLE TERRAIN");
2472 
2473  GUIButton *pBtn_DebugLightMap = CreateButton(13, 221, width, height, 1, 0, UIMSG_DebugLightmap, 0, 0, "DEBUG TOGGLE LIGHTMAP DECAL");
2474  GUIButton *pBtn_DebugTurbo = CreateButton(127, 221, width, height, 1, 0, UIMSG_DebugTurboSpeed, 0, 0, "DEBUG TOGGLE TURBO SPEED");
2475  GUIButton *pBtn_DebugNoActors = CreateButton(241, 221, width, height, 1, 0, UIMSG_DebugNoActors, 0, 0, "DEBUG TOGGLE ACTORS");
2476  GUIButton *pBtn_DebugDrawDist = CreateButton(354, 221, width, height, 1, 0, UIMSG_DebugDrawDist, 0, 0, "DEBUG TOGGLE EXTENDED DRAW DISTANCE");
2477 
2478  GUIButton *pBtn_DebugSnow = CreateButton(13, 248, width, height, 1, 0, UIMSG_DebugSnow, 0, 0, "DEBUG TOGGLE SNOW");
2479  GUIButton *pBtn_DebugPortalLines = CreateButton(127, 248, width, height, 1, 0, UIMSG_DebugPortalLines, 0, 0, "DEBUG TOGGLE PORTAL OUTLINES");
2480  GUIButton *pBtn_DebugPickedFace = CreateButton(241, 248, width, height, 1, 0, UIMSG_DebugPickedFace, 0, 0, "DEBUG TOGGLE SHOW PICKED FACE");
2481  GUIButton *pBtn_DebugShowFPS = CreateButton(354, 248, width, height, 1, 0, UIMSG_DebugShowFPS, 0, 0, "DEBUG TOGGLE SHOW FPS");
2482 
2483  GUIButton *pBtn_DebugSeasonsChange = CreateButton(13, 275, width, height, 1, 0, UIMSG_DebugSeasonsChange, 0, 0, "DEBUG TOGGLE SEASONS CHANGE");
2484  GUIButton *pBtn_DebugFarClipToggle = CreateButton(127, 275, width, height, 1, 0, UIMSG_DebugFarClip, 0, 0, "DEBUG TOGGLE FAR CLIP DISTANCE");
2485  GUIButton *pBtn_DebugGenItem = CreateButton(241, 275, width, height, 1, 0, UIMSG_DebugGenItem, 0, 0, "DEBUG GENERATE RANDOM ITEM");
2486  GUIButton *pBtn_DebugSpecialItem = CreateButton(354, 275, width, height, 1, 0, UIMSG_DebugSpecialItem, 0, 0, "DEBUG GENERATE RANDOM SPECIAL ITEM");
2487 
2488  //
2489 
2490  GUIButton *pBtn_DebugKillChar = CreateButton(13, 329, width, height, 1, 0, UIMSG_DebugKillChar, 0, 0, "DEBUG KILL SELECTED CHARACTER");
2491  GUIButton *pBtn_DebugEradicate = CreateButton(127, 329, width, height, 1, 0, UIMSG_DebugEradicate, 0, 0, "DEBUG ERADICATE SELECTED CHARACTER");
2492  GUIButton *pBtn_DebugNoDamage = CreateButton(241, 329, width, height, 1, 0, UIMSG_DebugNoDamage, 0, 0, "DEBUG TOGGLE NO DAMAGE");
2493  GUIButton *pBtn_DebugFullHeal = CreateButton(354, 329, width, height, 1, 0, UIMSG_DebugFullHeal, 0, 0, "DEBUG FULLY HEAL SELECTED CHARACTER");
2494 }

Перекрестные ссылки assets, GUIWindow::CreateButton(), game_ui_menu_options, AssetsManager::GetImage_ColorKey(), Timer::Pause(), pEventTimer, UIMSG_DebugAllMagic, UIMSG_DebugCycleAlign, UIMSG_DebugDrawDist, UIMSG_DebugEradicate, UIMSG_DebugFarClip, UIMSG_DebugFullHeal, UIMSG_DebugGenItem, UIMSG_DebugGiveEXP, UIMSG_DebugGiveFood, UIMSG_DebugGiveGold, UIMSG_DebugGiveSkillP, UIMSG_DebugKillChar, UIMSG_DebugLearnSkills, UIMSG_DebugLightmap, UIMSG_DebugNoActors, UIMSG_DebugNoDamage, UIMSG_DebugPickedFace, UIMSG_DebugPortalLines, UIMSG_DebugSeasonsChange, UIMSG_DebugShowFPS, UIMSG_DebugSnow, UIMSG_DebugSpecialItem, UIMSG_DebugTakeFood, UIMSG_DebugTakeGold, UIMSG_DebugTerrain, UIMSG_DebugTownPortal, UIMSG_DebugTurboSpeed и UIMSG_DebugWizardEye.

+ Граф вызовов:

◆ ~GUIWindow_DebugMenu()

virtual GUIWindow_DebugMenu::~GUIWindow_DebugMenu ( )
inlinevirtual

См. определение в файле UIGame.h строка 49

49 {}

Методы

◆ Update()

void GUIWindow_DebugMenu::Update ( )
virtual

Переопределяет метод предка GUIWindow.

См. определение в файле UIGame.cpp строка 2496

2496  {
2497  render->DrawTextureAlphaNew(pViewport->uViewportTL_X / 640.0f,
2498  pViewport->uViewportTL_Y / 480.0f,
2500 
2501  buttonbox(13, 140, "Town Portal", engine->config->debug_town_portal);
2502  buttonbox(127, 140, "Give Gold", 2);
2503  buttonbox(241, 140, "Give EXP", 2);
2504  buttonbox(354, 140, "Give Skill", 2);
2505 
2506  buttonbox(13, 167, "Learn Skills", 2);
2507  buttonbox(127, 167, "Take Gold", 2);
2508  buttonbox(241, 167, "Give Food", 2);
2509  buttonbox(354, 167, "Take Food", 2);
2510 
2511  int col = 0;
2514  buttonbox(13, 194, "Alignment", col);
2515  buttonbox(127, 194, "WizardEye", engine->config->debug_wizard_eye);
2516  buttonbox(241, 194, "All Magic", engine->config->debug_all_magic);
2517  buttonbox(354, 194, "Terrain", engine->config->debug_terrain);
2518 
2519  buttonbox(13, 221, "Lightmap", engine->config->debug_lightmaps_decals);
2520  buttonbox(127, 221, "Turbo", engine->config->debug_turbo_speed);
2521  buttonbox(241, 221, "Actors", engine->config->no_actors);
2522  buttonbox(354, 221, "Draw Dist", engine->config->extended_draw_distance);
2523 
2524  buttonbox(13, 248, "Snow", engine->config->allow_snow);
2525  buttonbox(127, 248, "Portal Lines", engine->config->debug_portal_outlines);
2526  buttonbox(241, 248, "Picked Face", engine->config->show_picked_face);
2527  buttonbox(354, 248, "Show FPS", engine->config->show_fps);
2528 
2529  buttonbox(13, 275, "Seasons", engine->config->seasons_change);
2530  buttonbox(127, 275, "Far Clip", pODMRenderParams->far_clip == 0x6000);
2531  buttonbox(241, 275, "Gen Item", 2);
2532  buttonbox(354, 275, "Special Item", 2);
2533 
2534  // times ??
2535  // conditions ??
2536 
2537  buttonbox(13, 329, "Dead", 2);
2538  buttonbox(127, 329, "Eradicate", 2);
2539  buttonbox(241, 329, "No Damage", engine->config->no_damage);
2540  buttonbox(354, 329, "Full Heal", 2);
2541 
2542  viewparams->bRedrawGameUI = true;
2543 }

Перекрестные ссылки Party::alignment, ViewingParams::bRedrawGameUI, buttonbox(), engine, ODMRenderParams::far_clip, game_ui_menu_options, PartyAlignment_Evil, PartyAlignment_Neutral, pODMRenderParams, pParty, pViewport, render, Viewport::uViewportTL_X, Viewport::uViewportTL_Y и viewparams.

+ Граф вызовов:

Объявления и описания членов классов находятся в файлах:
UIMSG_DebugGiveSkillP
@ UIMSG_DebugGiveSkillP
Definition: GUIWindow.h:242
UIMSG_DebugTerrain
@ UIMSG_DebugTerrain
Definition: GUIWindow.h:234
UIMSG_DebugNoActors
@ UIMSG_DebugNoActors
Definition: GUIWindow.h:231
PartyAlignment::PartyAlignment_Neutral
@ PartyAlignment_Neutral
UIMSG_DebugWizardEye
@ UIMSG_DebugWizardEye
Definition: GUIWindow.h:236
Viewport::uViewportTL_Y
int uViewportTL_Y
Definition: Viewport.h:23
UIMSG_DebugLearnSkills
@ UIMSG_DebugLearnSkills
Definition: GUIWindow.h:241
UIMSG_DebugGiveFood
@ UIMSG_DebugGiveFood
Definition: GUIWindow.h:239
GUIWindow::CreateButton
GUIButton * CreateButton(int x, int y, int width, int height, int a6, int a7, UIMessageType msg, unsigned int msg_param, uint8_t hotkey, const String &label, const std::vector< Image * > &textures=std::vector< Image * >())
Definition: GUIWindow.cpp:717
height
EGLSurface EGLint EGLint EGLint EGLint height
Definition: SDL_egl.h:1596
PartyAlignment::PartyAlignment_Evil
@ PartyAlignment_Evil
engine
std::shared_ptr< Engine > engine
Definition: Engine.cpp:130
UIMSG_DebugGenItem
@ UIMSG_DebugGenItem
Definition: GUIWindow.h:219
UIMSG_DebugGiveEXP
@ UIMSG_DebugGiveEXP
Definition: GUIWindow.h:243
GUIWindow::GUIWindow
GUIWindow()
Definition: GUIWindow.cpp:765
buttonbox
void buttonbox(int x, int y, char *text, int col)
Definition: UIGame.cpp:2545
UIMSG_DebugGiveGold
@ UIMSG_DebugGiveGold
Definition: GUIWindow.h:244
UIMSG_DebugTakeGold
@ UIMSG_DebugTakeGold
Definition: GUIWindow.h:240
UIMSG_DebugEradicate
@ UIMSG_DebugEradicate
Definition: GUIWindow.h:226
GUIButton
Definition: GUIButton.h:11
UIMSG_DebugKillChar
@ UIMSG_DebugKillChar
Definition: GUIWindow.h:225
WINDOW_DebugMenu
@ WINDOW_DebugMenu
Definition: GUIWindow.h:350
pParty
Party * pParty
Definition: Party.cpp:30
UIMSG_DebugSnow
@ UIMSG_DebugSnow
Definition: GUIWindow.h:229
UIMSG_DebugCycleAlign
@ UIMSG_DebugCycleAlign
Definition: GUIWindow.h:237
UIMSG_DebugAllMagic
@ UIMSG_DebugAllMagic
Definition: GUIWindow.h:235
UIMSG_DebugTakeFood
@ UIMSG_DebugTakeFood
Definition: GUIWindow.h:238
viewparams
struct ViewingParams * viewparams
Definition: mm7_data.cpp:22
AssetsManager::GetImage_ColorKey
Texture * GetImage_ColorKey(const String &name, uint16_t colorkey)
Definition: AssetsManager.cpp:34
UIMSG_DebugDrawDist
@ UIMSG_DebugDrawDist
Definition: GUIWindow.h:230
UIMSG_DebugLightmap
@ UIMSG_DebugLightmap
Definition: GUIWindow.h:233
width
EGLSurface EGLint EGLint EGLint width
Definition: SDL_egl.h:1596
window
EGLSurface EGLNativeWindowType * window
Definition: SDL_egl.h:1580
Timer::Pause
void Pause()
Definition: Time.cpp:19
UIMSG_DebugTownPortal
@ UIMSG_DebugTownPortal
Definition: GUIWindow.h:245
UIMSG_DebugShowFPS
@ UIMSG_DebugShowFPS
Definition: GUIWindow.h:222
UIMSG_DebugPickedFace
@ UIMSG_DebugPickedFace
Definition: GUIWindow.h:223
pViewport
struct Viewport * pViewport
Definition: mm7_data.cpp:21
pODMRenderParams
ODMRenderParams * pODMRenderParams
Definition: Outdoor.cpp:49
UIMSG_DebugFullHeal
@ UIMSG_DebugFullHeal
Definition: GUIWindow.h:228
assets
AssetsManager * assets
Definition: AssetsManager.cpp:12
UIMSG_DebugFarClip
@ UIMSG_DebugFarClip
Definition: GUIWindow.h:220
ViewingParams::bRedrawGameUI
int bRedrawGameUI
Definition: Viewport.h:74
UIMSG_DebugSeasonsChange
@ UIMSG_DebugSeasonsChange
Definition: GUIWindow.h:221
ODMRenderParams::far_clip
int far_clip
Definition: IRender.h:77
UIMSG_DebugPortalLines
@ UIMSG_DebugPortalLines
Definition: GUIWindow.h:224
game_ui_menu_options
Image * game_ui_menu_options
Definition: UIGame.cpp:78
Viewport::uViewportTL_X
int uViewportTL_X
Definition: Viewport.h:22
UIMSG_DebugSpecialItem
@ UIMSG_DebugSpecialItem
Definition: GUIWindow.h:218
pEventTimer
Timer * pEventTimer
Definition: Time.cpp:8
UIMSG_DebugTurboSpeed
@ UIMSG_DebugTurboSpeed
Definition: GUIWindow.h:232
UIMSG_DebugNoDamage
@ UIMSG_DebugNoDamage
Definition: GUIWindow.h:227
Party::alignment
PartyAlignment alignment
Definition: Party.h:308
render
std::shared_ptr< IRender > render
Definition: RenderOpenGL.cpp:52