summaryrefslogtreecommitdiffstats
path: root/Project/Workspace.cpp
diff options
context:
space:
mode:
authorThales1330 <thaleslima.ufu@gmail.com>2016-09-01 18:23:56 -0300
committerThales1330 <thaleslima.ufu@gmail.com>2016-09-01 18:23:56 -0300
commitb06d4c3d76cca3ed8a54dae1d978030d687233b2 (patch)
tree481cc4c8571b2f136242cd9a71b74499fbf36943 /Project/Workspace.cpp
parentb817a3f0e398c7e938ed1a37ebdbfc5a03eb7471 (diff)
downloadPSP.git-b06d4c3d76cca3ed8a54dae1d978030d687233b2.tar.gz
PSP.git-b06d4c3d76cca3ed8a54dae1d978030d687233b2.tar.xz
PSP.git-b06d4c3d76cca3ed8a54dae1d978030d687233b2.zip
generator under implementation
Diffstat (limited to 'Project/Workspace.cpp')
-rw-r--r--Project/Workspace.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/Project/Workspace.cpp b/Project/Workspace.cpp
index 5408327..d515683 100644
--- a/Project/Workspace.cpp
+++ b/Project/Workspace.cpp
@@ -4,6 +4,7 @@
#include "Bus.h"
#include "Line.h"
#include "Transformer.h"
+#include "Generator.h"
// Camera
Camera::Camera()
@@ -590,6 +591,17 @@ void Workspace::OnKeyDown(wxKeyEvent& event)
}
}
break;
+ case 'G': // Insert a generator.
+ {
+ if(m_mode != MODE_INSERT) {
+ Generator* newGenerator = new Generator();
+ m_elementList.push_back(newGenerator);
+ m_mode = MODE_INSERT;
+ m_statusBar->SetStatusText(_("Insert Generator: Click on a buses, ESC to cancel."));
+ Redraw();
+ }
+ }
+ break;
default:
break;
}
@@ -649,6 +661,11 @@ void Workspace::OnPopupClick(wxCommandEvent& event)
wxMessageBox("Edit line!");
}
break;
+ case ID_EDIT_TRANSFORMER:
+ {
+ wxMessageBox("Edit transformer!");
+ }
+ break;
case ID_LINE_ADD_NODE:
{
Line* line = (Line*)element;