summaryrefslogtreecommitdiff
path: root/src/preview/PreviewView.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-02-01 18:45:59 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-02-01 18:45:59 (GMT)
commit038da72c61ea6a251d805e2de3662f240da52b02 (patch)
tree05170050b16f9d663ec44ae451211e686ba196ac /src/preview/PreviewView.cpp
parent857b0cc1fc58f066acd59404d16ee5e566e20f00 (diff)
downloadpowder-038da72c61ea6a251d805e2de3662f240da52b02.zip
powder-038da72c61ea6a251d805e2de3662f240da52b02.tar.gz
Console UI, open in browser button, tab and enter shortcut for Login UI, various
Diffstat (limited to 'src/preview/PreviewView.cpp')
-rw-r--r--src/preview/PreviewView.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/preview/PreviewView.cpp b/src/preview/PreviewView.cpp
index 68a224b..3a731dc 100644
--- a/src/preview/PreviewView.cpp
+++ b/src/preview/PreviewView.cpp
@@ -25,12 +25,28 @@ PreviewView::PreviewView():
v->c->Exit();
}
};
- openButton = new ui::Button(ui::Point(0, Size.Y-16), ui::Point(75, 16), "Open");
+ openButton = new ui::Button(ui::Point(0, Size.Y-16), ui::Point(50, 16), "Open");
openButton->SetAlignment(AlignLeft, AlignMiddle);
openButton->SetIcon(IconOpen);
openButton->SetActionCallback(new OpenAction(this));
AddComponent(openButton);
+ class BrowserOpenAction: public ui::ButtonAction
+ {
+ PreviewView * v;
+ public:
+ BrowserOpenAction(PreviewView * v_){ v = v_; }
+ virtual void ActionCallback(ui::Button * sender)
+ {
+ v->c->OpenInBrowser();
+ }
+ };
+ browserOpenButton = new ui::Button(ui::Point((XRES/2)-90, Size.Y-16), ui::Point(90, 16), "Open in browser");
+ browserOpenButton->SetAlignment(AlignLeft, AlignMiddle);
+ browserOpenButton->SetIcon(IconOpen);
+ browserOpenButton->SetActionCallback(new BrowserOpenAction(this));
+ AddComponent(browserOpenButton);
+
saveNameLabel = new ui::Label(ui::Point(5, (YRES/2)+15), ui::Point(100, 16), "");
saveNameLabel->SetAlignment(AlignLeft, AlignBottom);
AddComponent(saveNameLabel);