… | |
… | |
492 | $LOGIN_BUTTON->set_text ("Login"); |
492 | $LOGIN_BUTTON->set_text ("Login"); |
493 | $SETUP_NOTEBOOK->set_current_page ($SETUP_SERVER); |
493 | $SETUP_NOTEBOOK->set_current_page ($SETUP_SERVER); |
494 | $SETUP_DIALOG->show; |
494 | $SETUP_DIALOG->show; |
495 | $PL_WINDOW->hide; |
495 | $PL_WINDOW->hide; |
496 | $SPELL_LIST->clear_spells; |
496 | $SPELL_LIST->clear_spells; |
|
|
497 | $MESSAGE_WINDOW->clear_channels; |
497 | $CFPlus::UI::ROOT->emit (stop_game => ! ! $CONN); |
498 | $CFPlus::UI::ROOT->emit (stop_game => ! ! $CONN); |
498 | |
499 | |
499 | &audio_music_set ([]); |
500 | &audio_music_set ([]); |
500 | |
501 | |
501 | return unless $CONN; |
502 | return unless $CONN; |
… | |
… | |
1184 | sub client_setup { |
1185 | sub client_setup { |
1185 | my $table = new CFPlus::UI::Table expand => 1, col_expand => [0, 1]; |
1186 | my $table = new CFPlus::UI::Table expand => 1, col_expand => [0, 1]; |
1186 | |
1187 | |
1187 | my $row = 0; |
1188 | my $row = 0; |
1188 | |
1189 | |
1189 | $table->add_at (0, $row, new CFPlus::UI::Label valign => 0, align => 1, text => "Chat Command"); |
|
|
1190 | $table->add_at (1, $row++, my $saycmd = new CFPlus::UI::Entry |
|
|
1191 | text => $CFG->{say_command}, |
|
|
1192 | tooltip => "This is the command that will be used if you write a line in the message window entry or press <b>\"</b> in the map window. " |
|
|
1193 | . "Usually you want to enter something like 'say' or 'shout' or 'gsay' here. " |
|
|
1194 | . "But you could also set it to <b>tell <i>playername</i></b> to only chat with that user.", |
|
|
1195 | on_changed => sub { |
|
|
1196 | my ($self, $value) = @_; |
|
|
1197 | $CFG->{say_command} = $value; |
|
|
1198 | 0 |
|
|
1199 | } |
|
|
1200 | ); |
|
|
1201 | |
|
|
1202 | $table->add_at (0, $row, new CFPlus::UI::Label valign => 0, align => 1, text => "Tip of the day"); |
1190 | $table->add_at (0, $row, new CFPlus::UI::Label valign => 0, align => 1, text => "Tip of the day"); |
1203 | $table->add_at (1, $row++, new CFPlus::UI::CheckBox |
1191 | $table->add_at (1, $row++, new CFPlus::UI::CheckBox |
1204 | state => $CFG->{show_tips}, |
1192 | state => $CFG->{show_tips}, |
1205 | tooltip => "Show the <b>Tip of the day</b> window at startup?", |
1193 | tooltip => "Show the <b>Tip of the day</b> window at startup?", |
1206 | on_changed => sub { |
1194 | on_changed => sub { |
… | |
… | |
1417 | |
1405 | |
1418 | my $ntb = |
1406 | my $ntb = |
1419 | $PL_NOTEBOOK = |
1407 | $PL_NOTEBOOK = |
1420 | new CFPlus::UI::Notebook expand => 1; |
1408 | new CFPlus::UI::Notebook expand => 1; |
1421 | |
1409 | |
1422 | $ntb->add ( |
1410 | $ntb->add_tab ( |
1423 | "Statistics (F2)" => $STATS_PAGE = stats_window, |
1411 | "Statistics (F2)" => $STATS_PAGE = stats_window, |
1424 | "Shows statistics, where all your Stats and Resistances are shown." |
1412 | "Shows statistics, where all your Stats and Resistances are shown." |
1425 | ); |
1413 | ); |
1426 | $ntb->add ( |
1414 | $ntb->add_tab ( |
1427 | "Skills (F3)" => $SKILL_PAGE = skill_window, |
1415 | "Skills (F3)" => $SKILL_PAGE = skill_window, |
1428 | "Shows all your Skills." |
1416 | "Shows all your Skills." |
1429 | ); |
1417 | ); |
1430 | |
1418 | |
1431 | my $spellsw = $SPELL_PAGE = new CFPlus::UI::ScrolledWindow (expand => 1, scroll_y => 1); |
1419 | my $spellsw = $SPELL_PAGE = new CFPlus::UI::ScrolledWindow (expand => 1, scroll_y => 1); |
1432 | $spellsw->add ($SPELL_LIST = new CFPlus::UI::SpellList); |
1420 | $spellsw->add ($SPELL_LIST = new CFPlus::UI::SpellList); |
1433 | $ntb->add ( |
1421 | $ntb->add_tab ( |
1434 | "Spellbook (F4)" => $spellsw, |
1422 | "Spellbook (F4)" => $spellsw, |
1435 | "Displays all spells you have and lets you edit keyboard shortcuts for them." |
1423 | "Displays all spells you have and lets you edit keyboard shortcuts for them." |
1436 | ); |
1424 | ); |
1437 | $ntb->add ( |
1425 | $ntb->add_tab ( |
1438 | "Inventory (F5)" => $INVENTORY_PAGE = inventory_widget, |
1426 | "Inventory (F5)" => $INVENTORY_PAGE = inventory_widget, |
1439 | "Toggles the inventory window, where you can manage your loot (or treasures :). " |
1427 | "Toggles the inventory window, where you can manage your loot (or treasures :). " |
1440 | . "You can also hit the <b>Tab</b>-key to show/hide the Inventory." |
1428 | . "You can also hit the <b>Tab</b>-key to show/hide the Inventory." |
1441 | ); |
1429 | ); |
1442 | $ntb->add (Pickup => autopickup_setup, |
1430 | $ntb->add_tab (Pickup => autopickup_setup, |
1443 | "Configure autopickup settings, i.e. which items you will pick up automatically when walking (or running) over them."); |
1431 | "Configure autopickup settings, i.e. which items you will pick up automatically when walking (or running) over them."); |
1444 | |
1432 | |
1445 | $ntb->set_current_page ($INVENTORY_PAGE); |
1433 | $ntb->set_current_page ($INVENTORY_PAGE); |
1446 | |
1434 | |
1447 | $plwin->add ($ntb); |
1435 | $plwin->add ($ntb); |
… | |
… | |
1753 | $MESSAGE_WINDOW = new CFPlus::UI::MessageWindow; |
1741 | $MESSAGE_WINDOW = new CFPlus::UI::MessageWindow; |
1754 | |
1742 | |
1755 | $SETUP_DIALOG->add ($SETUP_NOTEBOOK = new CFPlus::UI::Notebook expand => 1, debug => 1, |
1743 | $SETUP_DIALOG->add ($SETUP_NOTEBOOK = new CFPlus::UI::Notebook expand => 1, debug => 1, |
1756 | filter => new CFPlus::UI::ScrolledWindow expand => 1, scroll_y => 1); |
1744 | filter => new CFPlus::UI::ScrolledWindow expand => 1, scroll_y => 1); |
1757 | |
1745 | |
1758 | $SETUP_NOTEBOOK->add (Server => $SETUP_SERVER = server_setup, |
1746 | $SETUP_NOTEBOOK->add_tab (Server => $SETUP_SERVER = server_setup, |
1759 | "Configure the server to play on, your username, password and other server-related options."); |
1747 | "Configure the server to play on, your username, password and other server-related options."); |
1760 | $SETUP_NOTEBOOK->add (Client => client_setup, |
1748 | $SETUP_NOTEBOOK->add_tab (Client => client_setup, |
1761 | "Configure various client-specific settings."); |
1749 | "Configure various client-specific settings."); |
1762 | $SETUP_NOTEBOOK->add (Graphics => graphics_setup, |
1750 | $SETUP_NOTEBOOK->add_tab (Graphics => graphics_setup, |
1763 | "Configure the video mode, performance, fonts and other graphical aspects of the game."); |
1751 | "Configure the video mode, performance, fonts and other graphical aspects of the game."); |
1764 | $SETUP_NOTEBOOK->add (Audio => audio_setup, |
1752 | $SETUP_NOTEBOOK->add_tab (Audio => audio_setup, |
1765 | "Configure the use of audio, sound effects and background music."); |
1753 | "Configure the use of audio, sound effects and background music."); |
1766 | $SETUP_NOTEBOOK->add (Keyboard => $SETUP_KEYBOARD = keyboard_setup, |
1754 | $SETUP_NOTEBOOK->add_tab (Keyboard => $SETUP_KEYBOARD = keyboard_setup, |
1767 | "Lets you define, edit and delete key bindings." |
1755 | "Lets you define, edit and delete key bindings." |
1768 | . "There is a shortcut for making bindings: <b>Control-Insert</b> opens the binding editor " |
1756 | . "There is a shortcut for making bindings: <b>Control-Insert</b> opens the binding editor " |
1769 | . "with nothing set and the recording started. After doing the actions you " |
1757 | . "with nothing set and the recording started. After doing the actions you " |
1770 | . "want to record press <b>Insert</b> and you will be asked to press a key-combo. " |
1758 | . "want to record press <b>Insert</b> and you will be asked to press a key-combo. " |
1771 | . "After pressing the combo the binding will be saved automatically and the " |
1759 | . "After pressing the combo the binding will be saved automatically and the " |
1772 | . "binding editor closes"); |
1760 | . "binding editor closes"); |
1773 | $SETUP_NOTEBOOK->add (Debug => debug_setup, |
1761 | $SETUP_NOTEBOOK->add_tab (Debug => debug_setup, |
1774 | "Some debuggin' options. Do not ask."); |
1762 | "Some debuggin' options. Do not ask."); |
1775 | |
1763 | |
1776 | $BUTTONBAR = new CFPlus::UI::Buttonbar x => 0, y => 0, z => 200; # put on top |
1764 | $BUTTONBAR = new CFPlus::UI::Buttonbar x => 0, y => 0, z => 200; # put on top |
1777 | |
1765 | |
1778 | $BUTTONBAR->add (new CFPlus::UI::Flopper text => "Setup", other => $SETUP_DIALOG, |
1766 | $BUTTONBAR->add (new CFPlus::UI::Flopper text => "Setup", other => $SETUP_DIALOG, |
… | |
… | |
2200 | log_fontsize => 0.7, |
2188 | log_fontsize => 0.7, |
2201 | gauge_fontsize => 1, |
2189 | gauge_fontsize => 1, |
2202 | gauge_size => 0.35, |
2190 | gauge_size => 0.35, |
2203 | stat_fontsize => 0.7, |
2191 | stat_fontsize => 0.7, |
2204 | mapsize => 100, |
2192 | mapsize => 100, |
2205 | say_command => 'chat', |
|
|
2206 | audio_enable => 1, |
2193 | audio_enable => 1, |
2207 | bgm_enable => 1, |
2194 | bgm_enable => 1, |
2208 | bgm_volume => 0.25, |
2195 | bgm_volume => 0.25, |
2209 | face_prefetch => 0, |
2196 | face_prefetch => 0, |
2210 | output_sync => 1, |
2197 | output_sync => 1, |