From 3e989517ec46c40a82671620577c40765c94a41f Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 15 Mar 2015 11:19:20 -0400 Subject: Added basic ability to set tiles in map editor --- tools/mapedit/src/main.cpp | 36 +++--------------------------------- 1 file changed, 3 insertions(+), 33 deletions(-) (limited to 'tools/mapedit/src/main.cpp') diff --git a/tools/mapedit/src/main.cpp b/tools/mapedit/src/main.cpp index 09be151..28fa010 100644 --- a/tools/mapedit/src/main.cpp +++ b/tools/mapedit/src/main.cpp @@ -5,50 +5,20 @@ #endif #include "map.h" +#include "frame.h" class MapeditApp : public wxApp { public: virtual bool OnInit(); }; -class MapeditFrame : public wxFrame { - public: - MapeditFrame() : MapeditFrame(Map()) {} - MapeditFrame(Map map); - - private: - void OnExit(wxCommandEvent& event); - - Map map; - - wxDECLARE_EVENT_TABLE(); -}; - -wxBEGIN_EVENT_TABLE(MapeditFrame, wxFrame) - EVT_MENU(wxID_EXIT, MapeditFrame::OnExit) -wxEND_EVENT_TABLE() - wxIMPLEMENT_APP(MapeditApp); bool MapeditApp::OnInit() { + wxInitAllImageHandlers(); + MapeditFrame* frame = new MapeditFrame(); frame->Show(true); return true; } - -MapeditFrame::MapeditFrame(Map map) : wxFrame(NULL, wxID_ANY, "Map Editor", wxPoint(50, 50), wxSize(450, 340)), map(map) -{ - wxMenu* menuFile = new wxMenu; - menuFile->Append(wxID_EXIT); - - wxMenuBar* menuBar = new wxMenuBar; - menuBar->Append(menuFile, "&File"); - - SetMenuBar(menuBar); -} - -void MapeditFrame::OnExit(wxCommandEvent& event) -{ - Close(true); -} -- cgit 1.4.1