… | |
… | |
209 | } |
209 | } |
210 | |
210 | |
211 | sub do_n_dialog { |
211 | sub do_n_dialog { |
212 | my ($cb) = @_; |
212 | my ($cb) = @_; |
213 | |
213 | |
214 | my $w = new CFPlus::UI::FancyFrame |
214 | my $w = new CFPlus::UI::Toplevel |
215 | on_delete => sub { $_[0]->destroy; 1 }, |
215 | on_delete => sub { $_[0]->destroy; 1 }, |
216 | has_close_button => 1, |
216 | has_close_button => 1, |
217 | ; |
217 | ; |
218 | |
218 | |
219 | $w->add (my $vb = new CFPlus::UI::VBox x => "center", y => "center"); |
219 | $w->add (my $vb = new CFPlus::UI::VBox x => "center", y => "center"); |
… | |
… | |
281 | &::open_string_query ("Text to inscribe", sub { |
281 | &::open_string_query ("Text to inscribe", sub { |
282 | my ($entry, $txt) = @_; |
282 | my ($entry, $txt) = @_; |
283 | $::CONN->send ("mark ". pack "N", $self->{tag}); |
283 | $::CONN->send ("mark ". pack "N", $self->{tag}); |
284 | $::CONN->send ("command use_skill inscription $txt"); |
284 | $::CONN->send ("command use_skill inscription $txt"); |
285 | }); |
285 | }); |
|
|
286 | } |
|
|
287 | ], |
|
|
288 | ["rename", # first try of an easier use of flint&steel |
|
|
289 | sub { |
|
|
290 | &::open_string_query ("Rename item to:", sub { |
|
|
291 | my ($entry, $txt) = @_; |
|
|
292 | $::CONN->send ("mark ". pack "N", $self->{tag}); |
|
|
293 | $::CONN->send ("command rename to <$txt>"); |
|
|
294 | }, $self->{name}, |
|
|
295 | "If you input no name or erase the current custom name, the custom name will be unset"); |
286 | } |
296 | } |
287 | ], |
297 | ], |
288 | ["apply", sub { $::CONN->send ("apply $self->{tag}") }], |
298 | ["apply", sub { $::CONN->send ("apply $self->{tag}") }], |
289 | ( |
299 | ( |
290 | $self->{flags} & F_LOCKED |
300 | $self->{flags} & F_LOCKED |