Mercurial > mm7
diff 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 |
line wrap: on
line diff
--- a/GUI/UI/UIRest.cpp Mon May 11 09:51:04 2015 +0200 +++ b/GUI/UI/UIRest.cpp Mon May 11 16:43:46 2015 +0200 @@ -6,16 +6,39 @@ #include "Engine/Engine.h" -#include "..\../GUI/GUIWindow.h" -#include "..\../GUI/GUIFont.h" -#include "..\../Engine/Party.h" -#include "..\../Media/Audio/AudioPlayer.h" -#include "..\../Engine/Graphics/Outdoor.h" -#include "..\../Engine/LOD.h" -#include "..\../Engine/Graphics/Viewport.h" -#include "..\../Engine/Timer.h" -#include "..\../Engine/texts.h" +#include "Engine/Graphics/Outdoor.h" +#include "Engine/LOD.h" +#include "Engine/Graphics/Viewport.h" +#include "Engine/Timer.h" +#include "Engine/texts.h" +#include "Engine/Party.h" + +#include "GUI/UI/UIRest.h" +#include "GUI/GUIFont.h" + +#include "Media/Audio/AudioPlayer.h" + + +void GUIWindow_RestWindow::Update() +{ + __debugbreak(); // doesnt seems to get here, check stack trace & conditions + GUIButton GUIButton2; // [sp+28h] [bp-E0h]@133 + memset(&GUIButton2, 0, sizeof(GUIButton2)); + GUIButton2.uZ = 197; + GUIButton2.uW = 197; + GUIButton2.uX = 27; + GUIButton2.uY = 161; + GUIButton2.uWidth = 171; + GUIButton2.uHeight = 37; + GUIButton2.pParent = pButton_RestUI_WaitUntilDawn->pParent; + pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0); + pRenderer->DrawTextureIndexed(uFrameX, uFrameY, *((Texture **)ptr_1C + 15)); + viewparams->bRedrawGameUI = 1; + GUIButton2.DrawLabel(pGlobalTXT_LocalizationStrings[183], pFontCreate, 0, 0); // Rest & Heal 8 hrs / Отдых и лечение 8 часов + GUIButton2.pParent = 0; + Release(); +} void PrepareToLoadRestUI() @@ -72,7 +95,7 @@ OutdoorLocation::LoadActualSkyFrame(); - auto wnd = new GUIWindow_Rest(0, 0, window->GetWidth(), window->GetHeight(), 0, 0); + auto wnd = new GUIWindow_Rest(0, 0, window->GetWidth(), window->GetHeight()); pButton_RestUI_Exit = wnd->CreateButton(280, 297, 154, 37, 1, 0, UIMSG_ExitRest, 0, 0, "", pIcons_LOD->GetTexture(uTextureID_RestUI_restexit), 0); pButton_RestUI_Main = wnd->CreateButton( 24, 154, 225, 37, 1, 0, UIMSG_Rest8Hour, 0, 'R', "", pIcons_LOD->GetTexture(uTextureID_RestUI_restb4), 0); pButton_RestUI_WaitUntilDawn = wnd->CreateButton( 61, 232, 154, 33, 1, 0, UIMSG_AlreadyResting, 0, 'D', "", pIcons_LOD->GetTexture(uTextureID_RestUI_restb1), 0); @@ -82,8 +105,10 @@ return wnd; } + + //----- (0041FA01) -------------------------------------------------------- -void RestUI_Draw() +void GUIWindow_Rest::Update() { int live_characters; // esi@1 unsigned int v3; // eax@15