… | |
… | |
930 | x => "center", |
930 | x => "center", |
931 | y => "center", |
931 | y => "center", |
932 | force_w => $WIDTH * 9/10, |
932 | force_w => $WIDTH * 9/10, |
933 | force_h => $HEIGHT * 9/10, |
933 | force_h => $HEIGHT * 9/10, |
934 | title => "Inventory", |
934 | title => "Inventory", |
935 | name => "inventory_window", |
|
|
936 | ; |
935 | ; |
937 | |
936 | |
938 | $invwin->add (my $hb = new CFClient::UI::HBox homogeneous => 1); |
937 | $invwin->add (my $hb = new CFClient::UI::HBox homogeneous => 1); |
939 | |
938 | |
940 | $hb->add (my $vb1 = new CFClient::UI::VBox); |
939 | $hb->add (my $vb1 = new CFClient::UI::VBox); |
… | |
… | |
1012 | my ($self, $visible) = @_; |
1011 | my ($self, $visible) = @_; |
1013 | $refresh->() if $visible; |
1012 | $refresh->() if $visible; |
1014 | }; |
1013 | }; |
1015 | |
1014 | |
1016 | $BIND_WINDOW->add (my $vb = new CFClient::UI::VBox); |
1015 | $BIND_WINDOW->add (my $vb = new CFClient::UI::VBox); |
|
|
1016 | $vb->add ($binding_list); |
|
|
1017 | $vb->add (my $hb = new CFClient::UI::HBox); |
1017 | $vb->add (new CFClient::UI::Button |
1018 | $hb->add (new CFClient::UI::Button |
1018 | text => "record new", |
1019 | text => "record new", |
|
|
1020 | expand => 1, |
1019 | tooltip => "This button opens the binding editor with an empty binding.", |
1021 | tooltip => "This button opens the binding editor with an empty binding.", |
1020 | on_activate => sub { |
1022 | on_activate => sub { |
1021 | $::BIND_EDITOR->set_binding (undef, undef, [], |
1023 | $::BIND_EDITOR->set_binding (undef, undef, [], |
1022 | sub { |
1024 | sub { |
1023 | my ($mod, $sym, $cmds) = @_; |
1025 | my ($mod, $sym, $cmds) = @_; |
… | |
… | |
1030 | }); |
1032 | }); |
1031 | $::BIND_WINDOW->hide; |
1033 | $::BIND_WINDOW->hide; |
1032 | $::BIND_EDITOR->show; |
1034 | $::BIND_EDITOR->show; |
1033 | }, |
1035 | }, |
1034 | ); |
1036 | ); |
1035 | $vb->add ($binding_list); |
1037 | $hb->add (new CFClient::UI::Button |
|
|
1038 | text => "close", |
|
|
1039 | tooltip => "Closes the binding window", |
|
|
1040 | expand => 1, |
|
|
1041 | on_activate => sub { |
|
|
1042 | $::BIND_WINDOW->hide; |
|
|
1043 | } |
|
|
1044 | ); |
|
|
1045 | |
1036 | $refresh->(); |
1046 | $refresh->(); |
1037 | $BIND_WINDOW |
1047 | $BIND_WINDOW |
1038 | } |
1048 | } |
1039 | |
1049 | |
1040 | sub make_help_window { |
1050 | sub 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 |
1188 | 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 | |
1189 | |
1180 | $BUTTONBAR->add (new CFClient::UI::Flopper text => "Stats Window", other => make_stats_window, |
1190 | $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."); |
1191 | 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, |
1192 | $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 :)."); |
1193 | tooltip => "Toggles the inventory window, where you can manage your loot (or treaures :)." |
|
|
1194 | ."You can also hit the Tab-key to show/hide the Inventory."); |
1184 | |
1195 | |
1185 | $BUTTONBAR->add (new CFClient::UI::Button |
1196 | $BUTTONBAR->add (new CFClient::UI::Button |
1186 | text => "Save Config", |
1197 | 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.", |
1198 | 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 { |
1199 | on_activate => sub { |
… | |
… | |
1196 | tooltip => "View Documentation"); |
1207 | tooltip => "View Documentation"); |
1197 | |
1208 | |
1198 | $BUTTONBAR->add (new CFClient::UI::Flopper |
1209 | $BUTTONBAR->add (new CFClient::UI::Flopper |
1199 | text => "Bindings", |
1210 | text => "Bindings", |
1200 | other => make_binding_window, |
1211 | other => make_binding_window, |
1201 | tooltip => "Lets you delete bindings you have made with the recorder" |
1212 | tooltip => |
|
|
1213 | "Lets you define, edit and delete bindings." |
|
|
1214 | ."There is a shortcut for making bindings: LCTRL+Insert opens the binding editor " |
|
|
1215 | ."with nothing set and the recording started. After doing the actions you " |
|
|
1216 | ."want to record press Insert and you will be asked to press a key-combo." |
|
|
1217 | ."After pressing the combo the binding will be saved automatically and the " |
|
|
1218 | ."binding editor closes" |
1202 | ); |
1219 | ); |
1203 | |
1220 | |
1204 | $BUTTONBAR->add (new CFClient::UI::Button |
1221 | $BUTTONBAR->add (new CFClient::UI::Button |
1205 | text => "Quit", |
1222 | text => "Quit", |
1206 | tooltip => "Terminates the program", |
1223 | tooltip => "Terminates the program", |