Mercurial > mm7
comparison GUI/UI/UIRest.cpp @ 2545:e06a3fe9ad6e
TravelUI init logic moved to GUIWindow_Travel
TransitionUI init logic moved to GUIWindow_Transition
author | a.parshin |
---|---|
date | Mon, 11 May 2015 16:43:46 +0200 |
parents | c674d547cc7c |
children | 3121fb54a110 |
comparison
equal
deleted
inserted
replaced
2544:c674d547cc7c | 2545:e06a3fe9ad6e |
---|---|
4 | 4 |
5 #define _CRT_SECURE_NO_WARNINGS | 5 #define _CRT_SECURE_NO_WARNINGS |
6 | 6 |
7 #include "Engine/Engine.h" | 7 #include "Engine/Engine.h" |
8 | 8 |
9 #include "..\../GUI/GUIWindow.h" | 9 #include "Engine/Graphics/Outdoor.h" |
10 #include "..\../GUI/GUIFont.h" | 10 #include "Engine/LOD.h" |
11 #include "..\../Engine/Party.h" | 11 #include "Engine/Graphics/Viewport.h" |
12 #include "..\../Media/Audio/AudioPlayer.h" | 12 #include "Engine/Timer.h" |
13 #include "..\../Engine/Graphics/Outdoor.h" | 13 #include "Engine/texts.h" |
14 #include "..\../Engine/LOD.h" | 14 #include "Engine/Party.h" |
15 #include "..\../Engine/Graphics/Viewport.h" | |
16 #include "..\../Engine/Timer.h" | |
17 #include "..\../Engine/texts.h" | |
18 | 15 |
16 #include "GUI/UI/UIRest.h" | |
17 #include "GUI/GUIFont.h" | |
18 | |
19 #include "Media/Audio/AudioPlayer.h" | |
20 | |
21 | |
22 | |
23 void GUIWindow_RestWindow::Update() | |
24 { | |
25 __debugbreak(); // doesnt seems to get here, check stack trace & conditions | |
26 GUIButton GUIButton2; // [sp+28h] [bp-E0h]@133 | |
27 memset(&GUIButton2, 0, sizeof(GUIButton2)); | |
28 GUIButton2.uZ = 197; | |
29 GUIButton2.uW = 197; | |
30 GUIButton2.uX = 27; | |
31 GUIButton2.uY = 161; | |
32 GUIButton2.uWidth = 171; | |
33 GUIButton2.uHeight = 37; | |
34 GUIButton2.pParent = pButton_RestUI_WaitUntilDawn->pParent; | |
35 pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0); | |
36 pRenderer->DrawTextureIndexed(uFrameX, uFrameY, *((Texture **)ptr_1C + 15)); | |
37 viewparams->bRedrawGameUI = 1; | |
38 GUIButton2.DrawLabel(pGlobalTXT_LocalizationStrings[183], pFontCreate, 0, 0); // Rest & Heal 8 hrs / Отдых и лечение 8 часов | |
39 GUIButton2.pParent = 0; | |
40 Release(); | |
41 } | |
19 | 42 |
20 | 43 |
21 void PrepareToLoadRestUI() | 44 void PrepareToLoadRestUI() |
22 { | 45 { |
23 if (!_506F14_resting_stage) | 46 if (!_506F14_resting_stage) |
70 uTextureID_RestUI_restb4 = pIcons_LOD->LoadTexture("restb4", TEXTURE_16BIT_PALETTE); | 93 uTextureID_RestUI_restb4 = pIcons_LOD->LoadTexture("restb4", TEXTURE_16BIT_PALETTE); |
71 uTextureID_RestUI_restexit = pIcons_LOD->LoadTexture("restexit", TEXTURE_16BIT_PALETTE); | 94 uTextureID_RestUI_restexit = pIcons_LOD->LoadTexture("restexit", TEXTURE_16BIT_PALETTE); |
72 | 95 |
73 OutdoorLocation::LoadActualSkyFrame(); | 96 OutdoorLocation::LoadActualSkyFrame(); |
74 | 97 |
75 auto wnd = new GUIWindow_Rest(0, 0, window->GetWidth(), window->GetHeight(), 0, 0); | 98 auto wnd = new GUIWindow_Rest(0, 0, window->GetWidth(), window->GetHeight()); |
76 pButton_RestUI_Exit = wnd->CreateButton(280, 297, 154, 37, 1, 0, UIMSG_ExitRest, 0, 0, "", pIcons_LOD->GetTexture(uTextureID_RestUI_restexit), 0); | 99 pButton_RestUI_Exit = wnd->CreateButton(280, 297, 154, 37, 1, 0, UIMSG_ExitRest, 0, 0, "", pIcons_LOD->GetTexture(uTextureID_RestUI_restexit), 0); |
77 pButton_RestUI_Main = wnd->CreateButton( 24, 154, 225, 37, 1, 0, UIMSG_Rest8Hour, 0, 'R', "", pIcons_LOD->GetTexture(uTextureID_RestUI_restb4), 0); | 100 pButton_RestUI_Main = wnd->CreateButton( 24, 154, 225, 37, 1, 0, UIMSG_Rest8Hour, 0, 'R', "", pIcons_LOD->GetTexture(uTextureID_RestUI_restb4), 0); |
78 pButton_RestUI_WaitUntilDawn = wnd->CreateButton( 61, 232, 154, 33, 1, 0, UIMSG_AlreadyResting, 0, 'D', "", pIcons_LOD->GetTexture(uTextureID_RestUI_restb1), 0); | 101 pButton_RestUI_WaitUntilDawn = wnd->CreateButton( 61, 232, 154, 33, 1, 0, UIMSG_AlreadyResting, 0, 'D', "", pIcons_LOD->GetTexture(uTextureID_RestUI_restb1), 0); |
79 pButton_RestUI_Wait1Hour = wnd->CreateButton( 61, 264, 154, 33, 1, 0, UIMSG_Wait1Hour, 0, 'H', "", pIcons_LOD->GetTexture(uTextureID_RestUI_restb2), 0); | 102 pButton_RestUI_Wait1Hour = wnd->CreateButton( 61, 264, 154, 33, 1, 0, UIMSG_Wait1Hour, 0, 'H', "", pIcons_LOD->GetTexture(uTextureID_RestUI_restb2), 0); |
80 pButton_RestUI_Wait5Minutes = wnd->CreateButton( 61, 296, 154, 33, 1, 0, UIMSG_Wait5Minutes, 0, 'M', "", pIcons_LOD->GetTexture(uTextureID_RestUI_restb3), 0); | 103 pButton_RestUI_Wait5Minutes = wnd->CreateButton( 61, 296, 154, 33, 1, 0, UIMSG_Wait5Minutes, 0, 'M', "", pIcons_LOD->GetTexture(uTextureID_RestUI_restb3), 0); |
81 | 104 |
82 return wnd; | 105 return wnd; |
83 } | 106 } |
84 | 107 |
108 | |
109 | |
85 //----- (0041FA01) -------------------------------------------------------- | 110 //----- (0041FA01) -------------------------------------------------------- |
86 void RestUI_Draw() | 111 void GUIWindow_Rest::Update() |
87 { | 112 { |
88 int live_characters; // esi@1 | 113 int live_characters; // esi@1 |
89 unsigned int v3; // eax@15 | 114 unsigned int v3; // eax@15 |
90 GUIButton tmp_button; // [sp+8h] [bp-DCh]@19 | 115 GUIButton tmp_button; // [sp+8h] [bp-DCh]@19 |
91 unsigned int am_pm_hours; // [sp+D8h] [bp-Ch]@9 | 116 unsigned int am_pm_hours; // [sp+D8h] [bp-Ch]@9 |