ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/bin/cfplus
(Generate patch)

Comparing deliantra/Deliantra-Client/bin/cfplus (file contents):
Revision 1.79 by root, Fri Jun 23 23:54:31 2006 UTC vs.
Revision 1.85 by elmex, Sun Jul 2 19:32:56 2006 UTC

36 36
37use CFClient; 37use CFClient;
38use CFClient::OpenGL (); 38use CFClient::OpenGL ();
39use CFClient::Protocol; 39use CFClient::Protocol;
40use CFClient::UI; 40use CFClient::UI;
41use CFClient::BindingEditor;
41use CFClient::MapWidget; 42use CFClient::MapWidget;
42 43
43$SIG{QUIT} = sub { Carp::cluck "QUIT" }; 44$SIG{QUIT} = sub { Carp::cluck "QUIT" };
44 45
45$Event::DIED = sub { 46$Event::DIED = sub {
109 110
110our $ALT_ENTER_MESSAGE; 111our $ALT_ENTER_MESSAGE;
111our $STATUSBOX; 112our $STATUSBOX;
112our $DEBUG_STATUS; 113our $DEBUG_STATUS;
113 114
114our $INV_WINDOW;
115our $INV; 115our $INV;
116our $INVR; 116our $INVR;
117our $INV_RIGHT_HB; 117our $INV_RIGHT_HB;
118
119our $PL_NOTEBOOK;
120our $PL_WINDOW;
118 121
119our $BIND_EDITOR; 122our $BIND_EDITOR;
120our $BIND_UPD_CB; 123our $BIND_UPD_CB;
121 124
122our $PICKUP_CFG; 125our $PICKUP_CFG;
372 375
373sub stop_game { 376sub stop_game {
374 $LOGIN_BUTTON->set_text ("Login"); 377 $LOGIN_BUTTON->set_text ("Login");
375 $SETUP_NOTEBOOK->set_current_page ($SETUP_SERVER); 378 $SETUP_NOTEBOOK->set_current_page ($SETUP_SERVER);
376 $SETUP_DIALOG->show; 379 $SETUP_DIALOG->show;
377 $INV_WINDOW->hide; 380 $PL_WINDOW->hide;
378 $SETUP_SPELLS->clear_spells; 381 $SETUP_SPELLS->clear_spells;
379 382
380 return unless $CONN; 383 return unless $CONN;
381 384
382 status "connection closed"; 385 status "connection closed";
652 655
653 $table 656 $table
654} 657}
655 658
656sub stats_window { 659sub stats_window {
657 my $tgw = new CFClient::UI::FancyFrame 660 my $tgw =
658 y => $HEIGHT * (2/8), 661 new CFClient::UI::Window
659 x => "max", 662 child => my $vb = new CFClient::UI::VBox;
660 title => "Stats",
661 name => "stats_window",
662 has_close_button => 1;
663 663
664 $tgw->add (new CFClient::UI::Window child => my $vb = new CFClient::UI::VBox);
665 $vb->add ($STATWIDS->{title} = new CFClient::UI::Label valign => 0, align => -1, text => "Title:", expand => 1, 664 $vb->add ($STATWIDS->{title} = new CFClient::UI::Label valign => 0, align => -1, text => "Title:", expand => 1,
666 can_hover => 1, can_events => 1, 665 can_hover => 1, can_events => 1,
667 tooltip => "Your name and title. You can change your title by using the <b>title</b> command, if supported by the server."); 666 tooltip => "Your name and title. You can change your title by using the <b>title</b> command, if supported by the server.");
668 $vb->add ($STATWIDS->{map} = new CFClient::UI::Label valign => 0, align => -1, text => "Map:", expand => 1, 667 $vb->add ($STATWIDS->{map} = new CFClient::UI::Label valign => 0, align => -1, text => "Map:", expand => 1,
669 can_hover => 1, can_events => 1, 668 can_hover => 1, can_events => 1,
693 [0, 6, st_cha => "Cha", 30, "<b>Charisma</b>, how well you are received by NPCs. Affects buying and selling prices in shops."], 692 [0, 6, st_cha => "Cha", 30, "<b>Charisma</b>, how well you are received by NPCs. Affects buying and selling prices in shops."],
694 693
695 [2, 0, st_wc => "Wc", -120, "<b>Weapon Class</b>, effectiveness of melee/missile attacks. Lower is more potent. Current weapon, level and Str are some things which effect the value of Wc. The value of Wc may range between 25 and -72."], 694 [2, 0, st_wc => "Wc", -120, "<b>Weapon Class</b>, effectiveness of melee/missile attacks. Lower is more potent. Current weapon, level and Str are some things which effect the value of Wc. The value of Wc may range between 25 and -72."],
696 [2, 1, st_ac => "Ac", -120, "<b>Armour Class</b>, how protected you are from being hit by any attack. Lower values are better. Ac is based on your race and is modified by the Dex and current armour worn. For characters that cannot wear armour, Ac improves as their level increases."], 695 [2, 1, st_ac => "Ac", -120, "<b>Armour Class</b>, how protected you are from being hit by any attack. Lower values are better. Ac is based on your race and is modified by the Dex and current armour worn. For characters that cannot wear armour, Ac improves as their level increases."],
697 [2, 2, st_dam => "Dam", 120, "<b>Damage</b>, how much damage your melee/missile attack inflicts. Higher values indicate a greater amount of damage will be inflicted with each attack."], 696 [2, 2, st_dam => "Dam", 120, "<b>Damage</b>, how much damage your melee/missile attack inflicts. Higher values indicate a greater amount of damage will be inflicted with each attack."],
698 [2, 3, st_arm => "Arm", 120, "<b>Armour</b>, how much damage (from physical attacks) will be subtracted from successful hits made upon you. This value ranges between 0 to 99%. Current armour worn primarily determines Arm value."], 697 [2, 3, st_arm => "Arm", 120, "<b>Armour</b>, how much damage (from physical attacks) will be subtracted from successful hits made upon you. This value ranges between 0 to 99%. Current armour worn primarily determines Arm value. This is the same as the physical resistance."],
699 [2, 4, st_spd => "Spd", 10.54, "<b>Speed</b>, how fast you can move. The value of speed may range between nearly 0 (\"very slow\") to higher than 5 (\"lightning fast\"). Base speed is determined from the Dex and modified downward proportionally by the amount of weight carried which exceeds the Max Carry limit. The armour worn also sets the upper limit on speed."], 698 [2, 4, st_spd => "Spd", 10.54, "<b>Speed</b>, how fast you can move. The value of speed may range between nearly 0 (\"very slow\") to higher than 5 (\"lightning fast\"). Base speed is determined from the Dex and modified downward proportionally by the amount of weight carried which exceeds the Max Carry limit. The armour worn also sets the upper limit on speed."],
700 [2, 5, st_wspd => "WSp", 10.54, "<b>Weapon Speed</b>, how many attacks you may make per unit of time (0.120s). Higher values indicate faster attack speed. Current weapon and Dex effect the value of weapon speed."], 699 [2, 5, st_wspd => "WSp", 10.54, "<b>Weapon Speed</b>, how many attacks you may make per unit of time (0.120s). Higher values indicate faster attack speed. Current weapon and Dex effect the value of weapon speed."],
701 ) { 700 ) {
702 my ($col, $row, $id, $label, $template, $tooltip) = @$_; 701 my ($col, $row, $id, $label, $template, $tooltip) = @$_;
703 702
722 drain => "<b>Draining</b> (some monsters (e.g. vampires) and other effects can steal experience)", 721 drain => "<b>Draining</b> (some monsters (e.g. vampires) and other effects can steal experience)",
723 acid => "<b>Acid</b> (resistance to acid, acid hurts pretty much and also corrodes your weapons)", 722 acid => "<b>Acid</b> (resistance to acid, acid hurts pretty much and also corrodes your weapons)",
724 pois => "<b>Poison</b> (resistance to getting poisoned)", 723 pois => "<b>Poison</b> (resistance to getting poisoned)",
725 para => "<b>Paralysation</b> (this resistance affects the chance you get paralysed)", 724 para => "<b>Paralysation</b> (this resistance affects the chance you get paralysed)",
726 deat => "<b>Death</b> (resistance against death spells)", 725 deat => "<b>Death</b> (resistance against death spells)",
727 phys => "<b>Physical</b> (this is the resistance against physical attacks, like when a monster hit you in melee combat)", 726 phys => "<b>Physical</b> (this is the resistance against physical attacks, like when a monster hit you in melee combat. The value displayed here is also displayed in the 'Arm' field on the left.)",
728 blind => "<b>Blind</b> (blind resistance affects the chance of a successful blinding attack)", 727 blind => "<b>Blind</b> (blind resistance affects the chance of a successful blinding attack)",
729 fear => "<b>Fear</b> (this attack will drive you away from monsters who cast this and hit you successfully, being resistant to this helps a lot when fighting those monsters)", 728 fear => "<b>Fear</b> (this attack will drive you away from monsters who cast this and hit you successfully, being resistant to this helps a lot when fighting those monsters)",
730 tund => "<b>Turn undead</b> (affects your resistancy to various forms of 'turn undead' spells. Only relevant when you are, in fact, undead...", 729 tund => "<b>Turn undead</b> (affects your resistancy to various forms of 'turn undead' spells. Only relevant when you are, in fact, undead...",
731 elec => "<b>Electricity</b> (resistance against electricity, spells like large lightning, small lightning, ...)", 730 elec => "<b>Electricity</b> (resistance against electricity, spells like large lightning, small lightning, ...)",
732 cold => "<b>Cold</b> (this is your resistance against cold spells like icestorm, snowstorm, ...)", 731 cold => "<b>Cold</b> (this is your resistance against cold spells like icestorm, snowstorm, ...)",
807 $STATWIDS->{st_pow} ->set_text (sprintf "%d" , $stats->{+CS_STAT_POW}); 806 $STATWIDS->{st_pow} ->set_text (sprintf "%d" , $stats->{+CS_STAT_POW});
808 $STATWIDS->{st_cha} ->set_text (sprintf "%d" , $stats->{+CS_STAT_CHA}); 807 $STATWIDS->{st_cha} ->set_text (sprintf "%d" , $stats->{+CS_STAT_CHA});
809 $STATWIDS->{st_wc} ->set_text (sprintf "%d" , $stats->{+CS_STAT_WC}); 808 $STATWIDS->{st_wc} ->set_text (sprintf "%d" , $stats->{+CS_STAT_WC});
810 $STATWIDS->{st_ac} ->set_text (sprintf "%d" , $stats->{+CS_STAT_AC}); 809 $STATWIDS->{st_ac} ->set_text (sprintf "%d" , $stats->{+CS_STAT_AC});
811 $STATWIDS->{st_dam} ->set_text (sprintf "%d" , $stats->{+CS_STAT_DAM}); 810 $STATWIDS->{st_dam} ->set_text (sprintf "%d" , $stats->{+CS_STAT_DAM});
812 $STATWIDS->{st_arm} ->set_text (sprintf "%d" , $stats->{+CS_STAT_ARMOUR}); 811 $STATWIDS->{st_arm} ->set_text (sprintf "%d" , $stats->{+CS_STAT_RES_PHYS});
813 $STATWIDS->{st_spd} ->set_text (sprintf "%.1f", $stats->{+CS_STAT_SPEED}); 812 $STATWIDS->{st_spd} ->set_text (sprintf "%.1f", $stats->{+CS_STAT_SPEED});
814 $STATWIDS->{st_wspd}->set_text (sprintf "%.1f", $stats->{+CS_STAT_WEAP_SP}); 813 $STATWIDS->{st_wspd}->set_text (sprintf "%.1f", $stats->{+CS_STAT_WEAP_SP});
815 814
816 $STATWIDS->{m_weight}->set_text (sprintf "Max weight: %.1fkg", $stats->{+CS_STAT_WEIGHT_LIM} / 1000); 815 $STATWIDS->{m_weight}->set_text (sprintf "Max weight: %.1fkg", $stats->{+CS_STAT_WEIGHT_LIM} / 1000);
817 816
841} 840}
842 841
843my $METASERVER_ATIME; 842my $METASERVER_ATIME;
844 843
845sub update_metaserver { 844sub update_metaserver {
845 my ($metaserver_dialog) = @_;
846
847 $METASERVER = $metaserver_dialog
848 if defined $metaserver_dialog;
849
846 return if $METASERVER_ATIME > time; 850 return if $METASERVER_ATIME > time;
847 $METASERVER_ATIME = time + 60; 851 $METASERVER_ATIME = time + 60;
848 852
849 my $table = $METASERVER->{table}; 853 my $table = $METASERVER->{table};
850 $table->clear; 854 $table->clear;
938 } 942 }
939 }); 943 });
940} 944}
941 945
942sub metaserver_dialog { 946sub metaserver_dialog {
947 my $vbox = new CFClient::UI::VBox;
948 my $table = new CFClient::UI::Table;
949 $vbox->add (new CFClient::UI::ScrolledWindow expand => 1, child => $table);
950
943 my $dialog = new CFClient::UI::FancyFrame 951 my $dialog = new CFClient::UI::FancyFrame
944 title => "Server List", 952 title => "Server List",
945 name => 'metaserver_dialog', 953 name => 'metaserver_dialog',
946 x => 'center', 954 x => 'center',
947 y => 'center', 955 y => 'center',
948 z => 3, 956 z => 3,
949 force_h => $::HEIGHT * 0.4, 957 force_h => $::HEIGHT * 0.4,
950 child => (my $vbox = new CFClient::UI::VBox), 958 child => $vbox,
959 has_close_button => 1,
960 table => $table,
951 on_visibility_change => sub { 961 on_visibility_change => sub {
952 update_metaserver if $_[1]; 962 update_metaserver ($_[0]) if $_[1];
953 0 963 0
954 }, 964 },
955 ; 965 ;
956
957 $dialog->{table} = new CFClient::UI::Table;
958
959 $vbox->add (new CFClient::UI::ScrolledWindow expand => 1, child => $dialog->{table});
960 966
961 $dialog 967 $dialog
962} 968}
963 969
964sub server_setup { 970sub server_setup {
979 my ($self, $value) = @_; 985 my ($self, $value) = @_;
980 $CFG->{profile}{default}{host} = $value; 986 $CFG->{profile}{default}{host} = $value;
981 0 987 0
982 } 988 }
983 ); 989 );
984
985 $METASERVER = metaserver_dialog;
986 990
987 $vbox->add (new CFClient::UI::Button 991 $vbox->add (new CFClient::UI::Button
988 expand => 1, 992 expand => 1,
989 text => "Server List", 993 text => "Server List",
990 other => $METASERVER, 994 other => $METASERVER,
1230 ++$y; 1234 ++$y;
1231 1235
1232 my $mask = $_->[1]; 1236 my $mask = $_->[1];
1233 $table->add ($x , $y, new CFClient::UI::Label text => $_->[0], align => 1, expand => 1); 1237 $table->add ($x , $y, new CFClient::UI::Label text => $_->[0], align => 1, expand => 1);
1234 $table->add ($x+1, $y, new CFClient::UI::CheckBox 1238 $table->add ($x+1, $y, new CFClient::UI::CheckBox
1235 state => $CFG->{pickup} & $mask, 1239 state => $::CFG->{pickup} & $mask,
1236 on_changed => sub { 1240 on_changed => sub {
1237 my ($box, $value) = @_; 1241 my ($box, $value) = @_;
1238 1242
1239 if ($value) { 1243 if ($value) {
1240 $::CFG->{pickup} |= $mask; 1244 $::CFG->{pickup} |= $mask;
1249 }); 1253 });
1250 } 1254 }
1251 } 1255 }
1252 1256
1253 $table->add (2, 18, new CFClient::UI::ValSlider 1257 $table->add (2, 18, new CFClient::UI::ValSlider
1254 range => [0, 0, 16, 1, 1], 1258 range => [$::CFG->{pickup} & 0xF, 0, 16, 1, 1],
1259 template => ">= 99",
1255 to_value => sub { ">= " . 5 * $_[0] }, 1260 to_value => sub { ">= " . 5 * $_[0] },
1256 on_changed => sub { 1261 on_changed => sub {
1257 my ($slider, $value) = @_; 1262 my ($slider, $value) = @_;
1258 1263
1259 $::CFG->{pickup} &= ~0x7; 1264 $::CFG->{pickup} &= ~0xF;
1260 $::CFG->{pickup} |= int $value 1265 $::CFG->{pickup} |= int $value
1261 if $value; 1266 if $value;
1262 1; 1267 1;
1263 }); 1268 });
1269
1264 $table->add (3, 18, new CFClient::UI::Button 1270 $table->add (3, 18, new CFClient::UI::Button
1265 text => "set", 1271 text => "set",
1266 on_activate => sub { 1272 on_activate => sub {
1267 $::CONN->send_command ("pickup $::CFG->{pickup}") 1273 $::CONN->send_command ("pickup $::CFG->{pickup}")
1268 if defined $::CONN; 1274 if defined $::CONN;
1270 }); 1276 });
1271 1277
1272 $table 1278 $table
1273} 1279}
1274 1280
1275sub inventory_window { 1281sub inventory_widget {
1282 my $hb = new CFClient::UI::HBox homogeneous => 1;
1283
1284 $hb->add (my $vb1 = new CFClient::UI::VBox);
1285 $vb1->add (new CFClient::UI::Label align => 0, text => "Player");
1286 $vb1->add ($INV = new CFClient::UI::Inventory);
1287
1288 $hb->add (my $vb2 = new CFClient::UI::VBox);
1289
1290 $vb2->add ($INV_RIGHT_HB = new CFClient::UI::HBox);
1291
1292 $vb2->add ($INVR = new CFClient::UI::Inventory);
1293
1294 # XXX: Call after $INVR = ... because set_opencont sets the items
1295 CFClient::Protocol::set_opencont ($::CONN, 0, "Floor");
1296
1297 $hb
1298}
1299
1300sub player_window {
1276 my $invwin = $INV_WINDOW = new CFClient::UI::FancyFrame 1301 my $plwin = $PL_WINDOW = new CFClient::UI::FancyFrame
1277 x => "center", 1302 x => "center",
1278 y => "center", 1303 y => "center",
1279 force_w => $WIDTH * 9/10, 1304 force_w => $WIDTH * 9/10,
1280 force_h => $HEIGHT * 9/10, 1305 force_h => $HEIGHT * 9/10,
1281 title => "Inventory", 1306 title => "Player",
1282 has_close_button => 1, 1307 has_close_button => 1
1283 ; 1308 ;
1284 1309
1285 $invwin->add (my $hb = new CFClient::UI::HBox homogeneous => 1); 1310 my $ntb =
1311 $PL_NOTEBOOK =
1312 new CFClient::UI::Notebook
1313 expand => 1,
1314 debug => 1,
1315 filter => (new CFClient::UI::ScrolledWindow expand => 1, scroll_y => 1),
1316 ;
1317 $ntb->add (
1318 Inventory => inventory_widget,
1319 "Toggles the inventory window, where you can manage your loot (or treasures :). "
1320 . "You can also hit the <b>Tab</b>-key to show/hide the Inventory."
1321 );
1286 1322
1287 $hb->add (my $vb1 = new CFClient::UI::VBox); 1323 $ntb->add (
1288 $vb1->add (new CFClient::UI::Label align => 0, text => "Player"); 1324 Stats => $STATS_WINDOW = stats_window,
1289 $vb1->add ($INV = new CFClient::UI::Inventory expand => 1); 1325 "Toggles the statistics window, where all your Stats and Resistances are being displayed at all times."
1326 );
1327 $ntb->add (
1328 Spells => $SETUP_SPELLS = new CFClient::UI::SpellList,
1329 "Displays all spells you have and lets you edit keyboard shortcuts for them."
1330 );
1290 1331
1291 $hb->add (my $vb2 = new CFClient::UI::VBox); 1332 $plwin->add ($ntb);
1292 1333 $plwin
1293 $vb2->add ($INV_RIGHT_HB = new CFClient::UI::HBox);
1294
1295 $vb2->add ($INVR = new CFClient::UI::Inventory expand => 1);
1296
1297 # XXX: Call after $INVR = ... because set_opencont sets the items
1298 CFClient::Protocol::set_opencont ($::CONN, 0, "Floor");
1299
1300 $invwin
1301}
1302
1303sub spell_setup {
1304 new CFClient::UI::SpellList
1305} 1334}
1306 1335
1307sub update_bindings { 1336sub update_bindings {
1308 $BIND_UPD_CB->() if $BIND_UPD_CB; 1337 $BIND_UPD_CB->() if $BIND_UPD_CB;
1309} 1338}
1319 for my $sym (keys %{$::CFG->{profile}{default}{bindings}{$mod}}) { 1348 for my $sym (keys %{$::CFG->{profile}{default}{bindings}{$mod}}) {
1320 my $cmds = $::CFG->{profile}{default}{bindings}{$mod}{$sym}; 1349 my $cmds = $::CFG->{profile}{default}{bindings}{$mod}{$sym};
1321 next unless ref $cmds eq 'ARRAY' and @$cmds > 0; 1350 next unless ref $cmds eq 'ARRAY' and @$cmds > 0;
1322 1351
1323 my $lbl = join "; ", @$cmds; 1352 my $lbl = join "; ", @$cmds;
1324 my $nam = CFClient::Binder::keycombo_to_name ($mod, $sym); 1353 my $nam = CFClient::BindingEditor::keycombo_to_name ($mod, $sym);
1325 $binding_list->add (my $hb = new CFClient::UI::HBox); 1354 $binding_list->add (my $hb = new CFClient::UI::HBox);
1326 $hb->add (new CFClient::UI::Button 1355 $hb->add (new CFClient::UI::Button
1327 text => "delete", 1356 text => "delete",
1328 tooltip => "Deletes the binding", 1357 tooltip => "Deletes the binding",
1329 on_activate => sub { 1358 on_activate => sub {
1515 z => 100, 1544 z => 100,
1516 force_x => "max", 1545 force_x => "max",
1517 force_y => 0; 1546 force_y => 0;
1518 $DEBUG_STATUS->show; 1547 $DEBUG_STATUS->show;
1519 1548
1520 $BIND_EDITOR = new CFClient::UI::BindEditor (x => "max", y => 0); 1549 $BIND_EDITOR = new CFClient::BindingEditor (x => "max", y => 0);
1521 1550
1522 $STATUSBOX = new CFClient::UI::Statusbox; 1551 $STATUSBOX = new CFClient::UI::Statusbox;
1523 $STATUSBOX->add ("Use <b>Alt-Enter</b> to toggle fullscreen mode", timeout => 864000, pri => -100, color => [1, 1, 1, 0.8]); 1552 $STATUSBOX->add ("Use <b>Alt-Enter</b> to toggle fullscreen mode", timeout => 864000, pri => -100, color => [1, 1, 1, 0.8]);
1524 1553
1525 (new CFClient::UI::Frame 1554 (new CFClient::UI::Frame
1575 z => 2, 1604 z => 2,
1576 force_w => $::WIDTH * 0.6, 1605 force_w => $::WIDTH * 0.6,
1577 force_h => $::HEIGHT * 0.6, 1606 force_h => $::HEIGHT * 0.6,
1578 has_close_button => 1, 1607 has_close_button => 1,
1579 ; 1608 ;
1609
1610 $METASERVER = metaserver_dialog;
1580 1611
1581 $SETUP_DIALOG->add ($SETUP_NOTEBOOK = new CFClient::UI::Notebook expand => 1, debug => 1, 1612 $SETUP_DIALOG->add ($SETUP_NOTEBOOK = new CFClient::UI::Notebook expand => 1, debug => 1,
1582 filter => new CFClient::UI::ScrolledWindow expand => 1, scroll_y => 1); 1613 filter => new CFClient::UI::ScrolledWindow expand => 1, scroll_y => 1);
1583 1614
1584 $SETUP_NOTEBOOK->add (Server => $SETUP_SERVER = server_setup, 1615 $SETUP_NOTEBOOK->add (Server => $SETUP_SERVER = server_setup,
1594 . "There is a shortcut for making bindings: <b>Control-Insert</b> opens the binding editor " 1625 . "There is a shortcut for making bindings: <b>Control-Insert</b> opens the binding editor "
1595 . "with nothing set and the recording started. After doing the actions you " 1626 . "with nothing set and the recording started. After doing the actions you "
1596 . "want to record press <b>Insert</b> and you will be asked to press a key-combo. " 1627 . "want to record press <b>Insert</b> and you will be asked to press a key-combo. "
1597 . "After pressing the combo the binding will be saved automatically and the " 1628 . "After pressing the combo the binding will be saved automatically and the "
1598 . "binding editor closes"); 1629 . "binding editor closes");
1599 $SETUP_NOTEBOOK->add (Spells => $SETUP_SPELLS = spell_setup,
1600 "Displays all spells you have and lets you edit keyboard shortcuts for them.");
1601 $SETUP_NOTEBOOK->add (Debug => debug_setup, 1630 $SETUP_NOTEBOOK->add (Debug => debug_setup,
1602 "Some debuggin' options. Do not ask."); 1631 "Some debuggin' options. Do not ask.");
1603 1632
1604 $BUTTONBAR = new CFClient::UI::Buttonbar x => 0, y => 0, z => 200; # put on top 1633 $BUTTONBAR = new CFClient::UI::Buttonbar x => 0, y => 0, z => 200; # put on top
1605 1634
1609 $BUTTONBAR->add (new CFClient::UI::Flopper text => "Message Window", other => $MESSAGE_WINDOW = message_window, 1638 $BUTTONBAR->add (new CFClient::UI::Flopper text => "Message Window", other => $MESSAGE_WINDOW = message_window,
1610 tooltip => "Toggles the server message log, where the client collects <i>all</i> messages from the server."); 1639 tooltip => "Toggles the server message log, where the client collects <i>all</i> messages from the server.");
1611 1640
1612 make_gauge_window->show; # XXX: this has to be set before make_stats_window as make_stats_window calls update_stats_window which updated the gauges also X-D 1641 make_gauge_window->show; # XXX: this has to be set before make_stats_window as make_stats_window calls update_stats_window which updated the gauges also X-D
1613 1642
1614 $BUTTONBAR->add (new CFClient::UI::Flopper text => "Stats Window", other => $STATS_WINDOW = stats_window,
1615 tooltip => "Toggles the statistics window, where all your Stats and Resistances are being displayed at all times.");
1616 $BUTTONBAR->add (new CFClient::UI::Flopper text => "Inventory", other => inventory_window, 1643 $BUTTONBAR->add (new CFClient::UI::Flopper text => "Player", other => player_window,
1617 tooltip => "Toggles the inventory window, where you can manage your loot (or treasures :). " 1644 tooltip => "Toggles the player view, where you can manage Inventory, Spells, Skills and see your Stats.");
1618 . "You can also hit the <b>Tab</b>-key to show/hide the Inventory.");
1619 1645
1620 $BUTTONBAR->add (new CFClient::UI::Button 1646 $BUTTONBAR->add (new CFClient::UI::Button
1621 text => "Save Config", 1647 text => "Save Config",
1622 tooltip => "Saves the options chosen in the client setting, server settings and the window layout to be restored on later runs.", 1648 tooltip => "Saves the options chosen in the client setting, server settings and the window layout to be restored on later runs.",
1623 on_activate => sub { 1649 on_activate => sub {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines