ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/bin/cfplus
(Generate patch)

Comparing deliantra/Deliantra-Client/bin/cfplus (file contents):
Revision 1.104 by root, Sun Jul 30 13:14:15 2006 UTC vs.
Revision 1.110 by root, Sun Aug 13 18:48:57 2006 UTC

190 ); 190 );
191 191
192 $dialog->grab_focus; 192 $dialog->grab_focus;
193 193
194 } elsif ($flags & CS_QUERY_SINGLECHAR) { 194 } elsif ($flags & CS_QUERY_SINGLECHAR) {
195 $dialog->{tooltip} = "Press a key (click on the entry to make sure it has keyboard focus)"; 195 $dialog->{tooltip} = "#charcreation_focus";
196 196
197 if ($prompt =~ /Now choose a character|Press any key for the next race/i) { 197 if ($prompt =~ /Now choose a character|Press any key for the next race/i) {
198 $MESSAGE_WINDOW->show; 198 $MESSAGE_WINDOW->show;
199 199
200 unshift @dialog, new CFPlus::UI::Label 200 unshift @dialog, new CFPlus::UI::Label
222 ); 222 );
223 223
224 unshift @dialog, new CFPlus::UI::Label 224 unshift @dialog, new CFPlus::UI::Label
225 max_w => $::WIDTH * 0.4, 225 max_w => $::WIDTH * 0.4,
226 ellipsise => 0, 226 ellipsise => 0,
227 markup => 227 markup => (CFPlus::Pod::section_label ui => "chargen_race"),
228 "<big><b>Character Creation: Race</b></big>\n\n"
229 . "Look at the <b>Messages</b> window to see a description of this race "
230 . "and the center of the screen to see how this race looks like "
231 . "(<small>below this dialog window: you may need to move the dialog away and "
232 . "click into the display area to make it visible</small>).\n\n"
233 . "You can look at another race, or accept this race (you will cycle back to "
234 . "this race eventually, so you can take your time making this important choice."
235 ; 228 ;
236 229
237 } elsif ($prompt =~ /roll new stats/) { 230 } elsif ($prompt =~ /roll new stats/) {
238 if (my $stat = delete $conn->{stat_change_with}) { 231 if (my $stat = delete $conn->{stat_change_with}) {
239 $conn->send ("reply $stat"); 232 $conn->send ("reply $stat");
313 markup => "$conn->{stat}{$id} <span foreground='yellow'>$name</span>", 306 markup => "$conn->{stat}{$id} <span foreground='yellow'>$name</span>",
314 align => 0, 307 align => 0,
315 expand => 1, 308 expand => 1,
316 can_events => 1, 309 can_events => 1,
317 can_hover => 1, 310 can_hover => 1,
318 tooltip => $CFPlus::STAT_TOOLTIP{$name}, 311 tooltip => "#stat_$name",
319 ); 312 );
320 } 313 }
321 314
322 unshift @dialog, new CFPlus::UI::Label 315 unshift @dialog, new CFPlus::UI::Label
323 max_w => $::WIDTH * 0.4, 316 max_w => $::WIDTH * 0.4,
324 ellipsise => 0, 317 ellipsise => 0,
325 markup => 318 markup => (CFPlus::Pod::section_label ui => "chargen_stats"),
326 "<big><b>Character Creation: Stats</b></big>\n\n"
327 . "<b>Stats</b> are a very important aspect of your character. You can use the tooltips to learn what each Stat governs.\n\n"
328 . "The stats generated by the server are always sorted from Str (highest) to Cha (lowest). "
329 . "They will be modified later by both the race and the class you choose.\n\n"
330 . "You can create another set of stats, swap two stat values with each other or accept the stats as shown below and continue.\n"
331 ; 319 ;
332 } 320 }
333 321
334 push @dialog, my $entry = new CFPlus::UI::Entry 322 push @dialog, my $entry = new CFPlus::UI::Entry
335 on_changed => sub { 323 on_changed => sub {
622 (new CFPlus::UI::Empty expand => 1), 610 (new CFPlus::UI::Empty expand => 1),
623 (my $hb = new CFPlus::UI::HBox), 611 (my $hb = new CFPlus::UI::HBox),
624 ], 612 ],
625 ); 613 );
626 614
627 $hb->add (my $hg = new CFPlus::UI::Gauge type => 'hp', 615 $hb->add (my $hg = new CFPlus::UI::Gauge type => 'hp', tooltip => "#stat_health");
628 tooltip => "<b>Health points</b>. Measures of how much damage you can take before dying. Hit points are determined from your level and are influenced by the value of your Con. Hp value may range between 1 to beyond 500 and higher values indicate a greater ability to withstand punishment.");
629 $hb->add (my $mg = new CFPlus::UI::Gauge type => 'mana', 616 $hb->add (my $mg = new CFPlus::UI::Gauge type => 'mana', tooltip => "#stat_mana");
630 tooltip => "<b>Spell points</b>. Measures of how much \"fuel\" you have for casting spells and incantations. Mana is calculated from your level and your Pow. Mana values can range between 1 to beyond 500 (glowing crystals can increase the current spell points beyond your normal maximum). Higher values indicate greater amounts of mana.");
631 $hb->add (my $gg = new CFPlus::UI::Gauge type => 'grace', 617 $hb->add (my $gg = new CFPlus::UI::Gauge type => 'grace', tooltip => "#stat_grace");
632 tooltip => "<b>Grace points</b> - how favored you are by your god. In game terms, how much divine magic you can cast. Your level, Wis and Pow effect what the value of grace is. Prayong on an altar of your god can increase this value beyond your normal maximum. Grace can take on large positive and negative values. Positive values indicate favor by the gods.");
633 $hb->add (my $fg = new CFPlus::UI::Gauge type => 'food', 618 $hb->add (my $fg = new CFPlus::UI::Gauge type => 'food', tooltip => "#stat_food");
634 tooltip => "<b>Food</b>. Ranges between 0 (starving) and 999 (satiated). At a value of 0 the character begins to die. Some magic can speed up or slow down the character digestion. Healing wounds will speed up digestion too.");
635 619
636 $vbox->add (my $exp = new CFPlus::UI::Label valign => 0, align => 1, can_hover => 1, can_events => 1, 620 $vbox->add (my $exp = new CFPlus::UI::Label valign => 0, align => 1, can_hover => 1, can_events => 1, tooltip => "#stat_exp");
637 tooltip => "<b>Experience points and overall level</b> - experience is increased as a reward for appropriate action (such as killing monsters) and may decrease as a result of a magical attack or dying. Level is directly derived from the experience value. As the level of the character increases, the character becomes able to succeed at more difficult tasks. A character's level starts at a value of 0 and may range up beyond 100.");
638 $vbox->add (my $rng = new CFPlus::UI::Label valign => 0, align => 1, can_hover => 1, can_events => 1, 621 $vbox->add (my $rng = new CFPlus::UI::Label valign => 0, align => 1, can_hover => 1, can_events => 1, tooltip => "#stat_ranged");
639 tooltip => "<b>Ranged attack</b> - how you attack when you press shift-cursor (spell, skill, weapon etc.)");
640 622
641 $GAUGES = { 623 $GAUGES = {
642 exp => $exp, win => $win, range => $rng, 624 exp => $exp, win => $win, range => $rng,
643 food => $fg, mana => $mg, hp => $hg, grace => $gg 625 food => $fg, mana => $mg, hp => $hg, grace => $gg
644 }; 626 };
721 ) { 703 ) {
722 my ($col, $row, $id, $label, $template) = @$_; 704 my ($col, $row, $id, $label, $template) = @$_;
723 705
724 $tbl->add ($col , $row, $STATWIDS->{$id} = new CFPlus::UI::Label 706 $tbl->add ($col , $row, $STATWIDS->{$id} = new CFPlus::UI::Label
725 font => $FONT_FIXED, can_hover => 1, can_events => 1, valign => 0, 707 font => $FONT_FIXED, can_hover => 1, can_events => 1, valign => 0,
726 align => +1, template => $template, tooltip => $CFPlus::STAT_TOOLTIP{$label}); 708 align => +1, template => $template, tooltip => "#stat_$label");
727 $tbl->add ($col + 1, $row, $STATWIDS->{"$id\_lbl"} = new CFPlus::UI::Label 709 $tbl->add ($col + 1, $row, $STATWIDS->{"$id\_lbl"} = new CFPlus::UI::Label
728 font => $FONT_FIXED, can_hover => 1, can_events => 1, fg => $color2, valign => 0, 710 font => $FONT_FIXED, can_hover => 1, can_events => 1, fg => $color2, valign => 0,
729 align => -1, text => $label, tooltip => $CFPlus::STAT_TOOLTIP{$label}); 711 align => -1, text => $label, tooltip => "#stat_$label");
730 } 712 }
731 713
732 $vb->add (my $tbl2 = new CFPlus::UI::Table expand => 1); 714 $vb->add (my $tbl2 = new CFPlus::UI::Table expand => 1);
733 715
734 my $row = 0; 716 my $row = 0;
1133 }; 1115 };
1134 1116
1135 $window 1117 $window
1136} 1118}
1137 1119
1120sub open_string_query {
1121 my $cb = $_[1];
1122 my $dialog = new CFPlus::UI::FancyFrame
1123 x => "center",
1124 y => "center",
1125 z => 50,
1126 force_w => $WIDTH * 4/5,
1127 title => $_[0];
1128
1129 $dialog->add (
1130 my $e = new CFPlus::UI::Entry
1131 on_activate => sub { $cb->(@_); $dialog->hide; 0 },
1132 on_key_down => sub { $_[1]->{sym} == 27 and $dialog->hide; 0 },
1133 );
1134
1135 $e->grab_focus;
1136 $dialog->show;
1137}
1138
1138sub open_quit_dialog { 1139sub open_quit_dialog {
1139 unless ($QUIT_DIALOG) { 1140 unless ($QUIT_DIALOG) {
1140 $QUIT_DIALOG = new CFPlus::UI::FancyFrame 1141 $QUIT_DIALOG = new CFPlus::UI::FancyFrame
1141 x => "center", 1142 x => "center",
1142 y => "center", 1143 y => "center",
1519 ], 1520 ],
1520 on_changed => sub { 1521 on_changed => sub {
1521 my ($self, $pod) = @_; 1522 my ($self, $pod) = @_;
1522 1523
1523 $viewer->clear; 1524 $viewer->clear;
1524 $viewer->add_paragraph (@{ CFPlus::Pod::pod_paragraphs $pod }); 1525 $viewer->add_paragraph (CFPlus::Pod::section_paragraphs pod => $pod);
1525 $viewer->set_offset (0); 1526 $viewer->set_offset (0);
1526 1527
1527 0 1528 0
1528 }, 1529 },
1529 on_visibility_change => sub { 1530 on_visibility_change => sub {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines