Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

Commit

Permalink
MachGuiMenuButton's call to MGSS::blitBackdrop in doDisplay has been …
Browse files Browse the repository at this point in the history
…removed. Logic for checking whether to draw the menu or the messagebox for buttons has been moved from MGSS to MachGuiMenuButton
  • Loading branch information
m-flak committed Aug 10, 2022
1 parent dee49a2 commit 1f08fe1
Show file tree
Hide file tree
Showing 26 changed files with 341 additions and 207 deletions.
10 changes: 10 additions & 0 deletions src/libdev/gui/displaya.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -952,6 +952,16 @@ bool& GuiDisplayable::useFourTimesRender()
return useFourTimesRenderBool;
}

GuiDisplayable* GuiDisplayable::findRoot(GuiDisplayable* current)
{
if (current->isRoot())
{
return current;
}

return findRoot( &(current->parent()) );
}

//////////////////////////////////////////////////////////////////////

/* End **************************************************************/
2 changes: 2 additions & 0 deletions src/libdev/gui/displaya.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ class GuiDisplayable
GuiDisplayable& parent();
// PRE( not isRoot() );

GuiDisplayable* findRoot(GuiDisplayable* current);

// call this method when a subclass undergoes a state
// change which alters the display of the object
void changed();
Expand Down
9 changes: 8 additions & 1 deletion src/libdev/gui/root.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

#include "gui/manager.hpp"
#include "root.hpp"


/* //////////////////////////////////////////////////////////////// */

Expand Down Expand Up @@ -38,7 +40,12 @@ bool GuiRoot::recursivelyHasChild( GuiDisplayable * pChild ) const
POST( iff( pChild != this, result ) );
return result;
}


GuiRootSharedBitmaps* GuiRoot::getSharedBitmaps()
{
return &mSharedBitmaps_;
}

/* //////////////////////////////////////////////////////////////// */

/* End ROOT.CPP *****************************************************/
5 changes: 5 additions & 0 deletions src/libdev/gui/root.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#define _GUI_ROOT_HPP

#include "gui/displaya.hpp"
#include "RootSharedBitmaps.hpp"

//Forward refs
class GuiMouseEvent;
Expand Down Expand Up @@ -34,6 +35,8 @@ class GuiRoot : public GuiDisplayable
bool recursivelyHasChild( GuiDisplayable * ) const;
// POST( iff( pChild != this, result ) );

GuiRootSharedBitmaps* getSharedBitmaps();

protected:
// inherited from GuiDisplayable...
// virtual void doDisplay() = 0;
Expand All @@ -42,6 +45,8 @@ class GuiRoot : public GuiDisplayable
virtual void doBecomeRoot() = 0;
virtual void doBecomeNotRoot() = 0;

GuiRootSharedBitmaps mSharedBitmaps_;

private:
GuiRoot( const GuiRoot& );
bool operator ==( const GuiRoot& ) const;
Expand Down
12 changes: 8 additions & 4 deletions src/libdev/machgui/ctxbrief.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,14 @@ MachGuiCtxBriefing::MachGuiCtxBriefing( MachGuiStartupScreens* pStartupScreens )
playedMail_( false ),
autoLoadGame_( false )
{
pOkBtn_ = _NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 131, 363, 301, 401 ), IDS_MENUBTN_OK, MachGuiStartupScreens::BE_DUMMY_OK ) );
MachGuiMenuButton* pCancelBtn = _NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 132, 416, 301, 453 ), IDS_MENUBTN_CANCEL, MachGuiStartupScreens::EXIT ) );
pHintsBtn_ = _NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 357, 363, 526, 401 ), IDS_MENUBTN_HINTS, MachGuiStartupScreens::HINTS ) );
pObjectiveBtn_ = _NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 356, 416, 526, 453 ), IDS_MENUBTN_OBJECTIVES, MachGuiStartupScreens::OBJECTIVES ) );
pOkBtn_ = _NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(131, 363, 301, 401), IDS_MENUBTN_OK,
MachGuiStartupScreens::BE_DUMMY_OK));
MachGuiMenuButton* pCancelBtn = _NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(132, 416, 301, 453),
IDS_MENUBTN_CANCEL, MachGuiStartupScreens::EXIT));
pHintsBtn_ = _NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(357, 363, 526, 401), IDS_MENUBTN_HINTS,
MachGuiStartupScreens::HINTS));
pObjectiveBtn_ = _NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(356, 416, 526, 453),
IDS_MENUBTN_OBJECTIVES, MachGuiStartupScreens::OBJECTIVES));

