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.108 by elmex, Sun Aug 13 11:29:19 2006 UTC vs.
Revision 1.112 by root, Sun Aug 13 20:01:14 2006 UTC

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");
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 };
1523 1505
1524 $vbox->add (my $buttons = new CFPlus::UI::HBox); 1506 $vbox->add (my $buttons = new CFPlus::UI::HBox);
1525 $vbox->add (my $viewer = new CFPlus::UI::TextScroller 1507 $vbox->add (my $viewer = new CFPlus::UI::TextScroller
1526 expand => 1, fontsize => 0.8, padding_x => 4); 1508 expand => 1, fontsize => 0.8, padding_x => 4);
1527 1509
1528 $buttons->add (new CFPlus::UI::Label text => "Choose a document to display: "); 1510 my @history;
1529 $buttons->add (my $combo = new CFPlus::UI::Selector 1511 my @future;
1530 value => undef, 1512 my $curnode;
1531 options => [ 1513
1532 [intro => "Introduction"], 1514 my $load_node; $load_node = sub {
1533 [manual => "Main Manual"], 1515 my ($node) = @_;
1534 [skill_help => "Skill Reference"], 1516
1535 [command_help => "Command Reference"], 1517 $buttons->clear;
1536 [dmcommand_help => "DM Commands"], 1518
1537 [COPYING => "License Terms"], 1519 if (@history) {
1520 $buttons->add (new CFPlus::UI::Button
1521 text => "<",
1522 tooltip => "back to " . CFPlus::Pod::full_path_of $history[-1],
1523 on_activate => sub {
1524 unshift @future, $curnode if $curnode;
1525 $load_node->(pop @history);
1526 });
1538 ], 1527 }
1539 on_changed => sub {
1540 my ($self, $pod) = @_;
1541 1528
1529 if (@future) {
1530 $buttons->add (new CFPlus::UI::Button
1531 text => ">",
1532 tooltip => "forward to " . CFPlus::Pod::full_path_of $future[0],
1533 on_activate => sub {
1534 push @history, $curnode;
1535 $load_node->(shift @future);
1536 });
1537 }
1538
1539 $curnode = $node;
1540
1542 $viewer->clear; 1541 $viewer->clear;
1543 $viewer->add_paragraph (CFPlus::Pod::section pod => $pod); 1542 $viewer->add_paragraph (CFPlus::Pod::as_paragraphs CFPlus::Pod::section_of $curnode);
1544 $viewer->set_offset (0); 1543 $viewer->set_offset (0);
1545
1546 0
1547 },
1548 on_visibility_change => sub {
1549 my ($self, $visible) = @_;
1550 return unless $visible;
1551 return if $self->{value};
1552 $self->set_value ("intro");
1553 0
1554 },
1555 ); 1544 };
1545
1546 $load_node->(CFPlus::Pod::find pod => "mainpage");
1547
1548 $CFPlus::Pod::on_link = sub {
1549 my (@path) = @_;
1550
1551 push @history, $curnode if $curnode;
1552 @future = ();
1553
1554 $load_node->(CFPlus::Pod::find @path);
1555 $win->show;
1556 };
1556 1557
1557 $win 1558 $win
1558} 1559}
1559 1560
1560sub sdl_init { 1561sub sdl_init {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines