/* ==================== uiscreen_start.cpp ==================== */ #include "uiscreen.h" #include "uiscreen_start.h" // paragui includes #include "paragui.h" #include "pgimage.h" #include "pgfont.h" //#include "renderman.h" //#include "../core/pointerhub.h" /** This is the front "splash" screen with basic game functions */ UIScreen_Start::UIScreen_Start(PG_Widget* parent, const PG_Rect &r) :UIScreen(parent, r) { // the bg this->SetBackground("graphics/UI/shared/brushed_metal_bg.png", BKMODE_TILE); // splash logo: PG_Point p; p.x = 100; p.y = 0; logo = new PG_Image(this, p, "graphics/UI/screen_start/axis_logo.png"); logo->Show(); // get new font: ibfont = new PG_Font("tower/fonts/ethnocen.ttf", 18); // new game start = new PG_Button(this, 200, PG_Rect(210,600,180, 35), "Start New", "IntroButton"); start->SetFont(ibfont); start->SetFontSize(16); start->SetFontColor(0,0,0); start->Show(); // load saved load = new PG_Button(this, 201, PG_Rect(410,600,180, 35), "Load Game"); load->SetFont(ibfont); load->SetFontSize(16); load->SetFontColor(0,0,0); load->Show(); // about & credits about = new PG_Button(this, 202, PG_Rect(610,600,180, 35), "About AXIS"); about->SetFont(ibfont); about->SetFontSize(16); about->SetFontColor(0,0,0); about->Show(); //register buttons start->SetEventObject(MSG_BUTTONCLICK, rm, (MSG_CALLBACK_OBJ)&RenderMan::handle_start_new, (void*)start); } UIScreen_Start::~UIScreen_Start() { delete logo; delete start; delete load; delete about; delete ibfont; } // events PARAGUI_CALLBACK(UIScreen_Start::handle_start_new) { rm->SetActiveScreen(UISCREEN_START); return true; } PARAGUI_CALLBACK(UIScreen_Start::handle_load_game) { return true; }