Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 50ddb65

Browse files
committed
Fix custom BuyMenu skin cursors being ignored
Fix using wrong backbuffer when creating BuyMenu GUIScreen
1 parent 2bcaa9f commit 50ddb65

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Menus/BuyMenuGUI.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ int BuyMenuGUI::Create(Controller *pController)
148148
m_pController = pController;
149149

150150
if (!m_pGUIScreen)
151-
m_pGUIScreen = new AllegroScreen(g_FrameMan.GetNetworkBackBufferGUI8Current(pController->GetPlayer()));
151+
m_pGUIScreen = new AllegroScreen(g_FrameMan.GetBackBuffer8());
152152
if (!m_pGUIInput)
153153
m_pGUIInput = new GUIInputWrapper(pController->GetPlayer());
154154
if (!m_pGUIController)
@@ -2062,8 +2062,8 @@ void BuyMenuGUI::Draw(BITMAP *drawBitmap) const
20622062

20632063
// Draw the cursor on top of everything
20642064
if (IsEnabled() && m_pController->IsMouseControlled())
2065-
// m_pGUIController->DrawMouse();
2066-
draw_sprite(drawBitmap, s_pCursor, m_CursorPos.GetFloorIntX(), m_CursorPos.GetFloorIntY());
2065+
m_pGUIController->DrawMouse();
2066+
//draw_sprite(drawBitmap, s_pCursor, m_CursorPos.GetFloorIntX(), m_CursorPos.GetFloorIntY());
20672067
}
20682068

20692069
/*

Menus/ObjectPickerGUI.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,9 @@ namespace RTE {
598598
void ObjectPickerGUI::Draw(BITMAP *drawBitmap) const {
599599
AllegroScreen drawScreen(drawBitmap);
600600
m_GUIControlManager->Draw(&drawScreen);
601-
if (IsEnabled() && m_Controller->IsMouseControlled()) { draw_sprite(drawBitmap, s_Cursor, m_CursorPos.GetFloorIntX(), m_CursorPos.GetFloorIntY()); }
601+
if (IsEnabled() && m_Controller->IsMouseControlled()) {
602+
m_GUIControlManager->DrawMouse();
603+
//draw_sprite(drawBitmap, s_Cursor, m_CursorPos.GetFloorIntX(), m_CursorPos.GetFloorIntY());
604+
}
602605
}
603606
}

0 commit comments

Comments
 (0)