summary refs log tree commit diff stats
path: root/tools/mapedit/src/frame.cpp
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2015-03-17 15:58:02 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2015-03-17 15:58:02 -0400
commit5c6d5cf1b4a22ae6d35b9c081bf34afec263ba63 (patch)
treec5df24939a0678abf14e0e79fd2d5b0bfe17328f /tools/mapedit/src/frame.cpp
parent90ae982fc2bfdf2f4c049db747ce9516debb148a (diff)
downloadtherapy-5c6d5cf1b4a22ae6d35b9c081bf34afec263ba63.tar.gz
therapy-5c6d5cf1b4a22ae6d35b9c081bf34afec263ba63.tar.bz2
therapy-5c6d5cf1b4a22ae6d35b9c081bf34afec263ba63.zip
Made some nice changes to the map editor widget
Center the map edit widget
Map edit zooming in should happen around the cursor
Disallow editing outside the mapedit widget
Add some scroll space around the mapedit widget
Diffstat (limited to 'tools/mapedit/src/frame.cpp')
-rw-r--r--tools/mapedit/src/frame.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/mapedit/src/frame.cpp b/tools/mapedit/src/frame.cpp index 2a553b6..6fb70c8 100644 --- a/tools/mapedit/src/frame.cpp +++ b/tools/mapedit/src/frame.cpp
@@ -134,7 +134,7 @@ MapeditFrame::MapeditFrame(std::unique_ptr<World> world) : wxFrame(NULL, wxID_AN
134 // Layout 3: Splitter between map editor and properties editor 134 // Layout 3: Splitter between map editor and properties editor
135 135
136 wxSplitterWindow* layout1 = new wxSplitterWindow(this, wxID_ANY); 136 wxSplitterWindow* layout1 = new wxSplitterWindow(this, wxID_ANY);
137 mapTree = new wxTreeCtrl(layout1, MAP_EDITOR_TREE, wxDefaultPosition, wxSize(200, 0), wxTR_HIDE_ROOT | wxTR_HAS_BUTTONS); 137 mapTree = new wxTreeCtrl(layout1, MAP_EDITOR_TREE, wxDefaultPosition, wxSize(150, 0), wxTR_HIDE_ROOT | wxTR_HAS_BUTTONS);
138 wxTreeItemId mapTreeRoot = mapTree->AddRoot("root"); 138 wxTreeItemId mapTreeRoot = mapTree->AddRoot("root");
139 populateMapTree(mapTreeRoot, this->world->getRootMaps()); 139 populateMapTree(mapTreeRoot, this->world->getRootMaps());
140 140
@@ -152,7 +152,7 @@ MapeditFrame::MapeditFrame(std::unique_ptr<World> world) : wxFrame(NULL, wxID_AN
152 mapEditor->frame = this; 152 mapEditor->frame = this;
153 153
154 // Set up property editor 154 // Set up property editor
155 wxPanel* propertyEditor = new wxPanel(layout3, wxID_ANY); 155 wxPanel* propertyEditor = new wxPanel(layout3, wxID_ANY, wxDefaultPosition, wxSize(-1, 100));
156 titleBox = new UndoableTextBox(propertyEditor, MAP_TITLE_TEXTBOX, currentMap->getTitle(), "Edit Map Title", this); 156 titleBox = new UndoableTextBox(propertyEditor, MAP_TITLE_TEXTBOX, currentMap->getTitle(), "Edit Map Title", this);
157 titleBox->SetMaxLength(40); 157 titleBox->SetMaxLength(40);
158 158