Skip to content

Commit

Permalink
Cleanued up the base menu class build includes
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatyas committed May 9, 2024
1 parent faab92f commit 2ab1ca4
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 31 deletions.
36 changes: 20 additions & 16 deletions src/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,31 +55,35 @@ add_library(CommonFiles STATIC
ResourceManager.h
sfx.cpp
sfx.h
TileTypes.cpp
TileTypes.h
TilesetManager.cpp
TilesetManager.h
ui/MI_MapPreview.cpp
ui/MI_MapPreview.h
TileTypes.cpp
TileTypes.h
uicontrol.cpp
uicontrol.h
uimenu.cpp
uimenu.h
ui/MenuCode.h
ui/MI_Button.cpp
ui/MI_Button.h
ui/MI_Image.cpp
ui/MI_Image.h
ui/MI_ImageSelectField.cpp
ui/MI_ImageSelectField.h
ui/MI_MapField.cpp
ui/MI_MapField.h
ui/MI_MapPreview.cpp
ui/MI_MapPreview.h
ui/MI_ScoreText.cpp
ui/MI_ScoreText.h
ui/MI_SelectField.cpp
ui/MI_SelectField.h
ui/MI_ImageSelectField.cpp
ui/MI_ImageSelectField.h
ui/MI_SliderField.cpp
ui/MI_SliderField.h
ui/MI_TextField.h
ui/MI_TextField.cpp
ui/MI_Button.h
ui/MI_Button.cpp
ui/MI_Text.h
ui/MI_Text.cpp
ui/MI_ScoreText.h
ui/MI_ScoreText.cpp
ui/MI_Image.h
ui/MI_Image.cpp
ui/MenuCode.h
ui/MI_Text.h
ui/MI_TextField.cpp
ui/MI_TextField.h
)

if (USE_PNG_SAVE AND NOT USE_SDL2_LIBS)
Expand Down
14 changes: 5 additions & 9 deletions src/common/uicontrol.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
#include "uicontrol.h"

#include "GameValues.h"
#include "ResourceManager.h"

#include <cassert>
#include <cmath>
#include <cstring>

extern CGameValues game_values;
extern CResourceManager* rm;


UI_Control::UI_Control(short x, short y)
Expand All @@ -18,6 +10,7 @@ UI_Control::UI_Control(short x, short y)
neighborControls.fill(nullptr);
}


UI_Control& UI_Control::operator= (const UI_Control& other)
{
if (this != &other) {
Expand All @@ -37,12 +30,15 @@ UI_Control& UI_Control::operator= (const UI_Control& other)
return *this;
}


UI_Control::UI_Control(const UI_Control& other)
{
*this = other;
}

void UI_Control::SetNeighbor(unsigned short iNeighbor, UI_Control* uiControl) {

void UI_Control::SetNeighbor(unsigned short iNeighbor, UI_Control* uiControl)
{
assert(iNeighbor < neighborControls.size());
neighborControls[iNeighbor] = uiControl;
}
4 changes: 0 additions & 4 deletions src/smw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ add_executable(smw WIN32

../common/movingplatform.cpp
../common/movingplatform.h
../common/uicontrol.cpp
../common/uicontrol.h
../common/uimenu.cpp
../common/uimenu.h
)

#
Expand Down
2 changes: 0 additions & 2 deletions src/worldeditor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ add_executable(smw-worldedit WIN32
../smw/ui/MI_PowerupSlider.h
../smw/ui/MI_FrenzyModeOptions.cpp
../smw/ui/MI_FrenzyModeOptions.h
../common/uimenu.cpp
../common/uimenu.h
worldeditor.cpp
)
if (WIN32)
Expand Down

0 comments on commit 2ab1ca4

Please sign in to comment.