summaryrefslogtreecommitdiff
path: root/src/interface/Panel.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-01-17 20:46:06 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-01-17 20:46:06 (GMT)
commit4a60b97c700c2f1843b7e99313554cb89fb5da4e (patch)
tree3b33ef6f74a4e8a4ff5968a81b9c4c429ccaa7c6 /src/interface/Panel.cpp
parent6273089bf486bf46ad325d72c7290ebb272bd3d8 (diff)
downloadpowder-4a60b97c700c2f1843b7e99313554cb89fb5da4e.zip
powder-4a60b97c700c2f1843b7e99313554cb89fb5da4e.tar.gz
Some minor changes
Diffstat (limited to 'src/interface/Panel.cpp')
-rw-r--r--src/interface/Panel.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/interface/Panel.cpp b/src/interface/Panel.cpp
index e44663a..acfcf53 100644
--- a/src/interface/Panel.cpp
+++ b/src/interface/Panel.cpp
@@ -5,12 +5,12 @@
#include "interface/Panel.h"
#include "interface/Point.h"
-#include "interface/State.h"
+#include "interface/Window.h"
#include "interface/Component.h"
using namespace ui;
-Panel::Panel(State* parent_state):
+Panel::Panel(Window* parent_state):
Component(parent_state)
{
@@ -84,7 +84,7 @@ void Panel::Draw(const Point& screenPos)
// the component must be visible
if(children[i]->Visible)
{
- if(GetParentState()->AllowExclusiveDrawing)
+ if(GetParentWindow()->AllowExclusiveDrawing)
{
//who cares if the component is off the screen? draw anyway.
Point scrpos = screenPos + children[i]->Position;
@@ -143,7 +143,7 @@ void Panel::OnMouseClick(int localx, int localy, unsigned button)
localy < children[i]->Position.Y + children[i]->Size.Y )
{
childclicked = true;
- GetParentState()->FocusComponent(children[i]);
+ GetParentWindow()->FocusComponent(children[i]);
children[i]->OnMouseClick(localx - children[i]->Position.X, localy - children[i]->Position.Y, button);
break;
}
@@ -154,7 +154,7 @@ void Panel::OnMouseClick(int localx, int localy, unsigned button)
if(!childclicked)
{
XOnMouseClick(localx, localy, button);
- GetParentState()->FocusComponent(this);
+ GetParentWindow()->FocusComponent(this);
}
}