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.34 by elmex, Tue May 30 14:35:09 2006 UTC vs.
Revision 1.38 by elmex, Wed May 31 13:44:26 2006 UTC

105our $INVR; 105our $INVR;
106our $INV_RIGHT_HB; 106our $INV_RIGHT_HB;
107 107
108our $BIND_WINDOW; 108our $BIND_WINDOW;
109our $BIND_EDITOR; 109our $BIND_EDITOR;
110
111our $SPELL_LIST;
110 112
111sub status { 113sub status {
112 $STATUSBOX->add (CFClient::UI::Label::escape $_[0], pri => -10, group => "status", timeout => 10, fg => [1, 1, 0, 1]); 114 $STATUSBOX->add (CFClient::UI::Label::escape $_[0], pri => -10, group => "status", timeout => 10, fg => [1, 1, 0, 1]);
113} 115}
114 116
930 x => "center", 932 x => "center",
931 y => "center", 933 y => "center",
932 force_w => $WIDTH * 9/10, 934 force_w => $WIDTH * 9/10,
933 force_h => $HEIGHT * 9/10, 935 force_h => $HEIGHT * 9/10,
934 title => "Inventory", 936 title => "Inventory",
935 name => "inventory_window",
936 ; 937 ;
937 938
938 $invwin->add (my $hb = new CFClient::UI::HBox homogeneous => 1); 939 $invwin->add (my $hb = new CFClient::UI::HBox homogeneous => 1);
939 940
940 $hb->add (my $vb1 = new CFClient::UI::VBox); 941 $hb->add (my $vb1 = new CFClient::UI::VBox);
949 950
950 # XXX: Call after $INVR = ... because set_opencont sets the items 951 # XXX: Call after $INVR = ... because set_opencont sets the items
951 CFClient::Protocol::set_opencont ($::CONN, 0, "Floor"); 952 CFClient::Protocol::set_opencont ($::CONN, 0, "Floor");
952 953
953 $invwin 954 $invwin
955}
956
957sub make_spell_list {
958 $SPELL_LIST = new CFClient::UI::SpellList
959 force_w => $WIDTH * (9/10),
960 force_h => $HEIGHT * (9/10);
961 $SPELL_LIST
954} 962}
955 963
956sub make_binding_window { 964sub make_binding_window {
957 my $binding_list = new CFClient::UI::VBox; 965 my $binding_list = new CFClient::UI::VBox;
958 966
1012 my ($self, $visible) = @_; 1020 my ($self, $visible) = @_;
1013 $refresh->() if $visible; 1021 $refresh->() if $visible;
1014 }; 1022 };
1015 1023
1016 $BIND_WINDOW->add (my $vb = new CFClient::UI::VBox); 1024 $BIND_WINDOW->add (my $vb = new CFClient::UI::VBox);
1025 $vb->add ($binding_list);
1026 $vb->add (my $hb = new CFClient::UI::HBox);
1017 $vb->add (new CFClient::UI::Button 1027 $hb->add (new CFClient::UI::Button
1018 text => "record new", 1028 text => "record new",
1029 expand => 1,
1019 tooltip => "This button opens the binding editor with an empty binding.", 1030 tooltip => "This button opens the binding editor with an empty binding.",
1020 on_activate => sub { 1031 on_activate => sub {
1021 $::BIND_EDITOR->set_binding (undef, undef, [], 1032 $::BIND_EDITOR->set_binding (undef, undef, [],
1022 sub { 1033 sub {
1023 my ($mod, $sym, $cmds) = @_; 1034 my ($mod, $sym, $cmds) = @_;
1030 }); 1041 });
1031 $::BIND_WINDOW->hide; 1042 $::BIND_WINDOW->hide;
1032 $::BIND_EDITOR->show; 1043 $::BIND_EDITOR->show;
1033 }, 1044 },
1034 ); 1045 );
1035 $vb->add ($binding_list); 1046 $hb->add (new CFClient::UI::Button
1047 text => "close",
1048 tooltip => "Closes the binding window",
1049 expand => 1,
1050 on_activate => sub {
1051 $::BIND_WINDOW->hide;
1052 }
1053 );
1054
1036 $refresh->(); 1055 $refresh->();
1037 $BIND_WINDOW 1056 $BIND_WINDOW
1038} 1057}
1039 1058
1040sub make_help_window { 1059sub make_help_window {
1178 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 1197 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
1179 1198
1180 $BUTTONBAR->add (new CFClient::UI::Flopper text => "Stats Window", other => make_stats_window, 1199 $BUTTONBAR->add (new CFClient::UI::Flopper text => "Stats Window", other => make_stats_window,
1181 tooltip => "Toggles the statistics window, where all your Stats and Resistances are being displayed at all times."); 1200 tooltip => "Toggles the statistics window, where all your Stats and Resistances are being displayed at all times.");
1182 $BUTTONBAR->add (new CFClient::UI::Flopper text => "Inventory", other => make_inventory_window, 1201 $BUTTONBAR->add (new CFClient::UI::Flopper text => "Inventory", other => make_inventory_window,
1183 tooltip => "Toggles the inventory window, where you can manage your loot (or treaures :)."); 1202 tooltip => "Toggles the inventory window, where you can manage your loot (or treaures :)."
1203 ."You can also hit the Tab-key to show/hide the Inventory.");
1184 1204
1185 $BUTTONBAR->add (new CFClient::UI::Button 1205 $BUTTONBAR->add (new CFClient::UI::Button
1186 text => "Save Config", 1206 text => "Save Config",
1187 tooltip => "Saves the options chosen in the client setting, server settings and the window layout to be restored on later runs.", 1207 tooltip => "Saves the options chosen in the client setting, server settings and the window layout to be restored on later runs.",
1188 on_activate => sub { 1208 on_activate => sub {
1196 tooltip => "View Documentation"); 1216 tooltip => "View Documentation");
1197 1217
1198 $BUTTONBAR->add (new CFClient::UI::Flopper 1218 $BUTTONBAR->add (new CFClient::UI::Flopper
1199 text => "Bindings", 1219 text => "Bindings",
1200 other => make_binding_window, 1220 other => make_binding_window,
1201 tooltip => "Lets you delete bindings you have made with the recorder" 1221 tooltip =>
1202 ); 1222 "Lets you define, edit and delete bindings."
1223 ."There is a shortcut for making bindings: LCTRL+Insert opens the binding editor "
1224 ."with nothing set and the recording started. After doing the actions you "
1225 ."want to record press Insert and you will be asked to press a key-combo."
1226 ."After pressing the combo the binding will be saved automatically and the "
1227 ."binding editor closes");
1228
1229 $BUTTONBAR->add (new CFClient::UI::Flopper
1230 text => "Spells",
1231 other => make_spell_list,
1232 tooltip => "The spell list");
1203 1233
1204 $BUTTONBAR->add (new CFClient::UI::Button 1234 $BUTTONBAR->add (new CFClient::UI::Button
1205 text => "Quit", 1235 text => "Quit",
1206 tooltip => "Terminates the program", 1236 tooltip => "Terminates the program",
1207 on_activate => sub { 1237 on_activate => sub {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines