… | |
… | |
192 | $dialog |
192 | $dialog |
193 | } |
193 | } |
194 | |
194 | |
195 | sub make_stats_window { |
195 | sub make_stats_window { |
196 | my $tgw = new CFClient::UI::FancyFrame (x => $WIDTH * 2/3, y => 0, title => "Stats"); |
196 | my $tgw = new CFClient::UI::FancyFrame (x => $WIDTH * 2/3, y => 0, title => "Stats"); |
|
|
197 | |
197 | $tgw->add (my $vb = new CFClient::UI::VBox ()); |
198 | $tgw->add (my $vb = new CFClient::UI::VBox); |
|
|
199 | |
198 | $vb->add ($STATWIDS->{stat} = new CFClient::UI::Label valign => 0, align => -1); |
200 | $vb->add ($STATWIDS->{stat} = new CFClient::UI::Label valign => 0, align => -1); |
|
|
201 | |
199 | $vb->add (my $hb2 = new CFClient::UI::HBox); |
202 | $vb->add (my $hb2 = new CFClient::UI::HBox expand => 1); |
|
|
203 | |
200 | $hb2->add (my $hg = new CFClient::UI::Gauge (type => 'hp')); |
204 | $hb2->add (my $hg = new CFClient::UI::Gauge type => 'hp', expand => 1); |
201 | $hb2->add (my $mg = new CFClient::UI::Gauge (type => 'mana')); |
205 | $hb2->add (my $mg = new CFClient::UI::Gauge type => 'mana', expand => 1); |
202 | $hb2->add (my $gg = new CFClient::UI::Gauge (type => 'grace')); |
206 | $hb2->add (my $gg = new CFClient::UI::Gauge type => 'grace', expand => 1); |
203 | $hb2->add (my $fg = new CFClient::UI::Gauge (type => 'food')); |
207 | $hb2->add (my $fg = new CFClient::UI::Gauge type => 'food', expand => 1); |
204 | $GAUGES = { food => $fg, mana => $mg, hp => $hg, grace => $gg }; |
208 | $GAUGES = { food => $fg, mana => $mg, hp => $hg, grace => $gg }; |
|
|
209 | |
205 | $tgw |
210 | $tgw |
206 | } |
211 | } |
207 | |
212 | |
208 | sub update_stats_window { |
213 | sub update_stats_window { |
209 | my ($stats) = @_; |
214 | my ($stats) = @_; |