summaryrefslogtreecommitdiff
path: root/src/preview/PreviewView.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-01-26 01:13:33 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-01-26 01:13:33 (GMT)
commit9e1be78bc21d1fb76a19ce12ef36193aea6e2b93 (patch)
tree081b67d551bb44fecbf6deb99b6c44ea9789614c /src/preview/PreviewView.cpp
parentb2d3257ae944a3ea3b57dc8ee4171b1b2f85483e (diff)
downloadpowder-9e1be78bc21d1fb76a19ce12ef36193aea6e2b93.zip
powder-9e1be78bc21d1fb76a19ce12ef36193aea6e2b93.tar.gz
I've got to a point where I can no longer be bothered to think of a proper commit comment
Diffstat (limited to 'src/preview/PreviewView.cpp')
-rw-r--r--src/preview/PreviewView.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/preview/PreviewView.cpp b/src/preview/PreviewView.cpp
index 9d76fe7..d0bd6da 100644
--- a/src/preview/PreviewView.cpp
+++ b/src/preview/PreviewView.cpp
@@ -14,8 +14,19 @@ PreviewView::PreviewView():
ui::Window(ui::Point(-1, -1), ui::Point((XRES/2)+200, (YRES/2)+150)),
savePreview(NULL)
{
- // TODO Auto-generated constructor stub
+ class OpenAction: public ui::ButtonAction
+ {
+ PreviewView * v;
+ public:
+ OpenAction(PreviewView * v_){ v = v_; }
+ virtual void ActionCallback(ui::Button * sender)
+ {
+ v->c->DoOpen();
+ v->c->Exit();
+ }
+ };
openButton = new ui::Button(ui::Point(0, Size.Y-16), ui::Point(100, 16), "Open");
+ openButton->SetActionCallback(new OpenAction(this));
AddComponent(openButton);
saveNameLabel = new ui::Label(ui::Point(5, (YRES/2)+5), ui::Point(100, 16), "");