31 |
ibfont = new PG_Font("theme/fonts/ethnocen.ttf", 18); |
ibfont = new PG_Font("theme/fonts/ethnocen.ttf", 18); |
32 |
|
|
33 |
// new game |
// new game |
34 |
start = new PG_Button(this, 200, PG_Rect(210,600,180, 35), "Start New"); |
start = new PG_Button(this, 200, PG_Rect(122,600,180, 35), "Start New"); |
35 |
start->SetFont(ibfont); |
start->SetFont(ibfont); |
36 |
start->SetFontSize(16); |
start->SetFontSize(16); |
37 |
start->SetFontColor(0,0,0); |
start->SetFontColor(0,0,0); |
38 |
|
|
39 |
// load saved |
// load saved |
40 |
load = new PG_Button(this, 201, PG_Rect(410,600,180, 35), "Load Game"); |
load = new PG_Button(this, 201, PG_Rect(322,600,180, 35), "Load Game"); |
41 |
load->SetFont(ibfont); |
load->SetFont(ibfont); |
42 |
load->SetFontSize(16); |
load->SetFontSize(16); |
43 |
load->SetFontColor(0,0,0); |
load->SetFontColor(0,0,0); |
44 |
//load->Show(); |
|
45 |
|
// mp |
46 |
|
mp = new PG_Button(this, 203, PG_Rect(522,600,180, 35), "Multiplayer"); |
47 |
|
mp->SetFont(ibfont); |
48 |
|
mp->SetFontSize(16); |
49 |
|
mp->SetFontColor(0,0,0); |
50 |
|
|
51 |
// about & credits |
// about & credits |
52 |
about = new PG_Button(this, 202, PG_Rect(610,600,180, 35), "About AXIS"); |
about = new PG_Button(this, 202, PG_Rect(722,600,180, 35), "About AXIS"); |
53 |
about->SetFont(ibfont); |
about->SetFont(ibfont); |
54 |
about->SetFontSize(16); |
about->SetFontSize(16); |
55 |
about->SetFontColor(0,0,0); |
about->SetFontColor(0,0,0); |
|
//about->Show(); |
|
56 |
|
|
57 |
|
|
58 |
//register buttons |
//register buttons |
59 |
start->SetEventObject(MSG_BUTTONCLICK, rm, (MSG_CALLBACK_OBJ)&RenderMan::handle_go_to_bm, (void*)start); |
start->SetEventObject(MSG_BUTTONCLICK, this, (MSG_CALLBACK_OBJ)&UIScreen_Start::handle_start_new, (void*)start); |
60 |
// temporary: |
//mp->SetEventObject(MSG_BUTTONCLICK, rm, (MSG_CALLBACK_OBJ)&RenderMan::handle_go_to_network, (void*)mp); |
61 |
//load->SetEventObject(MSG_BUTTONCLICK, rm, (MSG_CALLBACK_OBJ)&RenderMan::handle_start_new, (void*)load); |
mp->SetEventObject(MSG_BUTTONCLICK, this, (MSG_CALLBACK_OBJ)&UIScreen_Start::handle_go_to_network, (void*)mp); |
62 |
|
|
63 |
} |
} |
64 |
|
|
68 |
|
|
69 |
UIScreen_Start::~UIScreen_Start() { |
UIScreen_Start::~UIScreen_Start() { |
70 |
RemoveAllChilds(); |
RemoveAllChilds(); |
|
//delete logo; |
|
|
//delete start; |
|
|
//delete load; |
|
|
//delete about; |
|
71 |
delete ibfont; |
delete ibfont; |
|
|
|
72 |
} |
} |
73 |
|
|
74 |
|
|
85 |
|
|
86 |
|
|
87 |
// EVENTS |
// EVENTS |
88 |
|
|
89 |
PARAGUI_CALLBACK(UIScreen_Start::handle_start_new) { |
PARAGUI_CALLBACK(UIScreen_Start::handle_start_new) { |
90 |
rm->SetActiveScreen(UISCREEN_START); |
rm->SetActiveScreen(UISCREEN_BLOTCHMAKER_MORE); |
91 |
return true; |
return true; |
92 |
} |
} |
93 |
|
|
96 |
return true; |
return true; |
97 |
} |
} |
98 |
|
|
99 |
|
|
100 |
|
PARAGUI_CALLBACK(UIScreen_Start::handle_go_to_network) { |
101 |
|
rm->SetActiveScreen(UISCREEN_NETWORK); |
102 |
|
return true; |
103 |
|
} |
104 |
|
|
105 |
|
|
106 |
|
|