… | |
… | |
97 | |
97 | |
98 | our $ALT_ENTER_MESSAGE; |
98 | our $ALT_ENTER_MESSAGE; |
99 | our $STATUSBOX; |
99 | our $STATUSBOX; |
100 | our $DEBUG_STATUS; |
100 | our $DEBUG_STATUS; |
101 | |
101 | |
102 | our $INVWIN; |
|
|
103 | our $INV; |
102 | our $INV; |
104 | our $INVR; |
103 | our $INVR; |
105 | our $INVR_LBL; |
104 | our $INVR_LBL; |
106 | |
105 | |
107 | sub status { |
106 | sub status { |
… | |
… | |
255 | state => $CFG->{fow_smooth}, |
254 | state => $CFG->{fow_smooth}, |
256 | tooltip => "Smooth the Fog-of-War a bit to make it more realistic. Changes are instant.", |
255 | tooltip => "Smooth the Fog-of-War a bit to make it more realistic. Changes are instant.", |
257 | connect_changed => sub { |
256 | connect_changed => sub { |
258 | my ($self, $value) = @_; |
257 | my ($self, $value) = @_; |
259 | $CFG->{fow_smooth} = $value; |
258 | $CFG->{fow_smooth} = $value; |
260 | status "Fog of War smoothing requires OpenGL 1.2 or higher" if $CFClient::GL_VERSION < 1.2; |
259 | status "Fog of War smoothing requires OpenGL 1.2 or higher" if $CFClient::OpenGL::GL_VERSION < 1.2; |
261 | } |
260 | } |
262 | ); |
261 | ); |
263 | |
262 | |
264 | $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "GUI Fontsize"); |
263 | $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "GUI Fontsize"); |
265 | $table->add (1, $row++, new CFClient::UI::Slider |
264 | $table->add (1, $row++, new CFClient::UI::Slider |
… | |
… | |
445 | tooltip => "The map you are currently on (if supported by the server)."); |
444 | tooltip => "The map you are currently on (if supported by the server)."); |
446 | |
445 | |
447 | $vb->add (my $hb0 = new CFClient::UI::HBox); |
446 | $vb->add (my $hb0 = new CFClient::UI::HBox); |
448 | $hb0->add ($STATWIDS->{weight} = new CFClient::UI::Label valign => 0, align => -1, text => "Weight:", expand => 1, |
447 | $hb0->add ($STATWIDS->{weight} = new CFClient::UI::Label valign => 0, align => -1, text => "Weight:", expand => 1, |
449 | can_hover => 1, can_events => 1, |
448 | can_hover => 1, can_events => 1, |
450 | tooltip => "This is the amount the Player weights."); |
449 | tooltip => "The weight of the player including all inventory items."); |
451 | $hb0->add ($STATWIDS->{m_weight} = new CFClient::UI::Label valign => 0, align => -1, text => "Max weight:", expand => 1, |
450 | $hb0->add ($STATWIDS->{m_weight} = new CFClient::UI::Label valign => 0, align => -1, text => "Max weight:", expand => 1, |
452 | can_hover => 1, can_events => 1, |
451 | can_hover => 1, can_events => 1, |
453 | tooltip => "The weight limit, you can't carry more than this."); |
452 | tooltip => "The weight limit: you cannot carry more than this."); |
454 | |
453 | |
455 | |
454 | |
456 | $vb->add (my $hb = new CFClient::UI::HBox expand => 1); |
455 | $vb->add (my $hb = new CFClient::UI::HBox expand => 1); |
457 | $hb->add (my $tbl = new CFClient::UI::Table expand => 1); |
456 | $hb->add (my $tbl = new CFClient::UI::Table expand => 1); |
458 | |
457 | |
… | |
… | |
910 | $vb1->add (my $lbl = new CFClient::UI::Label align => 0); |
909 | $vb1->add (my $lbl = new CFClient::UI::Label align => 0); |
911 | $lbl->set_text ("Player"); |
910 | $lbl->set_text ("Player"); |
912 | $vb1->add ($INV = new CFClient::UI::Inventory expand => 1); |
911 | $vb1->add ($INV = new CFClient::UI::Inventory expand => 1); |
913 | |
912 | |
914 | $hb->add (my $vb2 = new CFClient::UI::VBox expand => 1); |
913 | $hb->add (my $vb2 = new CFClient::UI::VBox expand => 1); |
|
|
914 | $vb2->add (my $hb2 = new CFClient::UI::HBox); |
|
|
915 | $hb2->add (new CFClient::UI::Button |
|
|
916 | text => "Close", |
|
|
917 | tooltip => "Close the currently open container (if one is open)", |
|
|
918 | connect_activate => sub { |
|
|
919 | $CONN->send ("apply $CONN->{open_container}") |
|
|
920 | if $CONN->{open_container} != 0; |
|
|
921 | }, |
|
|
922 | ); |
915 | $vb2->add ($INVR_LBL = new CFClient::UI::Label align => 0); |
923 | $hb2->add ($INVR_LBL = new CFClient::UI::Label align => 0); |
|
|
924 | |
916 | $INVR_LBL->set_text ("Floor"); |
925 | $INVR_LBL->set_text ("Floor"); |
917 | $vb2->add ($INVR = new CFClient::UI::Inventory expand => 1); |
926 | $vb2->add ($INVR = new CFClient::UI::Inventory expand => 1); |
918 | |
927 | |
919 | $invwin |
928 | $invwin |
920 | } |
929 | } |