… | |
… | |
82 | use CFPlus; |
82 | use CFPlus; |
83 | use CFPlus::OpenGL (); |
83 | use CFPlus::OpenGL (); |
84 | use CFPlus::Protocol; |
84 | use CFPlus::Protocol; |
85 | use CFPlus::DB; |
85 | use CFPlus::DB; |
86 | use CFPlus::UI; |
86 | use CFPlus::UI; |
|
|
87 | use CFPlus::UI::Canvas; |
87 | use CFPlus::UI::Inventory; |
88 | use CFPlus::UI::Inventory; |
88 | use CFPlus::UI::SpellList; |
89 | use CFPlus::UI::SpellList; |
89 | use CFPlus::Pod; |
90 | use CFPlus::Pod; |
90 | use CFPlus::MapWidget; |
91 | use CFPlus::MapWidget; |
91 | use CFPlus::Macro; |
92 | use CFPlus::Macro; |
… | |
… | |
752 | $table->add_at (1, 3, new CFPlus::UI::CheckBox on_changed => sub { $ENV{CFPLUS_DEBUG} ^= 8; 0 }); |
753 | $table->add_at (1, 3, new CFPlus::UI::CheckBox on_changed => sub { $ENV{CFPLUS_DEBUG} ^= 8; 0 }); |
753 | $table->add_at (0, 4, new CFPlus::UI::Button text => "die on click(tm)", on_activate => sub { &CFPlus::debug() } ); |
754 | $table->add_at (0, 4, new CFPlus::UI::Button text => "die on click(tm)", on_activate => sub { &CFPlus::debug() } ); |
754 | |
755 | |
755 | $table->add_at (0, 5, new CFPlus::UI::TextEdit text => "line1\0152\0153");#d# |
756 | $table->add_at (0, 5, new CFPlus::UI::TextEdit text => "line1\0152\0153");#d# |
756 | |
757 | |
757 | $table->add_at (7,7, my $t = new CFPlus::UI::Table); |
758 | $table->add_at (7,7, my $t = new CFPlus::UI::Table expand => 0); |
758 | $t->add_at (0,0, new CFPlus::UI::Label text => "a a a a", rowspan => 1, colspan => 2); |
759 | $t->add_at (0,0, new CFPlus::UI::Label text => "a a a a", rowspan => 1, colspan => 2); |
759 | $t->add_at (2,0, new CFPlus::UI::Label text => "b\nb", rowspan => 2, colspan => 1); |
760 | $t->add_at (2,0, new CFPlus::UI::Label text => "b\nb", rowspan => 2, colspan => 1); |
760 | $t->add_at (1,2, new CFPlus::UI::Label text => "c c c c", rowspan => 1, colspan => 2); |
761 | $t->add_at (1,2, new CFPlus::UI::Label text => "c c c c", rowspan => 1, colspan => 2); |
761 | $t->add_at (0,1, new CFPlus::UI::Label text => "d\nd", rowspan => 2, colspan => 1); |
762 | $t->add_at (0,1, new CFPlus::UI::Label text => "d\nd", rowspan => 2, colspan => 1); |
762 | $t->add_at (1,1, new CFPlus::UI::Label text => "e"); |
763 | $t->add_at (1,1, new CFPlus::UI::Label text => "e"); |
|
|
764 | |
|
|
765 | $table->add_at (7, 6, my $c = new CFPlus::UI::Canvas); |
|
|
766 | |
|
|
767 | $c->add_items ({ |
|
|
768 | type => "line_loop", |
|
|
769 | color => [0, 1, 0], |
|
|
770 | width => 9, |
|
|
771 | coord_mode => "abs", |
|
|
772 | coord => [[10, 5], [5, 50], [20, 5], [5, 60]], |
|
|
773 | }); |
|
|
774 | |
|
|
775 | $c->add_items ({ |
|
|
776 | type => "lines", |
|
|
777 | color => [1, 1, 0], |
|
|
778 | width => 2, |
|
|
779 | coord_mode => "rel", |
|
|
780 | coord => [[0,0], [1,1], [1,0], [0,1]], |
|
|
781 | }); |
|
|
782 | |
|
|
783 | $c->add_items ({ |
|
|
784 | type => "polygon", |
|
|
785 | color => [0, 0.43, 0], |
|
|
786 | width => 2, |
|
|
787 | coord_mode => "rel", |
|
|
788 | coord => [[0,0.2], [1,.4], [1,.6], [0,.8]], |
|
|
789 | }); |
763 | |
790 | |
764 | $table |
791 | $table |
765 | } |
792 | } |
766 | |
793 | |
767 | sub stats_window { |
794 | sub stats_window { |