Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework button code #9525

Open
wants to merge 55 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
66d607e
Add height dimension to customNormalButton
zenseii Feb 3, 2025
841894d
First pass of adjusting to changes
zenseii Feb 3, 2025
81c7c69
Code style
zenseii Feb 3, 2025
7ca3120
Fix copyright year
zenseii Feb 3, 2025
7ffd3c8
code style
zenseii Feb 3, 2025
7f745d8
Remove the empty medium button
zenseii Feb 3, 2025
81ccf99
remove unused view world exit variable
zenseii Feb 3, 2025
e5e2958
add consts
zenseii Feb 3, 2025
774b4d5
Fix y-change for pressed state in makeButtonSprites
zenseii Feb 4, 2025
7a99d54
Add code to generate taller and thinner buttons
zenseii Feb 4, 2025
908a0f0
generate puzzle exit
zenseii Feb 4, 2025
183d2a9
Remove German specific images
zenseii Feb 4, 2025
620c416
Remove Italian specific images
zenseii Feb 4, 2025
edbf1c4
Remove shadows for language-specific
zenseii Feb 4, 2025
fc0066f
Re-add German specific buttons
zenseii Feb 4, 2025
a495b2c
Remove fixed TODO comment
zenseii Feb 4, 2025
f31f8ed
Re-add original button shadows
zenseii Feb 4, 2025
1645d02
Revert removing shadow from battle only
zenseii Feb 4, 2025
a0831ee
Move Battle Only and fix y offset
zenseii Feb 4, 2025
15045d3
code style
zenseii Feb 4, 2025
b41d63e
Revert style changes loadgame
zenseii Feb 4, 2025
a863993
remove include game_loadgame
zenseii Feb 4, 2025
dae8d83
change reference
zenseii Feb 4, 2025
58562e9
revert small change
zenseii Feb 4, 2025
8085425
Revert small style changes
zenseii Feb 4, 2025
8b3df32
remove missed for loop
zenseii Feb 4, 2025
b1ae5c3
Re-add original asset for viewworld exit
zenseii Feb 4, 2025
e36fb9b
Add black background
zenseii Feb 4, 2025
f7ab1b1
Rename getTextAdapted function
zenseii Feb 4, 2025
ac74a60
add background parameter to custom Buttons
zenseii Feb 4, 2025
c584d13
Fix transparency bugs in kingdom overview
zenseii Feb 4, 2025
1df9788
Remove missed save call
zenseii Feb 4, 2025
39fecc1
Add Polish and French Min buttons
zenseii Feb 4, 2025
4a22e5c
Use original min buttons for original assets
zenseii Feb 4, 2025
1216fd5
address comments
zenseii Feb 4, 2025
5707889
Tidy
zenseii Feb 4, 2025
b4fb9fd
fix types
zenseii Feb 4, 2025
3679a55
clang tidy
zenseii Feb 4, 2025
498d755
code style
zenseii Feb 4, 2025
d937468
Remove unnecessary qualification
zenseii Feb 5, 2025
4ebc444
Fix wrong arguments
zenseii Feb 5, 2025
508907a
Add evil button conversion table
zenseii Feb 5, 2025
8f29458
Use good to evil button conversion
zenseii Feb 6, 2025
67f9d10
Adjust max min recruit button placement
zenseii Feb 6, 2025
a3814a6
Improve button shine
zenseii Feb 6, 2025
e3aefa2
Copyright year
zenseii Feb 6, 2025
4a97802
Unite evil and uniform max/min button generations
zenseii Feb 6, 2025
709ca93
revert unrelated change
zenseii Feb 6, 2025
d96ac95
fix '...'
zenseii Feb 6, 2025
b64f1ac
Style fix
zenseii Feb 6, 2025
e75458d
Copyright years + wide -> tall
zenseii Feb 6, 2025
c7d8436
Change to Size type for createNormal parameter
zenseii Feb 6, 2025
094c7ab
Code style and style nits
zenseii Feb 6, 2025
cdc55b6
Don't generate button twice for evil select
zenseii Feb 6, 2025
4bea952
Merge remote-tracking branch 'upstream/master' into rework-button-code
zenseii Feb 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion src/engine/pal.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/***************************************************************************
* fheroes2: https://github.com/ihhub/fheroes2 *
* Copyright (C) 2020 - 2024 *
* Copyright (C) 2020 - 2025 *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
Expand Down Expand Up @@ -138,6 +138,17 @@ namespace
224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
};

const std::vector<uint8_t> goodToEvilButtonTable = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 14, 15, 16, 17, 17, 18, 19, 22, 21, 22, 23, 24, 25, 26, 26, 27, 32, 29, 30, 31, 32, 58, 59, 60, 61, 35, 63,
64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
};

const std::vector<uint8_t> purpleTable
= { 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 131, 132, 133, 133, 134, 135, 136, 136, 137, 138, 139, 139, 140, 141, 142, 142, 143, 144, 145,
145, 146, 147, 148, 149, 149, 150, 151, 131, 132, 133, 134, 134, 135, 136, 137, 138, 138, 139, 140, 141, 142, 142, 143, 144, 145, 146, 146, 147,
Expand Down Expand Up @@ -229,6 +240,10 @@ const std::vector<uint8_t> & PAL::GetPalette( const PaletteType type )
assert( goodToEvilInterfaceTable.size() == paletteSize );
return goodToEvilInterfaceTable;
}
case PaletteType::GOOD_TO_EVIL_BUTTON: {
assert( goodToEvilButtonTable.size() == paletteSize );
return goodToEvilButtonTable;
}
case PaletteType::PURPLE: {
assert( purpleTable.size() == paletteSize );
return purpleTable;
Expand Down
1 change: 1 addition & 0 deletions src/engine/pal.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ namespace PAL
MIRROR_IMAGE,
DARKENING, // for disabled buttons
GOOD_TO_EVIL_INTERFACE, // a custom palette for converting Good Interface images into Evil Interface images.
GOOD_TO_EVIL_BUTTON, // for converting Good style buttons into Evil style buttons.
PURPLE, // For random object images.
CUSTOM
};
Expand Down
1,159 changes: 454 additions & 705 deletions src/fheroes2/agg/agg_image.cpp

Large diffs are not rendered by default.

11 changes: 5 additions & 6 deletions src/fheroes2/agg/icn.h
Original file line number Diff line number Diff line change
Expand Up @@ -908,10 +908,10 @@ namespace ICN
ROUTERED,
YELLOW_FONT,
YELLOW_SMALLFONT,
BUYMAX,
BUTTON_WELL_MAX,
BTNBATTLEONLY,
BTNGIFT_GOOD,
BTNGIFT_EVIL,
BUTTON_GIFT_GOOD,
BUTTON_GIFT_EVIL,
CSLMARKER,

GRAY_FONT,
Expand Down Expand Up @@ -949,7 +949,6 @@ namespace ICN
MONO_CURSOR_ADVENTURE_MAP,

DISMISS_HERO_DISABLED_BUTTON,
NEW_CAMPAIGN_DISABLED_BUTTON,

KNIGHT_CASTLE_RIGHT_FARM,
KNIGHT_CASTLE_LEFT_FARM,
Expand All @@ -976,6 +975,8 @@ namespace ICN
UNIFORMBAK_GOOD,
UNIFORMBAK_EVIL,
REDBAK_SMALL_VERTICAL,
BLACKBAK,
BROWNBAK,
WELLBKG_EVIL,
CASLWIND_EVIL,
CASLXTRA_EVIL,
Expand All @@ -998,8 +999,6 @@ namespace ICN

EMPTY_GOOD_BUTTON,
EMPTY_EVIL_BUTTON,
EMPTY_GOOD_MEDIUM_BUTTON,
EMPTY_EVIL_MEDIUM_BUTTON,
EMPTY_POL_BUTTON,
EMPTY_GUILDWELL_BUTTON,
EMPTY_VERTICAL_GOOD_BUTTON,
Expand Down
6 changes: 3 additions & 3 deletions src/fheroes2/castle/castle_well.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/***************************************************************************
* fheroes2: https://github.com/ihhub/fheroes2 *
* Copyright (C) 2019 - 2024 *
* Copyright (C) 2019 - 2025 *
* *
* Free Heroes2 Engine: http://sourceforge.net/projects/fheroes2 *
* Copyright (C) 2009 by Andrey Afletdinov <[email protected]> *
Expand Down Expand Up @@ -215,7 +215,7 @@ void Castle::_openWell()
const int32_t buttonOffsetY = roi.y + bottomBarOffsetY;

// MAX button.
fheroes2::Button buttonMax( roi.x, buttonOffsetY, ICN::BUYMAX, 0, 1 );
fheroes2::Button buttonMax( roi.x, buttonOffsetY, ICN::BUTTON_WELL_MAX, 0, 1 );

// EXIT button.
fheroes2::Button buttonExit( roi.x + roi.width - fheroes2::AGG::GetICN( ICN::BUTTON_GUILDWELL_EXIT, 0 ).width(), buttonOffsetY, ICN::BUTTON_GUILDWELL_EXIT, 0, 1 );
Expand Down Expand Up @@ -376,7 +376,7 @@ void Castle::_wellRedrawBackground( fheroes2::Image & background ) const
const fheroes2::Sprite & bottomBar = fheroes2::AGG::GetICN( ICN::SMALLBAR, 0 );
const int32_t barHeight = bottomBar.height();
const int32_t exitWidth = fheroes2::AGG::GetICN( ICN::BUTTON_GUILDWELL_EXIT, 0 ).width();
const int32_t buttonMaxWidth = fheroes2::AGG::GetICN( ICN::BUYMAX, 0 ).width();
const int32_t buttonMaxWidth = fheroes2::AGG::GetICN( ICN::BUTTON_WELL_MAX, 0 ).width();
// ICN::SMALLBAR image's first column contains all black pixels. This should not be drawn.
fheroes2::Copy( bottomBar, 1, 0, background, buttonMaxWidth, bottomBarOffsetY, backgroundWidth / 2 - buttonMaxWidth, barHeight );
fheroes2::Copy( bottomBar, bottomBar.width() - backgroundWidth / 2 + exitWidth - 1, 0, background, backgroundWidth / 2, bottomBarOffsetY,
Expand Down
4 changes: 2 additions & 2 deletions src/fheroes2/dialog/dialog_marketplace.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/***************************************************************************
* fheroes2: https://github.com/ihhub/fheroes2 *
* Copyright (C) 2019 - 2024 *
* Copyright (C) 2019 - 2025 *
* *
* Free Heroes2 Engine: http://sourceforge.net/projects/fheroes2 *
* Copyright (C) 2009 by Andrey Afletdinov <[email protected]> *
Expand Down Expand Up @@ -91,7 +91,7 @@ namespace
const bool isEvilInterface = conf.isEvilInterfaceEnabled();

const int tradeButtonIcnID = isEvilInterface ? ICN::BUTTON_SMALL_TRADE_EVIL : ICN::BUTTON_SMALL_TRADE_GOOD;
const int giftButtonIcnID = isEvilInterface ? ICN::BTNGIFT_EVIL : ICN::BTNGIFT_GOOD;
const int giftButtonIcnID = isEvilInterface ? ICN::BUTTON_GIFT_EVIL : ICN::BUTTON_GIFT_GOOD;

buttonGift.setICNInfo( giftButtonIcnID, 0, 1 );
buttonTrade.setICNInfo( tradeButtonIcnID, 0, 1 );
Expand Down
7 changes: 4 additions & 3 deletions src/fheroes2/dialog/dialog_recruit.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/***************************************************************************
* fheroes2: https://github.com/ihhub/fheroes2 *
* Copyright (C) 2019 - 2024 *
* Copyright (C) 2019 - 2025 *
* *
* Free Heroes2 Engine: http://sourceforge.net/projects/fheroes2 *
* Copyright (C) 2009 by Andrey Afletdinov <[email protected]> *
Expand Down Expand Up @@ -314,10 +314,11 @@ Troop Dialog::RecruitMonster( const Monster & monster0, const uint32_t available
fheroes2::Button buttonCancel( dst_pt.x, dst_pt.y, buttonId, 0, 1 );
drawButtonShadow( display, buttonId, 0, dst_pt );

dst_pt.x = dialogOffset.x + 218;
buttonId = isEvilInterface ? ICN::BUTTON_SMALL_MAX_EVIL : ICN::BUTTON_SMALL_MAX_GOOD;
const int32_t buttonMaxWidth = fheroes2::AGG ::GetICN( buttonId, 0 ).width();
dst_pt.x = dialogOffset.x + 253 - buttonMaxWidth / 2;
dst_pt.y = dialogOffset.y + 140;

buttonId = isEvilInterface ? ICN::BUTTON_SMALL_MAX_EVIL : ICN::BUTTON_SMALL_MAX_GOOD;
fheroes2::Button buttonMax( dst_pt.x, dst_pt.y, buttonId, 0, 1 );
fheroes2::Button buttonMin( dst_pt.x, dst_pt.y, isEvilInterface ? ICN::BUTTON_SMALL_MIN_EVIL : ICN::BUTTON_SMALL_MIN_GOOD, 0, 1 );
drawButtonShadow( display, buttonId, 0, dst_pt );
Expand Down
8 changes: 4 additions & 4 deletions src/fheroes2/dialog/dialog_selectcount.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/***************************************************************************
* fheroes2: https://github.com/ihhub/fheroes2 *
* Copyright (C) 2019 - 2024 *
* Copyright (C) 2019 - 2025 *
* *
* Free Heroes2 Engine: http://sourceforge.net/projects/fheroes2 *
* Copyright (C) 2009 by Andrey Afletdinov <[email protected]> *
Expand Down Expand Up @@ -232,11 +232,11 @@ bool Dialog::inputString( const fheroes2::TextBase & title, const fheroes2::Text
// Generate a button to open the Virtual Keyboard window.
fheroes2::Sprite releasedVirtualKB;
fheroes2::Sprite pressedVirtualKB;
const int32_t buttonVirtualKBWidth = 40;
const fheroes2::Size buttonVirtualKBSize{ 40, 25 };

makeButtonSprites( releasedVirtualKB, pressedVirtualKB, "...", buttonVirtualKBWidth, isEvilInterface, true );
makeButtonSprites( releasedVirtualKB, pressedVirtualKB, "...", buttonVirtualKBSize, isEvilInterface, isEvilInterface ? ICN::UNIFORMBAK_EVIL : ICN::UNIFORMBAK_GOOD );
// To center the button horizontally we have to take into account that actual button sprite is 10 pixels longer then the requested button width.
fheroes2::ButtonSprite buttonVirtualKB = makeButtonWithBackground( frameBoxArea.x + ( frameBoxArea.width - buttonVirtualKBWidth - 10 ) / 2, dst_pt.y - 30,
fheroes2::ButtonSprite buttonVirtualKB = makeButtonWithBackground( frameBoxArea.x + ( frameBoxArea.width - buttonVirtualKBSize.width - 10 ) / 2, dst_pt.y - 30,
releasedVirtualKB, pressedVirtualKB, display );

if ( result.empty() ) {
Expand Down
4 changes: 2 additions & 2 deletions src/fheroes2/dialog/dialog_selectfile.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/***************************************************************************
* fheroes2: https://github.com/ihhub/fheroes2 *
* Copyright (C) 2019 - 2024 *
* Copyright (C) 2019 - 2025 *
* *
* Free Heroes2 Engine: http://sourceforge.net/projects/fheroes2 *
* Copyright (C) 2009 by Andrey Afletdinov <[email protected]> *
Expand Down Expand Up @@ -376,7 +376,7 @@ namespace
if ( isEditing ) {
// Render a button to open the Virtual Keyboard window.
buttonVirtualKB = std::make_unique<fheroes2::ButtonSprite>();
background.renderButtonSprite( *buttonVirtualKB, "...", 48, { 0, 7 }, isEvilInterface, fheroes2::StandardWindow::Padding::BOTTOM_CENTER );
background.renderButtonSprite( *buttonVirtualKB, "...", { 48, 25 }, { 0, 7 }, isEvilInterface, fheroes2::StandardWindow::Padding::BOTTOM_CENTER );

Game::passAnimationDelay( Game::DelayType::CURSOR_BLINK_DELAY );
}
Expand Down
4 changes: 2 additions & 2 deletions src/fheroes2/editor/editor_save_map_window.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/***************************************************************************
* fheroes2: https://github.com/ihhub/fheroes2 *
* Copyright (C) 2019 - 2024 *
* Copyright (C) 2019 - 2025 *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
Expand Down Expand Up @@ -312,7 +312,7 @@ namespace Editor

// Render a button to open the Virtual Keyboard window.
fheroes2::ButtonSprite buttonVirtualKB;
background.renderButtonSprite( buttonVirtualKB, "...", 48, { 0, 7 }, isEvilInterface, fheroes2::StandardWindow::Padding::BOTTOM_CENTER );
background.renderButtonSprite( buttonVirtualKB, "...", { 48, 25 }, { 0, 7 }, isEvilInterface, fheroes2::StandardWindow::Padding::BOTTOM_CENTER );

Game::passAnimationDelay( Game::DelayType::CURSOR_BLINK_DELAY );

Expand Down
8 changes: 3 additions & 5 deletions src/fheroes2/game/game_loadgame.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/***************************************************************************
* fheroes2: https://github.com/ihhub/fheroes2 *
* Copyright (C) 2019 - 2024 *
* Copyright (C) 2019 - 2025 *
* *
* Free Heroes2 Engine: http://sourceforge.net/projects/fheroes2 *
* Copyright (C) 2009 by Andrey Afletdinov <[email protected]> *
Expand Down Expand Up @@ -29,7 +29,6 @@
#include <ostream>
#include <string>

#include "agg_image.h"
#include "audio.h"
#include "audio_manager.h"
#include "cursor.h"
Expand Down Expand Up @@ -153,8 +152,7 @@ fheroes2::GameMode Game::LoadGame()
const fheroes2::Point buttonPos = fheroes2::drawButtonPanel();

fheroes2::Button buttonStandardGame( 0, 0, ICN::BUTTON_STANDARD_GAME, 0, 1 );
fheroes2::ButtonSprite buttonCampaignGame( buttonPos.x, buttonPos.y + buttonYStep * 1, fheroes2::AGG::GetICN( ICN::BUTTON_CAMPAIGN_GAME, 0 ),
fheroes2::AGG::GetICN( ICN::BUTTON_CAMPAIGN_GAME, 1 ), fheroes2::AGG::GetICN( ICN::NEW_CAMPAIGN_DISABLED_BUTTON, 0 ) );
fheroes2::Button buttonCampaignGame( 0, 0, ICN::BUTTON_CAMPAIGN_GAME, 0, 1 );
fheroes2::Button buttonMultiplayerGame( 0, 0, ICN::BUTTON_MULTIPLAYER_GAME, 0, 1 );
fheroes2::Button buttonCancel( 0, 0, ICN::BUTTON_LARGE_CANCEL, 0, 1 );

Expand All @@ -170,7 +168,7 @@ fheroes2::GameMode Game::LoadGame()
buttons[i]->draw();
}

// following the cancel button in newgame
// following the cancel button in new game
buttonCancel.setPosition( buttonPos.x, buttonPos.y + buttonYStep * 5 );
buttonCancel.draw();

Expand Down
9 changes: 4 additions & 5 deletions src/fheroes2/game/game_newgame.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/***************************************************************************
* fheroes2: https://github.com/ihhub/fheroes2 *
* Copyright (C) 2019 - 2024 *
* Copyright (C) 2019 - 2025 *
* *
* Free Heroes2 Engine: http://sourceforge.net/projects/fheroes2 *
* Copyright (C) 2009 by Andrey Afletdinov <[email protected]> *
Expand Down Expand Up @@ -484,7 +484,7 @@ fheroes2::GameMode Game::NewNetwork()

fheroes2::Button buttonHost( buttonPos.x, buttonPos.y, ICN::BTNNET, 0, 1 );
fheroes2::Button buttonGuest( buttonPos.x, buttonPos.y + buttonYStep, ICN::BTNNET, 2, 3 );
fheroes2::Button buttonCancel( buttonPos.x, buttonPos.y + buttonYStep * 2, ICN::BTNMP, 8, 9 );
fheroes2::Button buttonCancel( buttonPos.x, buttonPos.y + buttonYStep * 5, ICN::BUTTON_LARGE_CANCEL, 0, 1 );

buttonHost.draw();
buttonGuest.draw();
Expand Down Expand Up @@ -538,8 +538,7 @@ fheroes2::GameMode Game::NewGame( const bool isProbablyDemoVersion )
const fheroes2::Point buttonPos = fheroes2::drawButtonPanel();

fheroes2::Button buttonStandardGame( buttonPos.x, buttonPos.y, ICN::BUTTON_STANDARD_GAME, 0, 1 );
fheroes2::ButtonSprite buttonCampaignGame( buttonPos.x, buttonPos.y + buttonYStep * 1, fheroes2::AGG::GetICN( ICN::BUTTON_CAMPAIGN_GAME, 0 ),
fheroes2::AGG::GetICN( ICN::BUTTON_CAMPAIGN_GAME, 1 ), fheroes2::AGG::GetICN( ICN::NEW_CAMPAIGN_DISABLED_BUTTON, 0 ) );
fheroes2::Button buttonCampaignGame( buttonPos.x, buttonPos.y + buttonYStep * 1, ICN::BUTTON_CAMPAIGN_GAME, 0, 1 );
fheroes2::Button buttonMultiGame( buttonPos.x, buttonPos.y + buttonYStep * 2, ICN::BUTTON_MULTIPLAYER_GAME, 0, 1 );
fheroes2::Button buttonBattleGame( buttonPos.x, buttonPos.y + buttonYStep * 3, ICN::BTNBATTLEONLY, 0, 1 );
fheroes2::Button buttonSettings( buttonPos.x, buttonPos.y + buttonYStep * 4, ICN::BUTTON_LARGE_CONFIG, 0, 1 );
Expand Down Expand Up @@ -646,7 +645,7 @@ fheroes2::GameMode Game::NewMulti()
fheroes2::Display::instance().render();

LocalEvent & le = LocalEvent::Get();
// newgame loop
// new game loop
while ( le.HandleEvents() ) {
buttonHotSeat.drawOnState( le.isMouseLeftButtonPressedInArea( buttonHotSeat.area() ) );
if ( buttonNetwork.isEnabled() ) {
Expand Down
Loading
Loading