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.84 by root, Sun Jul 2 18:52:05 2006 UTC vs.
Revision 1.85 by elmex, Sun Jul 2 19:32:56 2006 UTC

110 110
111our $ALT_ENTER_MESSAGE; 111our $ALT_ENTER_MESSAGE;
112our $STATUSBOX; 112our $STATUSBOX;
113our $DEBUG_STATUS; 113our $DEBUG_STATUS;
114 114
115our $INV_WINDOW;
116our $INV; 115our $INV;
117our $INVR; 116our $INVR;
118our $INV_RIGHT_HB; 117our $INV_RIGHT_HB;
118
119our $PL_NOTEBOOK;
120our $PL_WINDOW;
119 121
120our $BIND_EDITOR; 122our $BIND_EDITOR;
121our $BIND_UPD_CB; 123our $BIND_UPD_CB;
122 124
123our $PICKUP_CFG; 125our $PICKUP_CFG;
373 375
374sub stop_game { 376sub stop_game {
375 $LOGIN_BUTTON->set_text ("Login"); 377 $LOGIN_BUTTON->set_text ("Login");
376 $SETUP_NOTEBOOK->set_current_page ($SETUP_SERVER); 378 $SETUP_NOTEBOOK->set_current_page ($SETUP_SERVER);
377 $SETUP_DIALOG->show; 379 $SETUP_DIALOG->show;
378 $INV_WINDOW->hide; 380 $PL_WINDOW->hide;
379 $SETUP_SPELLS->clear_spells; 381 $SETUP_SPELLS->clear_spells;
380 382
381 return unless $CONN; 383 return unless $CONN;
382 384
383 status "connection closed"; 385 status "connection closed";
653 655
654 $table 656 $table
655} 657}
656 658
657sub stats_window { 659sub stats_window {
658 my $tgw = new CFClient::UI::FancyFrame 660 my $tgw =
659 y => $HEIGHT * (2/8), 661 new CFClient::UI::Window
660 x => "max", 662 child => my $vb = new CFClient::UI::VBox;
661 title => "Stats",
662 name => "stats_window",
663 has_close_button => 1;
664 663
665 $tgw->add (new CFClient::UI::Window child => my $vb = new CFClient::UI::VBox);
666 $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,
667 can_hover => 1, can_events => 1, 665 can_hover => 1, can_events => 1,
668 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.");
669 $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,
670 can_hover => 1, can_events => 1, 668 can_hover => 1, can_events => 1,
1278 }); 1276 });
1279 1277
1280 $table 1278 $table
1281} 1279}
1282 1280
1283sub 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 {
1284 my $invwin = $INV_WINDOW = new CFClient::UI::FancyFrame 1301 my $plwin = $PL_WINDOW = new CFClient::UI::FancyFrame
1285 x => "center", 1302 x => "center",
1286 y => "center", 1303 y => "center",
1287 force_w => $WIDTH * 9/10, 1304 force_w => $WIDTH * 9/10,
1288 force_h => $HEIGHT * 9/10, 1305 force_h => $HEIGHT * 9/10,
1289 title => "Inventory", 1306 title => "Player",
1290 name => "inventory_window",
1291 has_close_button => 1, 1307 has_close_button => 1
1292 ; 1308 ;
1293 1309
1294 $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 );
1295 1322
1296 $hb->add (my $vb1 = new CFClient::UI::VBox); 1323 $ntb->add (
1297 $vb1->add (new CFClient::UI::Label align => 0, text => "Player"); 1324 Stats => $STATS_WINDOW = stats_window,
1298 $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 );
1299 1331
1300 $hb->add (my $vb2 = new CFClient::UI::VBox); 1332 $plwin->add ($ntb);
1301 1333 $plwin
1302 $vb2->add ($INV_RIGHT_HB = new CFClient::UI::HBox);
1303
1304 $vb2->add ($INVR = new CFClient::UI::Inventory expand => 1);
1305
1306 # XXX: Call after $INVR = ... because set_opencont sets the items
1307 CFClient::Protocol::set_opencont ($::CONN, 0, "Floor");
1308
1309 $invwin
1310}
1311
1312sub spell_setup {
1313 new CFClient::UI::SpellList
1314} 1334}
1315 1335
1316sub update_bindings { 1336sub update_bindings {
1317 $BIND_UPD_CB->() if $BIND_UPD_CB; 1337 $BIND_UPD_CB->() if $BIND_UPD_CB;
1318} 1338}
1605 . "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 "
1606 . "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 "
1607 . "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. "
1608 . "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 "
1609 . "binding editor closes"); 1629 . "binding editor closes");
1610 $SETUP_NOTEBOOK->add (Spells => $SETUP_SPELLS = spell_setup,
1611 "Displays all spells you have and lets you edit keyboard shortcuts for them.");
1612 $SETUP_NOTEBOOK->add (Debug => debug_setup, 1630 $SETUP_NOTEBOOK->add (Debug => debug_setup,
1613 "Some debuggin' options. Do not ask."); 1631 "Some debuggin' options. Do not ask.");
1614 1632
1615 $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
1616 1634
1620 $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,
1621 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.");
1622 1640
1623 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
1624 1642
1625 $BUTTONBAR->add (new CFClient::UI::Flopper text => "Stats Window", other => $STATS_WINDOW = stats_window,
1626 tooltip => "Toggles the statistics window, where all your Stats and Resistances are being displayed at all times.");
1627 $BUTTONBAR->add (new CFClient::UI::Flopper text => "Inventory", other => inventory_window, 1643 $BUTTONBAR->add (new CFClient::UI::Flopper text => "Player", other => player_window,
1628 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.");
1629 . "You can also hit the <b>Tab</b>-key to show/hide the Inventory.");
1630 1645
1631 $BUTTONBAR->add (new CFClient::UI::Button 1646 $BUTTONBAR->add (new CFClient::UI::Button
1632 text => "Save Config", 1647 text => "Save Config",
1633 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.",
1634 on_activate => sub { 1649 on_activate => sub {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines