Mercurial > mm7
diff GUI/UI/UICharacter.cpp @ 2544:c674d547cc7c
GUIWindow switch logic refactored into behaviour classes
author | a.parshin |
---|---|
date | Mon, 11 May 2015 09:51:04 +0200 |
parents | bacf9809126a |
children | fed97f15d1e1 |
line wrap: on
line diff
--- a/GUI/UI/UICharacter.cpp Sun May 10 03:21:14 2015 +0200 +++ b/GUI/UI/UICharacter.cpp Mon May 11 09:51:04 2015 +0200 @@ -416,7 +416,7 @@ CharacterUI_LoadPaperdollTextures(); current_screen_type = screen; - auto wnd = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_CharacterRecord, uActiveCharacter, 0); + auto wnd = new GUIWindow_CharacterRecord(0, 0, window->GetWidth(), window->GetHeight(), uActiveCharacter, 0); pCharacterScreen_StatsBtn = wnd->CreateButton(pViewport->uViewportTL_X + 12, pViewport->uViewportTL_Y + 308, pIcons_LOD->GetTexture(papredoll_dbrds[9])->uTextureWidth, pIcons_LOD->GetTexture(papredoll_dbrds[9])->uTextureHeight, @@ -472,7 +472,7 @@ bRingsShownInCharScreen = 0; CharacterUI_LoadPaperdollTextures(); current_screen_type = SCREEN_CASTING; - CS_inventory_window = GUIWindow::Create(0, 0, window->GetWidth(), window->GetHeight(), WINDOW_CastSpell_InInventory, (int)this, 0); + CS_inventory_window = new GUIWindow_Inventory_CastSpell(0, 0, window->GetWidth(), window->GetHeight(), (int)this, 0); pCharacterScreen_ExitBtn = CS_inventory_window->CreateButton(394, 318, 75, 33, 1, 0, UIMSG_ClickExitCharacterWindowBtn, 0, 0, pGlobalTXT_LocalizationStrings[79], // Close pIcons_LOD->GetTexture(papredoll_dbrds[2]), @@ -695,7 +695,7 @@ void CharacterUI_CharacterScreen_Draw(Player *player) { pRenderer->ClearZBuffer(0, 479); - switch (pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0]) + switch (current_character_screen_window) { case WINDOW_CharacterWindow_Stats: // stats CharacterUI_ReleaseButtons();