… | |
… | |
710 | my $dialog = new CFClient::UI::FancyFrame |
710 | my $dialog = new CFClient::UI::FancyFrame |
711 | title => "Server List", |
711 | title => "Server List", |
712 | name => 'metaserver_dialog', |
712 | name => 'metaserver_dialog', |
713 | x => 'center', |
713 | x => 'center', |
714 | y => 'center', |
714 | y => 'center', |
|
|
715 | z => 3, |
715 | child => (my $vbox = new CFClient::UI::VBox), |
716 | child => (my $vbox = new CFClient::UI::VBox), |
716 | on_visibility_change => sub { |
717 | on_visibility_change => sub { |
717 | update_metaserver if $_[1]; |
718 | update_metaserver if $_[1]; |
718 | }, |
719 | }, |
719 | ; |
720 | ; |
… | |
… | |
934 | sub autopickup_setup { |
935 | sub autopickup_setup { |
935 | my $table = new CFClient::UI::Table; |
936 | my $table = new CFClient::UI::Table; |
936 | |
937 | |
937 | for ( |
938 | for ( |
938 | ["General", 0, 0, |
939 | ["General", 0, 0, |
939 | ["Enable autopickup" => CFClient::Pickup::PU_NEWMODE], |
940 | ["Enable autopickup" => PICKUP_NEWMODE], |
940 | ["Inhibit autopickup" => CFClient::Pickup::PU_INHIBIT], |
941 | ["Inhibit autopickup" => PICKUP_INHIBIT], |
941 | ["Stop before pickup" => CFClient::Pickup::PU_STOP], |
942 | ["Stop before pickup" => PICKUP_STOP], |
942 | ["Debug autopickup" => CFClient::Pickup::PU_DEBUG], |
943 | ["Debug autopickup" => PICKUP_DEBUG], |
943 | ], |
944 | ], |
944 | ["Weapons", 0, 6, |
945 | ["Weapons", 0, 6, |
945 | ["All weapons" => CFClient::Pickup::PU_ALLWEAPON], |
946 | ["All weapons" => PICKUP_ALLWEAPON], |
946 | ["Missile weapons" => CFClient::Pickup::PU_MISSILEWEAPON], |
947 | ["Missile weapons" => PICKUP_MISSILEWEAPON], |
947 | ["Bows" => CFClient::Pickup::PU_BOW], |
948 | ["Bows" => PICKUP_BOW], |
948 | ["Arrows" => CFClient::Pickup::PU_ARROW], |
949 | ["Arrows" => PICKUP_ARROW], |
949 | ], |
950 | ], |
950 | ["Armour", 0, 12, |
951 | ["Armour", 0, 12, |
951 | ["Helmets" => CFClient::Pickup::PU_HELMET], |
952 | ["Helmets" => PICKUP_HELMET], |
952 | ["Shields" => CFClient::Pickup::PU_SHIELD], |
953 | ["Shields" => PICKUP_SHIELD], |
953 | ["Body Armour" => CFClient::Pickup::PU_ARMOUR], |
954 | ["Body Armour" => PICKUP_ARMOUR], |
954 | ["Boots" => CFClient::Pickup::PU_BOOTS], |
955 | ["Boots" => PICKUP_BOOTS], |
955 | ["Gloves" => CFClient::Pickup::PU_GLOVES], |
956 | ["Gloves" => PICKUP_GLOVES], |
956 | ["Cloaks" => CFClient::Pickup::PU_CLOAK], |
957 | ["Cloaks" => PICKUP_CLOAK], |
957 | ], |
958 | ], |
958 | |
959 | |
959 | ["Readables", 2, 2, |
960 | ["Readables", 2, 2, |
960 | ["Spellbooks" => CFClient::Pickup::PU_SPELLBOOK], |
961 | ["Spellbooks" => PICKUP_SPELLBOOK], |
961 | ["Skillscrolls" => CFClient::Pickup::PU_SKILLSCROLL], |
962 | ["Skillscrolls" => PICKUP_SKILLSCROLL], |
962 | ["Normal Books/Scrolls" => CFClient::Pickup::PU_READABLES], |
963 | ["Normal Books/Scrolls" => PICKUP_READABLES], |
963 | ], |
964 | ], |
964 | ["Misc", 2, 7, |
965 | ["Misc", 2, 7, |
965 | ["Food" => CFClient::Pickup::PU_FOOD], |
966 | ["Food" => PICKUP_FOOD], |
966 | ["Drinks" => CFClient::Pickup::PU_DRINK], |
967 | ["Drinks" => PICKUP_DRINK], |
967 | ["Valuables (Money, Gems)" => CFClient::Pickup::PU_VALUABLES], |
968 | ["Valuables (Money, Gems)" => PICKUP_VALUABLES], |
968 | ["Keys" => CFClient::Pickup::PU_KEY], |
969 | ["Keys" => PICKUP_KEY], |
969 | ["Magical Items" => CFClient::Pickup::PU_MAGICAL], |
970 | ["Magical Items" => PICKUP_MAGICAL], |
970 | ["Potions" => CFClient::Pickup::PU_POTION], |
971 | ["Potions" => PICKUP_POTION], |
971 | ["Magic Devices" => CFClient::Pickup::PU_MAGIC_DEVICE], |
972 | ["Magic Devices" => PICKUP_MAGIC_DEVICE], |
972 | ["Ignore cursed" => CFClient::Pickup::PU_NOT_CURSED], |
973 | ["Ignore cursed" => PICKUP_NOT_CURSED], |
973 | ["Jewelery" => CFClient::Pickup::PU_JEWELS], |
974 | ["Jewelery" => PICKUP_JEWELS], |
974 | ], |
975 | ], |
975 | ) |
976 | ) |
976 | { |
977 | { |
977 | my ($title, $x, $y, @bits) = @$_; |
978 | my ($title, $x, $y, @bits) = @$_; |
978 | $table->add ($x, $y, new CFClient::UI::Label text => $title, align => 1, fg => [1, 1, 0]); |
979 | $table->add ($x, $y, new CFClient::UI::Label text => $title, align => 1, fg => [1, 1, 0]); |
… | |
… | |
1147 | my ($pod, $label) = @$_; |
1148 | my ($pod, $label) = @$_; |
1148 | |
1149 | |
1149 | $buttons->add (new CFClient::UI::Button |
1150 | $buttons->add (new CFClient::UI::Button |
1150 | text => $label, |
1151 | text => $label, |
1151 | on_activate => sub { |
1152 | on_activate => sub { |
1152 | my $pom = CFClient::load_pod CFClient::find_rcfile "pod/$pod.pod"; |
1153 | my $pom = CFClient::load_pod CFClient::find_rcfile "pod/$pod.pod", |
|
|
1154 | doc_viewer => 1, sub { CFClient::pod_to_pango_list $_[0] }; |
1153 | |
1155 | |
1154 | $viewer->clear; |
1156 | $viewer->clear; |
1155 | |
1157 | |
1156 | $viewer->add_paragraph ([1, 1, 1, 1], $_->[1], $_->[0]) |
1158 | $viewer->add_paragraph ([1, 1, 1, 1], $_->[1], $_->[0]) |
1157 | for @{ CFClient::pod_to_pango_list $pom }; |
1159 | for @$pom; |
1158 | |
1160 | |
1159 | $viewer->set_offset (0); |
1161 | $viewer->set_offset (0); |
1160 | }, |
1162 | }, |
1161 | ); |
1163 | ); |
1162 | } |
1164 | } |
… | |
… | |
1271 | filter => new CFClient::UI::ScrolledWindow xxx => 1, expand => 1, scroll_y => 1); |
1273 | filter => new CFClient::UI::ScrolledWindow xxx => 1, expand => 1, scroll_y => 1); |
1272 | |
1274 | |
1273 | $SETUP_NOTEBOOK->add (Server => $SETUP_SERVER = server_setup, |
1275 | $SETUP_NOTEBOOK->add (Server => $SETUP_SERVER = server_setup, |
1274 | "Configure the server to play on, your username, password and other server-related options."); |
1276 | "Configure the server to play on, your username, password and other server-related options."); |
1275 | $SETUP_NOTEBOOK->add (Pickup => autopickup_setup, |
1277 | $SETUP_NOTEBOOK->add (Pickup => autopickup_setup, |
1276 | "Configure autopicking stetings, i.e. which items you will pick up automatically when walking over them."); |
1278 | "Configure autopickup settings, i.e. which items you will pick up automatically when walking (or running) over them."); |
1277 | $SETUP_NOTEBOOK->add (Graphics => graphics_setup, |
1279 | $SETUP_NOTEBOOK->add (Graphics => graphics_setup, |
1278 | "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."); |
1279 | $SETUP_NOTEBOOK->add (Audio => audio_setup, |
1281 | $SETUP_NOTEBOOK->add (Audio => audio_setup, |
1280 | "Configure the use of audio, sound effects and background music."); |
1282 | "Configure the use of audio, sound effects and background music."); |
1281 | $SETUP_NOTEBOOK->add (Keyboard => $SETUP_KEYBOARD = keyboard_setup, |
1283 | $SETUP_NOTEBOOK->add (Keyboard => $SETUP_KEYBOARD = keyboard_setup, |
… | |
… | |
1286 | . "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 " |
1287 | . "binding editor closes"); |
1289 | . "binding editor closes"); |
1288 | $SETUP_NOTEBOOK->add (Spells => $SETUP_SPELLS = spell_setup, |
1290 | $SETUP_NOTEBOOK->add (Spells => $SETUP_SPELLS = spell_setup, |
1289 | "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."); |
1290 | |
1292 | |
1291 | $BUTTONBAR = new CFClient::UI::HBox x => 0, y => 0; |
1293 | $BUTTONBAR = new CFClient::UI::Buttonbar x => 0, y => 0, z => 200; # put on top |
1292 | |
1294 | |
1293 | $BUTTONBAR->add (new CFClient::UI::Flopper text => "Setup", other => $SETUP_DIALOG, |
1295 | $BUTTONBAR->add (new CFClient::UI::Flopper text => "Setup", other => $SETUP_DIALOG, |
1294 | tooltip => "Toggles a dialog where you can configure all aspects of this client."); |
1296 | tooltip => "Toggles a dialog where you can configure all aspects of this client."); |
1295 | |
1297 | |
1296 | $BUTTONBAR->add (new CFClient::UI::Flopper text => "Message Window", other => message_window, |
1298 | $BUTTONBAR->add (new CFClient::UI::Flopper text => "Message Window", other => message_window, |