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.163 by root, Mon Apr 24 06:40:29 2006 UTC vs.
Revision 1.164 by root, Mon Apr 24 06:57:39 2006 UTC

137 137
138sub new { 138sub new {
139 my $class = shift; 139 my $class = shift;
140 140
141 my $self = bless { 141 my $self = bless {
142 x => 0, 142 x => 0,
143 y => 0, 143 y => 0,
144 z => 0, 144 z => 0,
145 can_events => 1, 145 can_events => 1,
146 @_ 146 @_
147 }, $class; 147 }, $class;
148 148
149 for (keys %$self) { 149 for (keys %$self) {
748 my $class = shift; 748 my $class = shift;
749 749
750 # TODO: user_x, user_y, overwrite moveto? 750 # TODO: user_x, user_y, overwrite moveto?
751 751
752 my $self = $class->SUPER::new ( 752 my $self = $class->SUPER::new (
753 bg => [1, 1, 1, 1], 753 bg => [1, 1, 1, 1],
754 border_bg => [1, 1, 1, 1], 754 border_bg => [1, 1, 1, 1],
755 border => 0.8, 755 border => 0.8,
756 can_events => 1, 756 can_events => 0,
757 @_ 757 @_
758 ); 758 );
759 759
760 $self->{title} &&= new CFClient::UI::Label 760 $self->{title} &&= new CFClient::UI::Label
761 align => 0, 761 align => 0,
1151 1151
1152sub new { 1152sub new {
1153 my ($class, %arg) = @_; 1153 my ($class, %arg) = @_;
1154 1154
1155 my $self = $class->SUPER::new ( 1155 my $self = $class->SUPER::new (
1156 fg => [1, 1, 1], 1156 fg => [1, 1, 1],
1157 #font => default_font 1157 #font => default_font
1158 fontsize => 1, 1158 fontsize => 1,
1159 text => "", 1159 text => "",
1160 align => -1, 1160 align => -1,
1161 valign => -1, 1161 valign => -1,
1162 padding => 2, 1162 padding => 2,
1163 layout => new CFClient::Layout, 1163 layout => new CFClient::Layout,
1164 can_events => 0, 1164 can_events => 0,
1165 %arg 1165 %arg
1166 ); 1166 );
1167 1167
1168 if (exists $self->{template}) { 1168 if (exists $self->{template}) {
1292 1292
1293sub new { 1293sub new {
1294 my $class = shift; 1294 my $class = shift;
1295 1295
1296 $class->SUPER::new ( 1296 $class->SUPER::new (
1297 fg => [1, 1, 1], 1297 fg => [1, 1, 1],
1298 bg => [0, 0, 0, 0.2], 1298 bg => [0, 0, 0, 0.2],
1299 active_bg => [1, 1, 1, 0.5], 1299 active_bg => [1, 1, 1, 0.5],
1300 active_fg => [0, 0, 0], 1300 active_fg => [0, 0, 0],
1301 can_hover => 1, 1301 can_hover => 1,
1302 can_focus => 1, 1302 can_focus => 1,
1303 valign => 0, 1303 valign => 0,
1304 can_events => 1, 1304 can_events => 1,
1305 @_ 1305 @_
1306 ) 1306 )
1307} 1307}
1308 1308
1487 1487
1488sub new { 1488sub new {
1489 my $class = shift; 1489 my $class = shift;
1490 1490
1491 $class->SUPER::new ( 1491 $class->SUPER::new (
1492 padding => 4, 1492 padding => 4,
1493 fg => [1, 1, 1], 1493 fg => [1, 1, 1],
1494 bg => [1, 1, 1, 0.2], 1494 bg => [1, 1, 1, 0.2],
1495 active_fg => [0, 0, 1], 1495 active_fg => [0, 0, 1],
1496 can_hover => 1, 1496 can_hover => 1,
1497 align => 0, 1497 align => 0,
1498 valign => 0, 1498 valign => 0,
1499 can_events => 1, 1499 can_events => 1,
1500 @_ 1500 @_
1501 ) 1501 )
1502} 1502}
1503 1503
1794 1794
1795sub new { 1795sub new {
1796 my ($class, %arg) = @_; 1796 my ($class, %arg) = @_;
1797 1797
1798 my $self = $class->SUPER::new ( 1798 my $self = $class->SUPER::new (
1799 tooltip => $arg{type}, 1799 tooltip => $arg{type},
1800 can_events => 1,
1801 can_hover => 1, 1800 can_hover => 1,
1802 %arg, 1801 %arg,
1803 ); 1802 );
1804 1803
1805 $self->add ($self->{value} = new CFClient::UI::Label valign => +1, align => 0, template => "999"); 1804 $self->add ($self->{value} = new CFClient::UI::Label valign => +1, align => 0, template => "999");
1978 1977
1979sub new { 1978sub new {
1980 my $class = shift; 1979 my $class = shift;
1981 1980
1982 my $self = $class->SUPER::new ( 1981 my $self = $class->SUPER::new (
1983 fontsize => 1, 1982 fontsize => 1,
1983 can_events => 0,
1984 #font => default_font 1984 #font => default_font
1985 @_, 1985 @_,
1986 1986
1987 layout => (new CFClient::Layout), 1987 layout => (new CFClient::Layout),
1988 par => [], 1988 par => [],
1989 height => 0, 1989 height => 0,
1990 children => [ 1990 children => [
1991 (new CFClient::UI::Empty expand => 1), 1991 (new CFClient::UI::Empty expand => 1),
1992 (new CFClient::UI::Slider vertical => 1), 1992 (new CFClient::UI::Slider vertical => 1),
1993 ], 1993 ],
1994 ); 1994 );
1995 1995
2180 2180
2181sub new { 2181sub new {
2182 my $class = shift; 2182 my $class = shift;
2183 2183
2184 my $self = $class->SUPER::new ( 2184 my $self = $class->SUPER::new (
2185 state => 0, 2185 state => 0,
2186 connect_activate => \&toggle_flopper, 2186 connect_activate => \&toggle_flopper,
2187 can_events => 1,
2188 @_ 2187 @_
2189 ); 2188 );
2190 2189
2191 if ($self->{state}) { 2190 if ($self->{state}) {
2192 $self->{state} = 0; 2191 $self->{state} = 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines