ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/DC/UI.pm
(Generate patch)

Comparing deliantra/Deliantra-Client/DC/UI.pm (file contents):
Revision 1.6 by elmex, Fri Apr 7 19:58:55 2006 UTC vs.
Revision 1.9 by elmex, Fri Apr 7 20:09:52 2006 UTC

1package Crossfire::Client::Widget; 1package Crossfire::Client::Widget;
2
2use strict; 3use strict;
3 4
4our $FOCUS; # the widget with current focus 5our $FOCUS; # the widget with current focus
5our %ACTIVE_WIDGETS; 6our %ACTIVE_WIDGETS;
6 7
56 57
57sub bbox { 58sub bbox {
58 my ($widget) = @_; 59 my ($widget) = @_;
59} 60}
60 61
61package Client::TextView; 62package Crossfire::Client::Widget::TextView;
62 63
63use strict; 64use strict;
64our @ISA = qw/Client::Widget/; 65our @ISA = qw/Crossfire::Client::Widget/;
65 66
66use SDL::OpenGL; 67use SDL::OpenGL;
67use SDL::OpenGL::Constants; 68use SDL::OpenGL::Constants;
68 69
69sub add_line { 70sub add_line {
74sub draw { 75sub draw {
75 my ($self) = @_; 76 my ($self) = @_;
76 77
77} 78}
78 79
79package Client::MapWidget; 80package Crossfire::Client::Widget::MapWidget;
80 81
81use strict; 82use strict;
83
82our @ISA = qw/Client::Widget/; 84our @ISA = qw/Crossfire::Client::Widget/;
83 85
84use SDL::OpenGL; 86use SDL::OpenGL;
85use SDL::OpenGL::Constants; 87use SDL::OpenGL::Constants;
86 88
87sub key_down { 89sub key_down {
89} 91}
90 92
91sub key_up { 93sub key_up {
92} 94}
93 95
94my $x;
95
96sub draw { 96sub draw {
97 glEnable GL_TEXTURE_2D; 97 glEnable GL_TEXTURE_2D;
98 glEnable GL_BLEND; 98 glEnable GL_BLEND;
99
100 glPushMatrix;
101 99
102 my $map = $::CONN->{map}; 100 my $map = $::CONN->{map};
103 101
104 for my $x (0 .. $::CONN->{mapw} - 1) { 102 for my $x (0 .. $::CONN->{mapw} - 1) {
105 for my $y (0 .. $::CONN->{maph} - 1) { 103 for my $y (0 .. $::CONN->{maph} - 1) {
123 glEnd; 121 glEnd;
124 } 122 }
125 } 123 }
126 } 124 }
127 125
128 glPopMatrix;
129
130 glDisable GL_TEXTURE_2D; 126 glDisable GL_TEXTURE_2D;
131 glDisable GL_BLEND; 127 glDisable GL_BLEND;
132} 128}
133 129
1341; 1301;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines