summaryrefslogtreecommitdiff
path: root/src/interface/Window.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2012-10-21 23:42:06 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-10-26 14:17:02 (GMT)
commit69aad4caa2a8556432c4a3e6a8849fad557ab335 (patch)
treec0bdcf910dd587ae07287804e18a9eef05caa096 /src/interface/Window.cpp
parente773abdcc89c1f7cc09cce39c6d4b30eaa6fd69e (diff)
downloadpowder-69aad4caa2a8556432c4a3e6a8849fad557ab335.zip
powder-69aad4caa2a8556432c4a3e6a8849fad557ab335.tar.gz
some testing with DEBUG mode, add some stuff
Conflicts: src/cat/TPTScriptInterface.cpp
Diffstat (limited to 'src/interface/Window.cpp')
-rw-r--r--src/interface/Window.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/interface/Window.cpp b/src/interface/Window.cpp
index 013ec1a..e36f9c1 100644
--- a/src/interface/Window.cpp
+++ b/src/interface/Window.cpp
@@ -283,6 +283,47 @@ void Window::DoKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool a
if(key == KEY_RIGHT)
focusedComponent_->Position.X++;
}
+ if (key == KEY_DELETE)
+ {
+ RemoveComponent(focusedComponent_);
+ halt = false;
+ }
+ }
+ else
+ {
+ if(shift)
+ {
+ if(key == KEY_UP)
+ Size.Y--;
+ if(key == KEY_DOWN)
+ Size.Y++;
+ if(key == KEY_LEFT)
+ Size.X--;
+ if(key == KEY_RIGHT)
+ Size.X++;
+ }
+ if(ctrl)
+ {
+ if(key == KEY_UP)
+ Size.Y++;
+ if(key == KEY_DOWN)
+ Size.Y--;
+ if(key == KEY_LEFT)
+ Size.X++;
+ if(key == KEY_RIGHT)
+ Size.X--;
+ }
+ if(!shift)
+ {
+ if(key == KEY_UP)
+ Position.Y--;
+ if(key == KEY_DOWN)
+ Position.Y++;
+ if(key == KEY_LEFT)
+ Position.X--;
+ if(key == KEY_RIGHT)
+ Position.X++;
+ }
}
return;
}