pCancelBtn->escapeControl( true );

Expand Down
12 changes: 8 additions & 4 deletions src/libdev/machgui/ctxcamp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,14 @@ MachGuiCtxCampaign::MachGuiCtxCampaign( MachGuiStartupScreens* pStartupScreens )
const int CURRENTSTATUS_MAXX = 532;
const int CURRENTSTATUS_MAXY = 376;

MachGuiMenuButton* pOkBtn = _NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 83, 408, 255, 445 ), IDS_MENUBTN_OK, MachGuiStartupScreens::BE_OK ) );
MachGuiMenuButton* pCancelBtn = _NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 327, 408, 497, 445 ), IDS_MENUBTN_CANCEL, MachGuiStartupScreens::EXIT ) );
_NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 376, 40, 546, 77 ), IDS_MENUBTN_NEW, MachGuiStartupScreens::BE_NEW ) );
_NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 376, 134, 546, 172 ), IDS_MENUBTN_DELETE, MachGuiStartupScreens::BE_DELETE ) );
MachGuiMenuButton* pOkBtn = _NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(83, 408, 255, 445),
IDS_MENUBTN_OK, MachGuiStartupScreens::BE_OK));
MachGuiMenuButton* pCancelBtn = _NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(327, 408, 497, 445),
IDS_MENUBTN_CANCEL, MachGuiStartupScreens::EXIT));
_NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(376, 40, 546, 77), IDS_MENUBTN_NEW,
MachGuiStartupScreens::BE_NEW));
_NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(376, 134, 546, 172), IDS_MENUBTN_DELETE,
MachGuiStartupScreens::BE_DELETE));

pCancelBtn->escapeControl( true );
pOkBtn->defaultControl( true );
Expand Down
13 changes: 9 additions & 4 deletions src/libdev/machgui/ctxdebrf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,20 @@ MachGuiCtxDeBriefing::MachGuiCtxDeBriefing( MachGuiStartupScreens* pStartupScree
playedMail_(false)
{
// Create menu buttons. Order of creation denotes TAB order.
MachGuiMenuButton* pStatisticsButton = _NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 87, 206, 279, 248 ), IDS_MENUBTN_STATS, MachGuiStartupScreens::BE_STATISTICS ) );
MachGuiMenuButton* pStatisticsButton = _NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens,
Gui::Box(87, 206, 279, 248), IDS_MENUBTN_STATS,
MachGuiStartupScreens::BE_STATISTICS));
MachGuiMenuButton* pContinueButton;
//display back to lobby on button for zone games.
if( not NetNetwork::instance().isLobbiedGame() )
pContinueButton = _NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 87, 310, 279, 353 ), IDS_MENUBTN_CONTINUE, MachGuiStartupScreens::CONTINUE ) );
pContinueButton = _NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(87, 310, 279, 353),
IDS_MENUBTN_CONTINUE, MachGuiStartupScreens::CONTINUE));
else
pContinueButton = _NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 87, 310, 279, 353 ), IDS_MENUBTN_BACK_TO_ZONE, MachGuiStartupScreens::CONTINUE ) );
pContinueButton = _NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(87, 310, 279, 353),
IDS_MENUBTN_BACK_TO_ZONE, MachGuiStartupScreens::CONTINUE));

MachGuiMenuButton* pRestartButton = _NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 87, 100, 279, 142 ), IDS_MENUBTN_RESTART, MachGuiStartupScreens::RESTART ) );
MachGuiMenuButton* pRestartButton = _NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(87, 100, 279, 142),
IDS_MENUBTN_RESTART, MachGuiStartupScreens::RESTART));

#ifdef DEMO
pStatisticsButton->disabled( true );
Expand Down
3 changes: 2 additions & 1 deletion src/libdev/machgui/ctxhotky.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,8 @@ MachGuiCtxHotKeys::MachGuiCtxHotKeys( MachGuiStartupScreens* pStartupScreens )
pStartupScreens_->addSmackerAnimation( pSmackerAnimation );
}

MachGuiMenuButton* pContinueBtn = _NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 351, 420, 553, 464 ), IDS_MENUBTN_CONTINUE, MachGuiStartupScreens::EXIT ) );
MachGuiMenuButton* pContinueBtn = _NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(351, 420, 553, 464),
IDS_MENUBTN_CONTINUE, MachGuiStartupScreens::EXIT));
_NEW( MachGuiMenuText( pStartupScreens, Gui::Box( 42, 353, 224, 464 ), IDS_MENU_HOTKEYS, "gui/menu/largefnt.bmp" ) );

pContinueBtn->escapeControl( true );
Expand Down
27 changes: 18 additions & 9 deletions src/libdev/machgui/ctxingam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,27 @@ MachGuiCtxInGameOptions::MachGuiCtxInGameOptions( MachGuiStartupScreens* pStartu
animations_( pStartupScreens, SysPathName("gui/menu/se_anims.anm") )
{
// Setup all the buttons on this screen.
MachGuiMenuButton* pContinueBtn = _NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 90, 72, 281, 115 ), IDS_MENUBTN_CONTINUE, MachGuiStartupScreens::CONTINUE ) );
MachGuiMenuButton* pBriefingBtn = _NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 90, 178, 281, 222 ), IDS_MENUBTN_BRIEFING, MachGuiStartupScreens::BRIEFING ) );
MachGuiMenuButton* pRestartBtn = _NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 90, 282, 281, 326 ), IDS_MENUBTN_RESTART, MachGuiStartupScreens::RESTART ) );
MachGuiMenuButton* pHotkeysBtn = _NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 90, 377, 281, 420 ), IDS_MENUBTN_HOTKEYS, MachGuiStartupScreens::HOTKEYS ) );
MachGuiMenuButton* pOptionsBtn = _NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 344, 72, 536, 114 ), IDS_MENUBTN_OPTIONS, MachGuiStartupScreens::OPTIONS ) );
MachGuiMenuButton* pSaveBtn = _NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 344, 178, 536, 221 ), IDS_MENUBTN_SAVEGAME, MachGuiStartupScreens::SAVEGAME ) );
MachGuiMenuButton* pLoadBtn = _NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 344, 282, 536, 325 ), IDS_MENUBTN_LOADGAME, MachGuiStartupScreens::LOADGAME ) );
MachGuiMenuButton* pContinueBtn = _NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(90, 72, 281, 115),
IDS_MENUBTN_CONTINUE, MachGuiStartupScreens::CONTINUE));
MachGuiMenuButton* pBriefingBtn = _NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(90, 178, 281, 222),
IDS_MENUBTN_BRIEFING, MachGuiStartupScreens::BRIEFING));
MachGuiMenuButton* pRestartBtn = _NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(90, 282, 281, 326),
IDS_MENUBTN_RESTART, MachGuiStartupScreens::RESTART));
MachGuiMenuButton* pHotkeysBtn = _NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(90, 377, 281, 420),
IDS_MENUBTN_HOTKEYS, MachGuiStartupScreens::HOTKEYS));
MachGuiMenuButton* pOptionsBtn = _NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(344, 72, 536, 114),
IDS_MENUBTN_OPTIONS, MachGuiStartupScreens::OPTIONS));
MachGuiMenuButton* pSaveBtn = _NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(344, 178, 536, 221),
IDS_MENUBTN_SAVEGAME, MachGuiStartupScreens::SAVEGAME));
MachGuiMenuButton* pLoadBtn = _NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(344, 282, 536, 325),
IDS_MENUBTN_LOADGAME, MachGuiStartupScreens::LOADGAME));
MachGuiMenuButton* pExitBtn;
if( not NetNetwork::instance().isLobbiedGame() )
pExitBtn = _NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 344, 377, 536, 419 ), IDS_MENUBTN_EXITGAME, MachGuiStartupScreens::EXIT ) );
pExitBtn = _NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(344, 377, 536, 419), IDS_MENUBTN_EXITGAME,
MachGuiStartupScreens::EXIT));
else
pExitBtn = _NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 344, 377, 536, 419 ), IDS_MENUBTN_EXIT_TO_ZONE, MachGuiStartupScreens::EXIT ) );
pExitBtn = _NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(344, 377, 536, 419),
IDS_MENUBTN_EXIT_TO_ZONE, MachGuiStartupScreens::EXIT));

