… | |
… | |
174 | } |
174 | } |
175 | } |
175 | } |
176 | |
176 | |
177 | sub stop_game { |
177 | sub stop_game { |
178 | $LOGIN_BUTTON->set_text ("Login"); |
178 | $LOGIN_BUTTON->set_text ("Login"); |
|
|
179 | $SETUP_NOTEBOOK->set_current_page ($SETUP_SERVER); |
179 | $SETUP_DIALOG->show; |
180 | $SETUP_DIALOG->show; |
180 | $INV_WINDOW->hide; |
181 | $INV_WINDOW->hide; |
181 | $LOGVIEW->hide; |
|
|
182 | |
182 | |
183 | return unless $CONN; |
183 | return unless $CONN; |
184 | |
184 | |
185 | status "connection closed"; |
185 | status "connection closed"; |
186 | |
186 | |
… | |
… | |
903 | sub open_quit_dialog { |
903 | sub open_quit_dialog { |
904 | unless ($QUIT_DIALOG) { |
904 | unless ($QUIT_DIALOG) { |
905 | $QUIT_DIALOG = new CFClient::UI::FancyFrame |
905 | $QUIT_DIALOG = new CFClient::UI::FancyFrame |
906 | x => "center", |
906 | x => "center", |
907 | y => "center", |
907 | y => "center", |
|
|
908 | z => 50, |
908 | title => "Really Quit?", |
909 | title => "Really Quit?", |
909 | ; |
910 | ; |
910 | |
911 | |
911 | $QUIT_DIALOG->add (my $vb = new CFClient::UI::VBox expand => 1); |
912 | $QUIT_DIALOG->add (my $vb = new CFClient::UI::VBox expand => 1); |
912 | |
913 | |
… | |
… | |
1100 | $SETUP_DIALOG->show; |
1101 | $SETUP_DIALOG->show; |
1101 | }, |
1102 | }, |
1102 | sub { |
1103 | sub { |
1103 | $SETUP_NOTEBOOK->set_current_page ($SETUP_KEYBOARD); |
1104 | $SETUP_NOTEBOOK->set_current_page ($SETUP_KEYBOARD); |
1104 | $SETUP_DIALOG->show; |
1105 | $SETUP_DIALOG->show; |
1105 | }); |
1106 | }, |
|
|
1107 | ); |
1106 | $SETUP_DIALOG->hide; |
1108 | $SETUP_DIALOG->hide; |
1107 | $::BIND_EDITOR->show; |
1109 | $::BIND_EDITOR->show; |
1108 | }, |
1110 | }, |
1109 | ); |
1111 | ); |
1110 | |
1112 | |
… | |
… | |
1124 | |
1126 | |
1125 | sub make_help_window { |
1127 | sub make_help_window { |
1126 | my $win = new CFClient::UI::FancyFrame |
1128 | my $win = new CFClient::UI::FancyFrame |
1127 | x => 'center', |
1129 | x => 'center', |
1128 | y => 'center', |
1130 | y => 'center', |
|
|
1131 | z => 2, |
1129 | name => 'doc_browser', |
1132 | name => 'doc_browser', |
1130 | force_w => int $WIDTH * 7/8, |
1133 | force_w => int $WIDTH * 7/8, |
1131 | force_h => int $HEIGHT * 7/8, |
1134 | force_h => int $HEIGHT * 7/8, |
1132 | title => "Documentation"; |
1135 | title => "Documentation"; |
1133 | |
1136 | |
… | |
… | |
1208 | $DEBUG_STATUS->show; |
1211 | $DEBUG_STATUS->show; |
1209 | |
1212 | |
1210 | $BIND_EDITOR = new CFClient::UI::BindEditor (x => "max", y => 0); |
1213 | $BIND_EDITOR = new CFClient::UI::BindEditor (x => "max", y => 0); |
1211 | |
1214 | |
1212 | $STATUSBOX = new CFClient::UI::Statusbox; |
1215 | $STATUSBOX = new CFClient::UI::Statusbox; |
1213 | $STATUSBOX->add ("Use <b>Alt-Enter</b> to toggle fullscreen mode", pri => -100, color => [1, 1, 1, 0.8]); |
1216 | $STATUSBOX->add ("Use <b>Alt-Enter</b> to toggle fullscreen mode", timeout => 864000, pri => -100, color => [1, 1, 1, 0.8]); |
1214 | |
1217 | |
1215 | (new CFClient::UI::Frame |
1218 | (new CFClient::UI::Frame |
1216 | bg => [0, 0, 0, 0.4], |
1219 | bg => [0, 0, 0, 0.4], |
1217 | force_x => 0, |
1220 | force_x => 0, |
1218 | force_y => "max", |
1221 | force_y => "max", |
… | |
… | |
1259 | $SETUP_DIALOG = new CFClient::UI::FancyFrame |
1262 | $SETUP_DIALOG = new CFClient::UI::FancyFrame |
1260 | title => "Setup", |
1263 | title => "Setup", |
1261 | name => "setup_dialog", |
1264 | name => "setup_dialog", |
1262 | x => 'center', |
1265 | x => 'center', |
1263 | y => 'center', |
1266 | y => 'center', |
|
|
1267 | z => 2, |
1264 | force_w => $::WIDTH * 0.6, |
1268 | force_w => $::WIDTH * 0.6, |
1265 | force_h => $::HEIGHT * 0.6, |
1269 | force_h => $::HEIGHT * 0.6, |
1266 | ; |
1270 | ; |
1267 | |
1271 | |
1268 | $SETUP_DIALOG->add ($SETUP_NOTEBOOK = new CFClient::UI::Notebook expand => 1, debug => 1, |
1272 | $SETUP_DIALOG->add ($SETUP_NOTEBOOK = new CFClient::UI::Notebook expand => 1, debug => 1, |
… | |
… | |
1276 | "Configure the video mode, performance, fonts and other graphical aspects of the game."); |
1280 | "Configure the video mode, performance, fonts and other graphical aspects of the game."); |
1277 | $SETUP_NOTEBOOK->add (Audio => audio_setup, |
1281 | $SETUP_NOTEBOOK->add (Audio => audio_setup, |
1278 | "Configure the use of audio, sound effects and background music."); |
1282 | "Configure the use of audio, sound effects and background music."); |
1279 | $SETUP_NOTEBOOK->add (Keyboard => $SETUP_KEYBOARD = keyboard_setup, |
1283 | $SETUP_NOTEBOOK->add (Keyboard => $SETUP_KEYBOARD = keyboard_setup, |
1280 | "Lets you define, edit and delete bindings." |
1284 | "Lets you define, edit and delete bindings." |
1281 | . "There is a shortcut for making bindings: Left Control + Insert opens the binding editor " |
1285 | . "There is a shortcut for making bindings: <b>Left Control + Insert</b> opens the binding editor " |
1282 | . "with nothing set and the recording started. After doing the actions you " |
1286 | . "with nothing set and the recording started. After doing the actions you " |
1283 | . "want to record press Insert and you will be asked to press a key-combo. " |
1287 | . "want to record press <b>Insert</b> and you will be asked to press a key-combo. " |
1284 | . "After pressing the combo the binding will be saved automatically and the " |
1288 | . "After pressing the combo the binding will be saved automatically and the " |
1285 | . "binding editor closes"); |
1289 | . "binding editor closes"); |
1286 | $SETUP_NOTEBOOK->add (Spells => $SETUP_SPELLS = spell_setup, |
1290 | $SETUP_NOTEBOOK->add (Spells => $SETUP_SPELLS = spell_setup, |
1287 | "Displays all spells you have and lets you edit keyboard shortcuts for them."); |
1291 | "Displays all spells you have and lets you edit keyboard shortcuts for them."); |
1288 | |
1292 | |