#include "MainMenu.h" #include "Game.h" MainMenu::MainMenu() { } void MainMenu::init() { this->view = IwGetUIView(); this->controller = IwGetUIController(); CIwResGroup* pResGroup = IwGetResManager()->LoadGroup("main_menu.group"); // this->create_button_style(); IwGetUIStyleManager()->SetStylesheet(this->CreateStyles()); //CIwUIElement* pElement = new CIwUIElement; CIwUIElement* pDialog = CreateDialog(); this->view->AddElementToLayout(pDialog); } CIwUIElement* MainMenu::CreateDialog() { // Create scrollable view with vertical layout CIwUILayoutGrid* pLayout = new CIwUILayoutGrid; for(int i = 0; i < 4; i++) { pLayout->AddColumn(); } for(int i = 0; i < 15 ; i++) { pLayout->AddRow(); } CIwUIButton* pStartButton = new CIwUIButton; pStartButton->SetStyle("