Revision 2eaafff2
ID | 2eaafff20f1014a2a7998573e21437aedd65eb45 |
Added maps and menus in scoutsim.
Menu options for about, quit, clear, and viewing different maps.
scout/scoutsim/src/sim_frame.h | ||
---|---|---|
48 | 48 |
#include <wx/wx.h> |
49 | 49 |
#include <wx/event.h> |
50 | 50 |
#include <wx/timer.h> |
51 |
#include <wx/string.h> |
|
51 | 52 |
|
52 | 53 |
#include <ros/ros.h> |
53 | 54 |
|
... | ... | |
60 | 61 |
#include "scoutsim_internal.h" |
61 | 62 |
|
62 | 63 |
#define SCOUTSIM_NUM_SCOUTS 1 |
64 |
#define ID_ABOUT 1 |
|
65 |
#define ID_QUIT 2 |
|
66 |
#define ID_CLEAR 3 |
|
67 |
#define ID_MAP 4 |
|
68 |
#define ID_LINES 5 |
|
63 | 69 |
|
64 | 70 |
namespace scoutsim |
65 | 71 |
{ |
66 | 72 |
class SimFrame : public wxFrame |
67 | 73 |
{ |
68 | 74 |
public: |
69 |
SimFrame(wxWindow* parent); |
|
75 |
SimFrame(wxWindow* parent, std::string map_name);
|
|
70 | 76 |
~SimFrame(); |
71 | 77 |
|
72 | 78 |
std::string spawnScout(const std::string& name, |
73 | 79 |
float x, float y, float angle); |
74 | 80 |
|
81 |
void onQuit(wxCommandEvent& event); |
|
82 |
void onAbout(wxCommandEvent& event); |
|
83 |
void onClear(wxCommandEvent& event); |
|
84 |
void showMap(wxCommandEvent& event); |
|
85 |
void showLines(wxCommandEvent& event); |
|
86 |
|
|
87 |
DECLARE_EVENT_TABLE() |
|
88 |
|
|
75 | 89 |
private: |
76 | 90 |
void onUpdate(wxTimerEvent& evt); |
77 | 91 |
void onPaint(wxPaintEvent& evt); |
... | ... | |
109 | 123 |
float meter; |
110 | 124 |
float width_in_meters; |
111 | 125 |
float height_in_meters; |
126 |
|
|
127 |
std::string base_map_name; |
|
128 |
std::string display_map_name; |
|
112 | 129 |
}; |
113 | 130 |
|
114 | 131 |
} |
Also available in: Unified diff