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.8 by root, Fri Apr 7 20:08:57 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
59} 60}
60 61
61package Client::TextView; 62package Client::TextView;
62 63
63use strict; 64use strict;
65
64our @ISA = qw/Client::Widget/; 66our @ISA = qw/Client::Widget/;
65 67
66use SDL::OpenGL; 68use SDL::OpenGL;
67use SDL::OpenGL::Constants; 69use SDL::OpenGL::Constants;
68 70
77} 79}
78 80
79package Client::MapWidget; 81package Client::MapWidget;
80 82
81use strict; 83use strict;
84
82our @ISA = qw/Client::Widget/; 85our @ISA = qw/Client::Widget/;
83 86
84use SDL::OpenGL; 87use SDL::OpenGL;
85use SDL::OpenGL::Constants; 88use SDL::OpenGL::Constants;
86 89
89} 92}
90 93
91sub key_up { 94sub key_up {
92} 95}
93 96
94my $x;
95
96sub draw { 97sub draw {
97 glEnable GL_TEXTURE_2D; 98 glEnable GL_TEXTURE_2D;
98 glEnable GL_BLEND; 99 glEnable GL_BLEND;
99
100 glPushMatrix;
101 100
102 my $map = $::CONN->{map}; 101 my $map = $::CONN->{map};
103 102
104 for my $x (0 .. $::CONN->{mapw} - 1) { 103 for my $x (0 .. $::CONN->{mapw} - 1) {
105 for my $y (0 .. $::CONN->{maph} - 1) { 104 for my $y (0 .. $::CONN->{maph} - 1) {
123 glEnd; 122 glEnd;
124 } 123 }
125 } 124 }
126 } 125 }
127 126
128 glPopMatrix;
129
130 glDisable GL_TEXTURE_2D; 127 glDisable GL_TEXTURE_2D;
131 glDisable GL_BLEND; 128 glDisable GL_BLEND;
132} 129}
133 130
1341; 1311;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines