16 |
#include "uiscreen_start.h" |
#include "uiscreen_start.h" |
17 |
#include "uiscreen_main.h" |
#include "uiscreen_main.h" |
18 |
#include "uiscreen_bmmore.h" |
#include "uiscreen_bmmore.h" |
19 |
|
#include "uiscreen_networksetup.h" |
20 |
|
|
21 |
// paragui includes |
// paragui includes |
22 |
#include "paragui.h" |
#include "paragui.h" |
63 |
// every application needs a theme (the look & feel of the widgets) |
// every application needs a theme (the look & feel of the widgets) |
64 |
app->LoadTheme("theme"); |
app->LoadTheme("theme"); |
65 |
|
|
66 |
|
//If we wanted to detect color depth automatically, have to do so here: |
67 |
|
if(color_depth == 0) { color_depth = app->GetScreen()->format->BitsPerPixel; } |
68 |
|
|
69 |
// we must initialize the screen where we want to draw on |
// we must initialize the screen where we want to draw on |
70 |
// 0 - use screen bitdepth |
// 0 - use screen bitdepth |
71 |
// SDL_SWSURFACE - PG_ option to generate surface in system memory |
// SDL_SWSURFACE - PG_ option to generate surface in system memory |
72 |
if (fullscreen == 0) { |
if (fullscreen == 0) { |
73 |
app->InitScreen(XRES, YRES, color_depth, SDL_SWSURFACE); |
app->InitScreen(XRES, YRES, color_depth, SDL_HWSURFACE); |
74 |
} |
} |
75 |
else { |
else { |
76 |
app->InitScreen(XRES, YRES, color_depth, SDL_SWSURFACE | SDL_FULLSCREEN); |
app->InitScreen(XRES, YRES, color_depth, SDL_HWSURFACE | SDL_FULLSCREEN); |
77 |
} |
} |
78 |
|
|
|
//If we wanted to detect color depth automatically, have to do so here: |
|
|
if(color_depth == 0) { |
|
|
color_depth = app->GetScreen()->format->BitsPerPixel; |
|
|
} |
|
|
|
|
79 |
// the master widget - every other widget is a child of this |
// the master widget - every other widget is a child of this |
80 |
master_widget = new PG_Widget(NULL, PG_Rect(0,0,XRES,YRES)); |
master_widget = new PG_Widget(NULL, PG_Rect(0,0,XRES,YRES)); |
81 |
master_widget->Show(); |
master_widget->Show(); |
87 |
// set the default first screen |
// set the default first screen |
88 |
|
|
89 |
//SetActiveScreen(UISCREEN_MAIN); |
//SetActiveScreen(UISCREEN_MAIN); |
90 |
|
|
91 |
//} |
//} |
92 |
|
|
93 |
// get going |
// get going |
118 |
uiscreen_start = new UIScreen_Start(master_widget, PG_Rect(0,0,XRES,YRES)); |
uiscreen_start = new UIScreen_Start(master_widget, PG_Rect(0,0,XRES,YRES)); |
119 |
uiscreen_start->Show(); |
uiscreen_start->Show(); |
120 |
break; |
break; |
|
case UISCREEN_NEWGAME: |
|
|
|
|
|
break; |
|
|
case UISCREEN_BLOTCHMAKER_LESS: |
|
|
|
|
|
break; |
|
121 |
case UISCREEN_BLOTCHMAKER_MORE: |
case UISCREEN_BLOTCHMAKER_MORE: |
122 |
uiscreen_bmmore = new UIScreen_BMMore(master_widget, PG_Rect(0,0,XRES,YRES)); |
uiscreen_bmmore = new UIScreen_BMMore(master_widget, PG_Rect(0,0,XRES,YRES)); |
123 |
uiscreen_bmmore->Show(); |
uiscreen_bmmore->Show(); |
126 |
uiscreen_main = new UIScreen_Main(master_widget, PG_Rect(0,0,XRES,YRES)); |
uiscreen_main = new UIScreen_Main(master_widget, PG_Rect(0,0,XRES,YRES)); |
127 |
uiscreen_main->Show(); |
uiscreen_main->Show(); |
128 |
break; |
break; |
129 |
|
case UISCREEN_NETWORK: |
130 |
|
uiscreen_network = new UIScreen_Network(master_widget, PG_Rect(0,0,XRES,YRES)); |
131 |
|
uiscreen_network->Show(); |
132 |
|
break; |
133 |
|
case UISCREEN_NEWGAME: |
134 |
|
|
135 |
|
break; |
136 |
|
case UISCREEN_BLOTCHMAKER_LESS: |
137 |
|
|
138 |
|
break; |
139 |
case UISCREEN_POD_ASSEMBLY: |
case UISCREEN_POD_ASSEMBLY: |
140 |
|
|
141 |
break; |
break; |
363 |
string RenderMan::IntToChar(int x) { |
string RenderMan::IntToChar(int x) { |
364 |
stringstream s; |
stringstream s; |
365 |
s << x; |
s << x; |
|
|
|
366 |
return s.str(); |
return s.str(); |
367 |
} |
} |
368 |
|
|
381 |
return true; |
return true; |
382 |
} |
} |
383 |
|
|
384 |
|
PARAGUI_CALLBACK(RenderMan::handle_go_to_network) { |
385 |
|
SetActiveScreen(UISCREEN_NETWORK); |
386 |
|
return true; |
387 |
|
} |
388 |
|
|
389 |
PARAGUI_CALLBACK(RenderMan::handle_go_to_bm) { |
PARAGUI_CALLBACK(RenderMan::handle_go_to_bm) { |
390 |
SetActiveScreen(UISCREEN_BLOTCHMAKER_MORE); |
SetActiveScreen(UISCREEN_BLOTCHMAKER_MORE); |
391 |
return true; |
return true; |