--- deliantra/Deliantra-Client/bin/cfplus 2006/07/30 13:14:15 1.104 +++ deliantra/Deliantra-Client/bin/cfplus 2006/08/13 11:29:19 1.108 @@ -192,7 +192,7 @@ $dialog->grab_focus; } elsif ($flags & CS_QUERY_SINGLECHAR) { - $dialog->{tooltip} = "Press a key (click on the entry to make sure it has keyboard focus)"; + $dialog->{tooltip} = "#charcreation_focus"; if ($prompt =~ /Now choose a character|Press any key for the next race/i) { $MESSAGE_WINDOW->show; @@ -315,7 +315,7 @@ expand => 1, can_events => 1, can_hover => 1, - tooltip => $CFPlus::STAT_TOOLTIP{$name}, + tooltip => "#stat_$name", ); } @@ -723,10 +723,10 @@ $tbl->add ($col , $row, $STATWIDS->{$id} = new CFPlus::UI::Label font => $FONT_FIXED, can_hover => 1, can_events => 1, valign => 0, - align => +1, template => $template, tooltip => $CFPlus::STAT_TOOLTIP{$label}); + align => +1, template => $template, tooltip => "#stat_$label"); $tbl->add ($col + 1, $row, $STATWIDS->{"$id\_lbl"} = new CFPlus::UI::Label font => $FONT_FIXED, can_hover => 1, can_events => 1, fg => $color2, valign => 0, - align => -1, text => $label, tooltip => $CFPlus::STAT_TOOLTIP{$label}); + align => -1, text => $label, tooltip => "#stat_$label"); } $vb->add (my $tbl2 = new CFPlus::UI::Table expand => 1); @@ -1135,6 +1135,25 @@ $window } +sub open_string_query { + my $cb = $_[1]; + my $dialog = new CFPlus::UI::FancyFrame + x => "center", + y => "center", + z => 50, + force_w => $WIDTH * 4/5, + title => $_[0]; + + $dialog->add ( + my $e = new CFPlus::UI::Entry + on_activate => sub { $cb->(@_); $dialog->hide; 0 }, + on_key_down => sub { $_[1]->{sym} == 27 and $dialog->hide; 0 }, + ); + + $e->grab_focus; + $dialog->show; +} + sub open_quit_dialog { unless ($QUIT_DIALOG) { $QUIT_DIALOG = new CFPlus::UI::FancyFrame @@ -1521,7 +1540,7 @@ my ($self, $pod) = @_; $viewer->clear; - $viewer->add_paragraph (@{ CFPlus::Pod::pod_paragraphs $pod }); + $viewer->add_paragraph (CFPlus::Pod::section pod => $pod); $viewer->set_offset (0); 0