2012-01-14 12:51:24 -06:00
|
|
|
#include "interface/Point.h"
|
2012-01-10 17:18:37 -06:00
|
|
|
#include "interface/ControlFactory.h"
|
|
|
|
#include "interface/Button.h"
|
|
|
|
#include "interface/Panel.h"
|
2012-01-14 12:51:24 -06:00
|
|
|
#include "interface/Engine.h"
|
2012-01-10 17:18:37 -06:00
|
|
|
|
2012-01-15 13:35:40 -06:00
|
|
|
ui::Panel * ControlFactory::MainMenu(int x, int y, int width, int height)
|
2012-01-10 17:18:37 -06:00
|
|
|
{
|
2012-01-15 13:35:40 -06:00
|
|
|
int currentX = 1;
|
|
|
|
width -= 2;
|
|
|
|
ui::Button * tempButton;
|
2012-01-14 12:51:24 -06:00
|
|
|
ui::Panel * mainMenu = new ui::Panel(ui::Point(x, y), ui::Point(width, height));
|
2012-01-15 13:35:40 -06:00
|
|
|
|
|
|
|
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;
|
|
|
|
|
2012-01-10 17:18:37 -06:00
|
|
|
return mainMenu;
|
|
|
|
}
|