// Setup nav overrides
pContinueBtn->setRightNavControl( pOptionsBtn );
Expand Down
12 changes: 8 additions & 4 deletions src/libdev/machgui/ctxjoin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,14 @@ MachGuiCtxJoin::MachGuiCtxJoin( MachGuiStartupScreens* pStartupScreens )
{

WAYNE_STREAM("JOINGAME_LB_MAXY: " << JOINGAME_LB_MAXY << std::endl );
pJoinBtn_ = _NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 414, 51, 605, 93 ), IDS_MENUBTN_JOIN, MachGuiStartupScreens::JOIN ) );
pCreateBtn_ = _NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 414, 157, 605, 200 ), IDS_MENUBTN_CREATE, MachGuiStartupScreens::CREATE ) );
pShowGamesBtn_ = _NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 414, 251, 605, 293 ), IDS_MENUBTN_SHOWGAMES, MachGuiStartupScreens::SHOWGAMES ) );
MachGuiMenuButton* pCancelBtn = _NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 414, 348, 605, 390 ), IDS_MENUBTN_CANCEL, MachGuiStartupScreens::EXIT ) );
pJoinBtn_ = _NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(414, 51, 605, 93), IDS_MENUBTN_JOIN,
MachGuiStartupScreens::JOIN));
pCreateBtn_ = _NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(414, 157, 605, 200), IDS_MENUBTN_CREATE,
MachGuiStartupScreens::CREATE));
pShowGamesBtn_ = _NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(414, 251, 605, 293),
IDS_MENUBTN_SHOWGAMES, MachGuiStartupScreens::SHOWGAMES));
MachGuiMenuButton* pCancelBtn = _NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(414, 348, 605, 390),
IDS_MENUBTN_CANCEL, MachGuiStartupScreens::EXIT));

pCancelBtn->escapeControl( true );
pShowGamesBtn_->defaultControl( true );
Expand Down
9 changes: 6 additions & 3 deletions src/libdev/machgui/ctxload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,12 @@ MachGuiCtxLoad::MachGuiCtxLoad( MachGuiStartupScreens* pStartupScreens )
pStartupScreens->desiredCdTrack( MachGuiStartupScreens::MENU_MUSIC );

// Standard buttons...
pOkBtn_ = _NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 364, 127, 555, 170 ), IDS_MENUBTN_OK, MachGuiStartupScreens::BE_DUMMY_OK ) );
pDeleteBtn_ = _NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 364, 230, 555, 274 ), IDS_MENUBTN_DELETE, MachGuiStartupScreens::BE_DELETE ) );
MachGuiMenuButton* pCancelBtn = _NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 364, 328, 555, 371 ), IDS_MENUBTN_CANCEL, MachGuiStartupScreens::EXIT ) );
pOkBtn_ = _NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(364, 127, 555, 170), IDS_MENUBTN_OK,
MachGuiStartupScreens::BE_DUMMY_OK));
pDeleteBtn_ = _NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(364, 230, 555, 274), IDS_MENUBTN_DELETE,
MachGuiStartupScreens::BE_DELETE));
MachGuiMenuButton* pCancelBtn = _NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(364, 328, 555, 371),
IDS_MENUBTN_CANCEL, MachGuiStartupScreens::EXIT));

pCancelBtn->escapeControl( true );
pOkBtn_->defaultControl( true );
Expand Down
12 changes: 8 additions & 4 deletions src/libdev/machgui/ctxmmenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,14 @@ MachGuiCtxMainMenu::MachGuiCtxMainMenu( MachGuiStartupScreens* pStartupScreens )
MachGuiMenuButton* pExitBtn = _NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 117, 410, 275, 445 ), IDS_MENUBTN_EXIT, MachGuiStartupScreens::BE_DUMMY_OK ) );

