Changed size of hexagons.

+ ModeButton: Added another constructor
This commit is contained in:
YuSanka 2020-02-10 12:46:07 +01:00
parent d81f7d8465
commit a5de3386ac
3 changed files with 31 additions and 7 deletions

View file

@ -255,9 +255,9 @@ public:
void msw_rescale();
private:
wxWindow* m_parent;
std::string m_current_icon_name = "";
std::string m_disabled_icon_name = "";
wxWindow* m_parent { nullptr };
std::string m_current_icon_name;
std::string m_disabled_icon_name;
int m_width {-1}; // should be multiplied to em_unit
int m_height{-1}; // should be multiplied to em_unit
@ -280,8 +280,17 @@ public:
const wxString& mode = wxEmptyString,
const wxSize& size = wxDefaultSize,
const wxPoint& pos = wxDefaultPosition);
ModeButton(
wxWindow* parent,
const wxString& mode = wxEmptyString,
const std::string& icon_name = "",
int px_cnt = 16);
~ModeButton() {}
void Init(const wxString& mode);
void OnButton(wxCommandEvent& event);
void OnEnterBtn(wxMouseEvent& event) { focus_button(true); event.Skip(); }
void OnLeaveBtn(wxMouseEvent& event) { focus_button(m_is_selected); event.Skip(); }