diff GUI/GUIWindow.cpp @ 2546:4087cbc62706

GameMenu logic moved to GUIWindow_GameMenu the same for game menu options
author a.parshin
date Mon, 11 May 2015 17:45:02 +0200
parents e06a3fe9ad6e
children fed97f15d1e1
line wrap: on
line diff
--- a/GUI/GUIWindow.cpp	Mon May 11 16:43:46 2015 +0200
+++ b/GUI/GUIWindow.cpp	Mon May 11 17:45:02 2015 +0200
@@ -1615,28 +1615,24 @@
 
 
 
-void GUIWindow_GameMenu::Update()
-{
-    pRenderer->DrawTextureIndexed(
-        pViewport->uViewportTL_Y,
-        pViewport->uViewportTL_X,
-        pIcons_LOD->GetTexture(uTextureID_Options)
-    );
-    viewparams->bRedrawGameUI = 1;
-}
-
 void GUIWindow_CharacterRecord::Update()
 {
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
     CharacterUI_CharacterScreen_Draw(pPlayers[uActiveCharacter]);
 }
 
 void GUIWindow_Book::Update()
 {
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
     BookUI_Draw((WindowType)(int)ptr_1C);
 }
 
 void GUIWindow_BooksWindow::Update()
 {
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
     auto pButton = (GUIButton *)ptr_1C;
     pRenderer->DrawTextureIndexed(uFrameY, uFrameX, pButton->pTextures[0]);
     viewparams->bRedrawGameUI = true;
@@ -1644,26 +1640,36 @@
 
 void GUIWindow_QuickReference::Update()
 {
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
     GameUI_QuickRef_Draw();
 }
 
 void GUIWindow_Dialogue::Update()
 {
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
     GameUI_DrawDialogue();
 }
 
 void GUIWindow_GenericDialogue::Update()
 {
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
     GameUI_DrawBranchlessDialogue();
 }
 
 void GUIWindow_Spellbook::Update()
 {
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
     DrawSpellBookContent(pPlayers[uActiveCharacter]);
 }
 
 void GUIWindow_Chest::Update()
 {
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
     if (current_screen_type == SCREEN_CHEST)
     {
         Chest::DrawChestUI(par1C);
@@ -1679,16 +1685,22 @@
 
 void GUIWindow_Save::Update()
 {
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
     SaveUI_Draw();
 }
 
 void GUIWindow_Load::Update()
 {
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
     LoadUI_Draw();
 }
 
 void GUIWindow_House::Update()
 {
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
     HouseDialogManager();
     if (!window_SpeakInHouse)
         return;
@@ -1705,11 +1717,15 @@
 
 void GUIWindow_Scroll::Update()
 {
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
     CreateScrollWindow();
 }
 
 void GUIWindow_Inventory::Update()
 {
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
     DrawMessageBox(0);
     DrawText(pFontLucida, 10, 20, 0, "Making item number", 0, 0, 0);
     DrawText(pFontLucida, 10, 40, 0, pKeyActionMap->pPressedKeysBuffer, 0, 0, 0);
@@ -1729,6 +1745,8 @@
 
 void GUIWindow_Inventory_CastSpell::Update()
 {
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
     pRenderer->ClearZBuffer(0, 479);
     draw_leather();
     CharacterUI_InventoryTab_Draw(pPlayers[uActiveCharacter], true);
@@ -1738,11 +1756,15 @@
 
 void GUIWindow_Modal::Update()
 {
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
     ModalWindow_ShowHint();
 }
 
 void OnButtonClick::Update()
 {
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
     if (Hint != (char *)1)
         pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0);
     GUIButton *pButton = (GUIButton *)ptr_1C;
@@ -1755,6 +1777,8 @@
 
 void OnButtonClick2::Update()
 {
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
     if (Hint != (char *)1)
         pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0);
     GUIButton *pButton = (GUIButton *)ptr_1C;
@@ -1778,6 +1802,8 @@
 
 void OnButtonClick3::Update()
 {
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
     if (Hint != (char *)1)
         pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0);
     auto pButton = (GUIButton *)ptr_1C;
@@ -1790,6 +1816,8 @@
 
 void OnButtonClick4::Update()
 {
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
     if (Hint != (char *)1)
         pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0);
     auto pButton = (GUIButton *)ptr_1C;
@@ -1801,6 +1829,8 @@
 
 void OnSaveLoad::Update()
 {
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
     if (Hint != (char *)1)
         pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0);
     auto pButton = (GUIButton *)ptr_1C;
@@ -1818,6 +1848,8 @@
 
 void OnCancel::Update()
 {
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
     if (Hint != (char *)1)
         pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0);
     auto pGUIButton = (GUIButton *)ptr_1C;
@@ -1832,6 +1864,8 @@
 
 void OnCancel2::Update()
 {
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
     if (Hint != (char *)1)
         pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0);
     auto pButton = (GUIButton *)ptr_1C;
@@ -1846,6 +1880,8 @@
 
 void OnCancel3::Update()
 {
+// -----------------------------------
+// 004156F0 GUI_UpdateWindows --- part
     if (Hint != (char *)1)
         pAudioPlayer->PlaySound(SOUND_StartMainChoice02, 0, 0, -1, 0, 0, 0, 0);
     auto pButton = (GUIButton *)ptr_1C;