summaryrefslogtreecommitdiff
path: root/src/interface/ControlFactory.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-01-15 19:35:40 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-01-15 19:35:40 (GMT)
commit2511afec8bfaa0582928406b37e8b579fa267e4f (patch)
treeaae1674f5f076db275ec1c6b32271a69cff1489a /src/interface/ControlFactory.cpp
parent2c9295007a287dc01ff63fcf7b3da141f7474e37 (diff)
downloadpowder-2511afec8bfaa0582928406b37e8b579fa267e4f.zip
powder-2511afec8bfaa0582928406b37e8b579fa267e4f.tar.gz
More stuff, better events and starting on interface
Diffstat (limited to 'src/interface/ControlFactory.cpp')
-rw-r--r--src/interface/ControlFactory.cpp51
1 files changed, 49 insertions, 2 deletions
diff --git a/src/interface/ControlFactory.cpp b/src/interface/ControlFactory.cpp
index 25822cd..372ed31 100644
--- a/src/interface/ControlFactory.cpp
+++ b/src/interface/ControlFactory.cpp
@@ -4,9 +4,56 @@
#include "interface/Panel.h"
#include "interface/Engine.h"
-ui::Panel * ControlFactory::MainMenu(GameSession * session, int x, int y, int width, int height)
+ui::Panel * ControlFactory::MainMenu(int x, int y, int width, int height)
{
+ int currentX = 1;
+ width -= 2;
+ ui::Button * tempButton;
ui::Panel * mainMenu = new ui::Panel(ui::Point(x, y), ui::Point(width, height));
- //mainMenu->Add(new ui::Button(0, 0, 20, 20, "Turd"));
+
+ tempButton = new ui::Button(ui::Point(currentX, 1), ui::Point(16, height-2), "\x81");
+ mainMenu->AddChild(tempButton); //Open
+ currentX += 18;
+
+ tempButton = new ui::Button(ui::Point(currentX, 1), ui::Point(16, height-2), "\x91");
+ mainMenu->AddChild(tempButton); //Reload
+ currentX += 18;
+
+ tempButton = new ui::Button(ui::Point(currentX, 1), ui::Point(width/4, height-2), "\x82 [Save]"); //Save
+ mainMenu->AddChild(tempButton);
+ currentX += tempButton->Size.X+2;
+
+ tempButton = new ui::Button(ui::Point(currentX, 1), ui::Point(16, height-2), "\xCB");
+ mainMenu->AddChild(tempButton); //Vote Up
+ currentX += 16;
+ tempButton = new ui::Button(ui::Point(currentX, 1), ui::Point(16, height-2), "\xCA");
+ mainMenu->AddChild(tempButton); //Vote Down
+ currentX += 18;
+
+ tempButton = new ui::Button(ui::Point(currentX, 1), ui::Point(width - currentX - (4 * 18) - (width / 5), height-2), "[Tags]"); //Tags
+ currentX += tempButton->Size.X+2;
+ mainMenu->AddChild(tempButton);
+
+ tempButton = new ui::Button(ui::Point(currentX, 1), ui::Point(16, height-2), "\xCF");
+ mainMenu->AddChild(tempButton); //Settings
+ currentX += 18;
+
+ tempButton = new ui::Button(ui::Point(currentX, 1), ui::Point(16, height-2), "\x92");
+ mainMenu->AddChild(tempButton); //Clear
+ currentX += 18;
+
+ tempButton = new ui::Button(ui::Point(currentX, 1), ui::Point(width - currentX - (2 * 18), height-2), "\x84 [Login]"); //Login
+ currentX += tempButton->Size.X+2;
+ mainMenu->AddChild(tempButton);
+
+ tempButton = new ui::Button(ui::Point(currentX, 1), ui::Point(16, height-2), "\xD8");
+ mainMenu->AddChild(tempButton); //Render options
+ currentX += 18;
+
+ tempButton = new ui::Button(ui::Point(currentX, 1), ui::Point(16, height-2), "\x90"); //Pause
+ tempButton->SetTogglable(true);
+ mainMenu->AddChild(tempButton);
+ currentX += 18;
+
return mainMenu;
}