-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
695 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include "BPSection.h" | ||
|
||
#include "BasePopup.h" | ||
|
||
namespace game { | ||
namespace frontend { | ||
namespace ui { | ||
namespace popup { | ||
namespace base_popup { | ||
|
||
BPSection::BPSection( BasePopup* popup, const std::string class_name ) | ||
: Section( popup->GetGame(), "BP" + class_name, "BB" ) | ||
, m_popup( popup ) { | ||
m_config.no_outer_border = true; | ||
m_config.no_inner_background = true; | ||
} | ||
|
||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#pragma once | ||
|
||
#include "game/frontend/ui/Section.h" | ||
|
||
namespace game { | ||
namespace frontend { | ||
namespace ui { | ||
namespace popup { | ||
namespace base_popup { | ||
|
||
class BasePopup; | ||
|
||
CLASS( BPSection, Section ) | ||
|
||
BPSection( BasePopup* popup, const std::string class_name = "" ); | ||
|
||
protected: | ||
BasePopup* const m_popup = nullptr; | ||
|
||
private: | ||
|
||
}; | ||
|
||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#include "Buttons.h" | ||
|
||
#include "ui/object/Button.h" | ||
|
||
#include "BasePopup.h" | ||
|
||
namespace game { | ||
namespace frontend { | ||
namespace ui { | ||
namespace popup { | ||
namespace base_popup { | ||
|
||
Buttons::Buttons( BasePopup* popup ) | ||
: BPSection( popup, "Buttons" ) {} | ||
|
||
void Buttons::Create() { | ||
BPSection::Create(); | ||
|
||
NEW( m_buttons.rename, ::ui::object::Button, "PopupButtonOkCancel" ); | ||
m_buttons.rename->SetAlign( ::ui::ALIGN_LEFT | ::ui::ALIGN_VCENTER ); | ||
m_buttons.rename->SetLeft( 3 ); | ||
m_buttons.rename->SetRight( 2 ); | ||
m_buttons.rename->SetLabel( "RENAME" ); | ||
m_buttons.rename->On( | ||
::ui::event::EV_BUTTON_CLICK, EH( this ) { | ||
Log( "TODO: RENAME" ); | ||
return true; | ||
} | ||
); | ||
AddChild( m_buttons.rename ); | ||
|
||
NEW( m_buttons.ok, ::ui::object::Button, "PopupButtonOkCancel" ); | ||
m_buttons.ok->SetAlign( ::ui::ALIGN_RIGHT | ::ui::ALIGN_VCENTER ); | ||
m_buttons.ok->SetLeft( 2 ); | ||
m_buttons.ok->SetRight( 3 ); | ||
m_buttons.ok->SetLabel( "OK" ); | ||
m_buttons.ok->On( | ||
::ui::event::EV_BUTTON_CLICK, EH( this ) { | ||
m_popup->Close(); | ||
return true; | ||
} | ||
); | ||
AddChild( m_buttons.ok ); | ||
|
||
} | ||
|
||
void Buttons::Destroy() { | ||
|
||
RemoveChild( m_buttons.rename ); | ||
RemoveChild( m_buttons.ok ); | ||
|
||
BPSection::Destroy(); | ||
} | ||
|
||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#pragma once | ||
|
||
#include "BPSection.h" | ||
|
||
namespace ui::object { | ||
class Button; | ||
} | ||
|
||
namespace game { | ||
namespace frontend { | ||
namespace ui { | ||
namespace popup { | ||
namespace base_popup { | ||
|
||
CLASS( Buttons, BPSection ) | ||
|
||
Buttons( BasePopup* popup ); | ||
|
||
void Create() override; | ||
void Destroy() override; | ||
|
||
private: | ||
struct { | ||
::ui::object::Button* rename = nullptr; | ||
::ui::object::Button* ok = nullptr; | ||
} m_buttons = {}; | ||
|
||
}; | ||
|
||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include "CenterArea.h" | ||
|
||
namespace game { | ||
namespace frontend { | ||
namespace ui { | ||
namespace popup { | ||
namespace base_popup { | ||
|
||
CenterArea::CenterArea( BasePopup* popup ) | ||
: BPSection( popup, "CenterArea" ) {} | ||
|
||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#pragma once | ||
|
||
#include "BPSection.h" | ||
|
||
namespace game { | ||
namespace frontend { | ||
namespace ui { | ||
namespace popup { | ||
namespace base_popup { | ||
|
||
CLASS( CenterArea, BPSection ) | ||
|
||
CenterArea( BasePopup* popup ); | ||
|
||
private: | ||
|
||
}; | ||
|
||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include "Commerce.h" | ||
|
||
namespace game { | ||
namespace frontend { | ||
namespace ui { | ||
namespace popup { | ||
namespace base_popup { | ||
|
||
Commerce::Commerce( BasePopup* popup ) | ||
: BPSection( popup, "Commerce" ) {} | ||
|
||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.