mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-04-07 02:26:29 +02:00
Improve UI
This commit is contained in:
parent
834387d7b2
commit
5aea044961
4 changed files with 914 additions and 124 deletions
|
@ -47,7 +47,7 @@ void BoardCanvas::OnPaint(wxPaintEvent &event) {
|
||||||
// Setting up required attributes
|
// Setting up required attributes
|
||||||
REFRESH_MOUSE_LOCATION();
|
REFRESH_MOUSE_LOCATION();
|
||||||
square_width = t->GetSquaresSizes();
|
square_width = t->GetSquaresSizes();
|
||||||
canvas_size = dc.GetSize();
|
canvas_size = this->GetSize();
|
||||||
boardX = (canvas_size.x - (8 * square_width)) / 2;
|
boardX = (canvas_size.x - (8 * square_width)) / 2;
|
||||||
boardY = (canvas_size.y - (8 * square_width)) / 2;
|
boardY = (canvas_size.y - (8 * square_width)) / 2;
|
||||||
if (boardX > canvas_size.x)
|
if (boardX > canvas_size.x)
|
||||||
|
|
48
src/gui.cpp
48
src/gui.cpp
|
@ -395,14 +395,14 @@ TabGameLeftPanel::TabGameLeftPanel( wxWindow* parent, wxWindowID id, const wxPoi
|
||||||
wxBoxSizer* bar_sizer;
|
wxBoxSizer* bar_sizer;
|
||||||
bar_sizer = new wxBoxSizer( wxHORIZONTAL );
|
bar_sizer = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
swap_button = new wxBitmapButton( this, SWAP_BTN, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
|
|
||||||
bar_sizer->Add( swap_button, 0, wxALL|wxEXPAND, 3 );
|
|
||||||
|
|
||||||
zoomin_button = new wxBitmapButton( this, ZOOM_IN_BTN, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
|
zoomin_button = new wxBitmapButton( this, ZOOM_IN_BTN, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
|
||||||
bar_sizer->Add( zoomin_button, 0, wxALL|wxEXPAND, 3 );
|
bar_sizer->Add( zoomin_button, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
zoomout_button = new wxBitmapButton( this, ZOOM_OUT_BTN, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
|
zoomout_button = new wxBitmapButton( this, ZOOM_OUT_BTN, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
|
||||||
bar_sizer->Add( zoomout_button, 0, wxALL|wxEXPAND, 3 );
|
bar_sizer->Add( zoomout_button, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
swap_button = new wxBitmapButton( this, SWAP_BTN, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
|
||||||
|
bar_sizer->Add( swap_button, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
fen_text_field = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_READONLY );
|
fen_text_field = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_READONLY );
|
||||||
bar_sizer->Add( fen_text_field, 1, wxALL|wxEXPAND, 0 );
|
bar_sizer->Add( fen_text_field, 1, wxALL|wxEXPAND, 0 );
|
||||||
|
@ -431,7 +431,7 @@ TabGameRightPanel::TabGameRightPanel( wxWindow* parent, wxWindowID id, const wxP
|
||||||
editor_canvas_sizer = new wxBoxSizer( wxVERTICAL );
|
editor_canvas_sizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
|
|
||||||
editor_page_sizer->Add( editor_canvas_sizer, 1, wxEXPAND, 5 );
|
editor_page_sizer->Add( editor_canvas_sizer, 100, wxEXPAND, 5 );
|
||||||
|
|
||||||
m_staticline1 = new wxStaticLine( editor_page, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
m_staticline1 = new wxStaticLine( editor_page, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||||
editor_page_sizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
|
editor_page_sizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
|
||||||
|
@ -443,6 +443,42 @@ TabGameRightPanel::TabGameRightPanel( wxWindow* parent, wxWindowID id, const wxP
|
||||||
comment_input = new wxTextCtrl( editor_page, COMMENT_INPUT_BOX, wxEmptyString, wxDefaultPosition, wxSize( -1,200 ), wxTE_MULTILINE );
|
comment_input = new wxTextCtrl( editor_page, COMMENT_INPUT_BOX, wxEmptyString, wxDefaultPosition, wxSize( -1,200 ), wxTE_MULTILINE );
|
||||||
editor_page_sizer->Add( comment_input, 0, wxALL|wxEXPAND, 5 );
|
editor_page_sizer->Add( comment_input, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
wxGridSizer* nag_sizer;
|
||||||
|
nag_sizer = new wxGridSizer( 2, 8, 0, 0 );
|
||||||
|
|
||||||
|
nag_1 = new wxButton( editor_page, wxID_ANY, wxT("!"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
|
||||||
|
nag_sizer->Add( nag_1, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
nag_2 = new wxButton( editor_page, wxID_ANY, wxT("?"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
|
||||||
|
nag_sizer->Add( nag_2, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
nag_3 = new wxButton( editor_page, wxID_ANY, wxT("!!"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
|
||||||
|
nag_sizer->Add( nag_3, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
nag_4 = new wxButton( editor_page, wxID_ANY, wxT("??"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
|
||||||
|
nag_sizer->Add( nag_4, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
nag_5 = new wxButton( editor_page, wxID_ANY, wxT("!?"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
|
||||||
|
nag_sizer->Add( nag_5, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
nag_6 = new wxButton( editor_page, wxID_ANY, wxT("?!"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
|
||||||
|
nag_sizer->Add( nag_6, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
nag_10 = new wxButton( editor_page, wxID_ANY, wxT("="), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
|
||||||
|
nag_sizer->Add( nag_10, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
nag_18 = new wxButton( editor_page, wxID_ANY, wxT("+-"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
|
||||||
|
nag_sizer->Add( nag_18, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
nag_19 = new wxButton( editor_page, wxID_ANY, wxT("-+"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
|
||||||
|
nag_sizer->Add( nag_19, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
nag_del = new wxButton( editor_page, wxID_ANY, wxT("DEL"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
|
||||||
|
nag_sizer->Add( nag_del, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
|
editor_page_sizer->Add( nag_sizer, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
editor_page->SetSizer( editor_page_sizer );
|
editor_page->SetSizer( editor_page_sizer );
|
||||||
editor_page->Layout();
|
editor_page->Layout();
|
||||||
|
|
20
src/gui.h
20
src/gui.h
|
@ -48,9 +48,9 @@
|
||||||
#define ID_DIALOG_IMPORT_BUTTON 1003
|
#define ID_DIALOG_IMPORT_BUTTON 1003
|
||||||
#define ENGINE_SAVE_CONF_BUTTON 1004
|
#define ENGINE_SAVE_CONF_BUTTON 1004
|
||||||
#define ENGINE_DELETE_CONF_BUTTON 1005
|
#define ENGINE_DELETE_CONF_BUTTON 1005
|
||||||
#define SWAP_BTN 1006
|
#define ZOOM_IN_BTN 1006
|
||||||
#define ZOOM_IN_BTN 1007
|
#define ZOOM_OUT_BTN 1007
|
||||||
#define ZOOM_OUT_BTN 1008
|
#define SWAP_BTN 1008
|
||||||
#define COMMENT_INPUT_BOX 1009
|
#define COMMENT_INPUT_BOX 1009
|
||||||
#define UPDATE_BTN 1010
|
#define UPDATE_BTN 1010
|
||||||
#define DELETE_BTN 1011
|
#define DELETE_BTN 1011
|
||||||
|
@ -257,9 +257,9 @@ class TabGameLeftPanel : public wxPanel
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxBoxSizer* main_sizer;
|
wxBoxSizer* main_sizer;
|
||||||
wxBitmapButton* swap_button;
|
|
||||||
wxBitmapButton* zoomin_button;
|
wxBitmapButton* zoomin_button;
|
||||||
wxBitmapButton* zoomout_button;
|
wxBitmapButton* zoomout_button;
|
||||||
|
wxBitmapButton* swap_button;
|
||||||
wxTextCtrl* fen_text_field;
|
wxTextCtrl* fen_text_field;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -285,6 +285,16 @@ class TabGameRightPanel : public wxPanel
|
||||||
wxStaticLine* m_staticline1;
|
wxStaticLine* m_staticline1;
|
||||||
wxStaticText* comment_label;
|
wxStaticText* comment_label;
|
||||||
wxTextCtrl* comment_input;
|
wxTextCtrl* comment_input;
|
||||||
|
wxButton* nag_1;
|
||||||
|
wxButton* nag_2;
|
||||||
|
wxButton* nag_3;
|
||||||
|
wxButton* nag_4;
|
||||||
|
wxButton* nag_5;
|
||||||
|
wxButton* nag_6;
|
||||||
|
wxButton* nag_10;
|
||||||
|
wxButton* nag_18;
|
||||||
|
wxButton* nag_19;
|
||||||
|
wxButton* nag_del;
|
||||||
wxPanel* tags_page;
|
wxPanel* tags_page;
|
||||||
wxTextCtrl* tagTextCtrl;
|
wxTextCtrl* tagTextCtrl;
|
||||||
wxTextCtrl* valueTextCtrl;
|
wxTextCtrl* valueTextCtrl;
|
||||||
|
@ -299,7 +309,7 @@ class TabGameRightPanel : public wxPanel
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
TabGameRightPanel( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,300 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
|
TabGameRightPanel( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,379 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
|
||||||
|
|
||||||
~TabGameRightPanel();
|
~TabGameRightPanel();
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue