… | |
… | |
196 | $CFG->{stat_fontsize} = 0.1 * int $_[1] * 10; |
196 | $CFG->{stat_fontsize} = 0.1 * int $_[1] * 10; |
197 | &set_stats_window_fontsize; |
197 | &set_stats_window_fontsize; |
198 | } |
198 | } |
199 | ); |
199 | ); |
200 | |
200 | |
201 | $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Gaugesize"); |
|
|
202 | $table->add (1, $row++, new CFClient::UI::Slider range => [$CFG->{gauge_size}, 0.2, 0.8, 0.02], connect_changed => sub { |
|
|
203 | $CFG->{gauge_size} = $_[1]; |
|
|
204 | my $h = int ($HEIGHT * $CFG->{gauge_size}); |
|
|
205 | $GAUGES->{win}->set_size ($WIDTH, $h); |
|
|
206 | $GAUGES->{win}->{y} = $HEIGHT - $h; |
|
|
207 | $GAUGES->{win}->{x} = 0; |
|
|
208 | $GAUGES->{win}->update; |
|
|
209 | }); |
|
|
210 | |
|
|
211 | $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Gauge size"); |
201 | $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Gauge size"); |
212 | $table->add (1, $row++, new CFClient::UI::Slider |
202 | $table->add (1, $row++, new CFClient::UI::Slider |
213 | range => [$CFG->{gauge_size}, 0.2, 0.8, 0.02], |
203 | range => [$CFG->{gauge_size}, 0.2, 0.8, 0.02], |
214 | tooltip => "Adjust the size of the stats gauges at the bottom right", |
204 | tooltip => "Adjust the size of the stats gauges at the bottom right", |
215 | connect_changed => sub { |
205 | connect_changed => sub { |
216 | $CFG->{gauge_size} = $_[1]; |
206 | $CFG->{gauge_size} = $_[1]; |
217 | my $h = int ($HEIGHT * $CFG->{gauge_size}); |
207 | my $h = int $HEIGHT * $CFG->{gauge_size}; |
218 | $GAUGES->{win}->set_size ($WIDTH, $h); |
208 | $GAUGES->{win}->set_size ($WIDTH, $h); |
219 | $GAUGES->{win}->{y} = $HEIGHT - $h; |
209 | $GAUGES->{win}->move (0, $HEIGHT - $h); |
220 | $GAUGES->{win}->{x} = 0; |
|
|
221 | $GAUGES->{win}->update; |
|
|
222 | } |
210 | } |
223 | ); |
211 | ); |
224 | |
212 | |
225 | $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Gauge fontsize"); |
213 | $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Gauge fontsize"); |
226 | $table->add (1, $row++, new CFClient::UI::Slider |
214 | $table->add (1, $row++, new CFClient::UI::Slider |
227 | range => [$CFG->{gauge_fontsize}, 0.5, 2.0, 0.1], |
215 | range => [$CFG->{gauge_fontsize}, 0.5, 2.0, 0.1], |
228 | connect_changed => sub { |
216 | connect_changed => sub { |
229 | $CFG->{gauge_fontsize} = 0.1 * int $_[1] * 10; |
217 | $CFG->{gauge_fontsize} = 0.1 * int $_[1] * 10; |
230 | &set_gauge_window_fontsize; |
218 | &set_gauge_window_fontsize; |
231 | $GAUGES->{win}->check_size; |
219 | #$GAUGES->{win}->check_size; |
232 | $GAUGES->{win}->update; |
220 | #$GAUGES->{win}->update; |
233 | } |
221 | } |
234 | ); |
222 | ); |
235 | |
223 | |
236 | $table->add (1, $row++, new CFClient::UI::Button |
224 | $table->add (1, $row++, new CFClient::UI::Button |
237 | expand => 1, align => 0, text => "Apply", |
225 | expand => 1, align => 0, text => "Apply", |
… | |
… | |
377 | |
365 | |
378 | for (qw/slow holyw conf fire depl magic |
366 | for (qw/slow holyw conf fire depl magic |
379 | drain acid pois para deat phys |
367 | drain acid pois para deat phys |
380 | blind fear tund elec cold ghit/) |
368 | blind fear tund elec cold ghit/) |
381 | { |
369 | { |
382 | $tbl2->add ($col , $row, |
370 | $tbl2->add ($col, $row, |
383 | $STATWIDS->{"res_$_"} = |
371 | $STATWIDS->{"res_$_"} = |
384 | new CFClient::UI::Label text => "0", align => +1, valign => 0 |
372 | new CFClient::UI::Label text => "0", align => +1, valign => 0 |
385 | ); |
373 | ); |
386 | $tbl2->add ($col + 1, $row, new CFClient::UI::Image image => "ui/resist/resist_$_.png"); |
374 | $tbl2->add ($col + 1, $row, new CFClient::UI::Image image => "ui/resist/resist_$_.png"); |
387 | |
375 | |