#else
_NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 368, 40, 527, 75 ), IDS_MENUBTN_SINGLEPLAYER, MachGuiStartupScreens::SINGLEPLAYER ) );
_NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 368, 130, 527, 165 ), IDS_MENUBTN_MULTIPLAYER, MachGuiStartupScreens::MULTIPLAYER ) );
_NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 368, 217, 527, 252 ), IDS_MENUBTN_OPTIONS, MachGuiStartupScreens::OPTIONS ) );
MachGuiMenuButton* pExitBtn = _NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 368, 297, 527, 332 ), IDS_MENUBTN_EXIT, MachGuiStartupScreens::BE_DUMMY_OK ) );
_NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(368, 40, 527, 75), IDS_MENUBTN_SINGLEPLAYER,
MachGuiStartupScreens::SINGLEPLAYER));
_NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(368, 130, 527, 165), IDS_MENUBTN_MULTIPLAYER,
MachGuiStartupScreens::MULTIPLAYER));
_NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(368, 217, 527, 252), IDS_MENUBTN_OPTIONS,
MachGuiStartupScreens::OPTIONS));
MachGuiMenuButton* pExitBtn = _NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(368, 297, 527, 332),
IDS_MENUBTN_EXIT, MachGuiStartupScreens::BE_DUMMY_OK));

#endif

Expand Down
6 changes: 4 additions & 2 deletions src/libdev/machgui/ctxmulti.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@ MachGuiCtxMultiplayer::MachGuiCtxMultiplayer( MachGuiStartupScreens* pStartupScr
: MachGuiStartupScreenContext( pStartupScreens ),
animations_( pStartupScreens, SysPathName("gui/menu/sb_anims.anm") )
{
_NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 56, 407, 246, 449 ), IDS_MENUBTN_OK, MachGuiStartupScreens::JOIN ) );
MachGuiMenuButton* pExitBtn = _NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 311,407, 502, 449 ), IDS_MENUBTN_CANCEL, MachGuiStartupScreens::EXIT ) );
_NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(56, 407, 246, 449), IDS_MENUBTN_OK,
MachGuiStartupScreens::JOIN));
MachGuiMenuButton* pExitBtn = _NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(311, 407, 502, 449),
IDS_MENUBTN_CANCEL, MachGuiStartupScreens::EXIT));
pExitBtn->escapeControl( true );
GuiBmpFont font( GuiBmpFont::getFont("gui/menu/largefnt.bmp") );
pSingleLineEditBox_ = _NEW( MachGuiSingleLineEditBox( pStartupScreens, Gui::Box( 106, 34, 444, 34 + font.charHeight() ), font ) );
Expand Down
6 changes: 4 additions & 2 deletions src/libdev/machgui/ctxoptns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,10 @@ MachGuiCtxOptions::MachGuiCtxOptions( MachGuiStartupScreens* pStartupScreens )
MachGuiOptionsLayout screenLayout( SysPathName( "gui/layout/options.dat" ) );

// Create buttons
MachGuiMenuButton* pOkBtn = _NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 85, 377, 291, 423 ), IDS_MENUBTN_OK, MachGuiStartupScreens::BE_DUMMY_OK ) );
MachGuiMenuButton* pCancelBtn = _NEW( MachGuiMenuButton( pStartupScreens, Gui::Box( 337,377, 543, 423 ), IDS_MENUBTN_CANCEL, MachGuiStartupScreens::BE_DUMMY_EXIT ) );
MachGuiMenuButton* pOkBtn = _NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(85, 377, 291, 423),
IDS_MENUBTN_OK, MachGuiStartupScreens::BE_DUMMY_OK));
MachGuiMenuButton* pCancelBtn = _NEW(MachGuiMenuButton(pStartupScreens, pStartupScreens, Gui::Box(337, 377, 543, 423),
IDS_MENUBTN_CANCEL, MachGuiStartupScreens::BE_DUMMY_EXIT));
pCancelBtn->escapeControl( true );
pOkBtn->defaultControl( true );

Expand Down
Loading

0 comments on commit 1f08fe1

Please sign in to comment.