aboutsummaryrefslogtreecommitdiff
path: root/src/game_tab/right_panel/editor/EditorCanvas.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game_tab/right_panel/editor/EditorCanvas.cpp')
-rw-r--r--src/game_tab/right_panel/editor/EditorCanvas.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/game_tab/right_panel/editor/EditorCanvas.cpp b/src/game_tab/right_panel/editor/EditorCanvas.cpp
index 0e2f77a..870dd26 100644
--- a/src/game_tab/right_panel/editor/EditorCanvas.cpp
+++ b/src/game_tab/right_panel/editor/EditorCanvas.cpp
@@ -37,6 +37,7 @@ wxPoint EditorCanvas::Middle(cgeditor::Element e) {
}
void EditorCanvas::DrawElement(const cgeditor::Element &e) {
+ // TODO: Optimize brush!!!! Always instanciated at each call
dc->SetPen(wxNullPen);
dc->SetBrush(*wxRED_BRUSH);
if (e.prop & cgeditor::Property::Rectangle) {
@@ -45,7 +46,7 @@ void EditorCanvas::DrawElement(const cgeditor::Element &e) {
} else if (e.prop & cgeditor::Property::Scrollbar) {
dc->SetBrush(*wxGREY_BRUSH);
} else if (e.prop & cgeditor::Property::Margin) {
- dc->SetBrush(*wxLIGHT_GREY_BRUSH);
+ dc->SetBrush(wxBrush(wxColour(243,243,243)));
} else if (e.prop & cgeditor::Property::Button) {
if (e.prop & cgeditor::Property::On) {
dc->DrawBitmap(hide_icon, e.x, e.y);
@@ -77,25 +78,25 @@ void EditorCanvas::DrawElement(const cgeditor::Element &e) {
}
if (e.prop & cgeditor::Property::Current) {
wxRect recToDraw(e.x, e.y, e.width, e.height);
- dc->SetBrush(*wxLIGHT_GREY_BRUSH);
+ dc->SetBrush(wxBrush(wxColour(216, 216, 216)));
dc->DrawRectangle(recToDraw);
}
dc->DrawBitmap(*t.Get(p), e.x, y);
} else if (e.prop & cgeditor::Property::Comment) {
wxRect recToDraw(e.x, e.y, e.width, e.height);
- dc->SetBrush(*wxYELLOW_BRUSH);
+ dc->SetBrush(wxBrush(wxColour(255, 255, 204)));
dc->DrawRectangle(recToDraw);
dc->DrawText(wxString(e.text), wxPoint(e.x, e.y));
} else if (e.prop & cgeditor::Property::Menuitem) {
wxRect recToDraw(e.x, e.y, e.width, e.height);
- dc->SetBrush(*wxLIGHT_GREY_BRUSH);
+ dc->SetBrush(wxBrush(wxColour(216, 216, 216)));
dc->DrawRectangle(recToDraw);
dc->DrawText(wxString(e.text), wxPoint(e.x, Middle(e).y));
} else {
if (e.prop & cgeditor::Property::Move) {
if (e.prop & cgeditor::Property::Current) {
wxRect recToDraw(e.x, e.y, e.width, e.height);
- dc->SetBrush(*wxLIGHT_GREY_BRUSH);
+ dc->SetBrush(wxBrush(wxColour(216, 216, 216)));
dc->DrawRectangle(recToDraw);
}
if (CGEditor::status.UseMoveIcons) {