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.110 by root, Sun Aug 13 18:48:57 2006 UTC vs.
Revision 1.111 by root, Sun Aug 13 19:47:05 2006 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines