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.133 by root, Tue Apr 18 21:39:31 2006 UTC vs.
Revision 1.135 by root, Wed Apr 19 06:21:07 2006 UTC

96 96
97 my $self = bless { 97 my $self = bless {
98 x => 0, 98 x => 0,
99 y => 0, 99 y => 0,
100 z => 0, 100 z => 0,
101 w => -1,
102 h => -1,
103 @_ 101 @_
104 }, $class; 102 }, $class;
105 103
106 for (keys %$self) { 104 for (keys %$self) {
107 if (/^connect_(.*)$/) { 105 if (/^connect_(.*)$/) {
110 } 108 }
111 109
112 $self 110 $self
113} 111}
114 112
113sub show {
114 my ($self) = @_;
115
116 return if $self->{parent};
117
118 $CFClient::UI::ROOT->add ($self);
119}
120
121sub hide {
122 my ($self) = @_;
123
124 return unless $self->{parent};
125
126 $self->{parent}->remove ($self);
127}
128
115sub move { 129sub move {
116 my ($self, $x, $y, $z) = @_; 130 my ($self, $x, $y, $z) = @_;
117 131
118 $self->{x} = int $x; 132 $self->{x} = int $x;
119 $self->{y} = int $y; 133 $self->{y} = int $y;
141 155
142 $self->{w} = $w; 156 $self->{w} = $w;
143 $self->{h} = $h; 157 $self->{h} = $h;
144 158
145 $self->size_allocate ($w, $h); 159 $self->size_allocate ($w, $h);
160 $self->update;
146} 161}
147 162
148sub size_allocate { 163sub size_allocate {
149 # nothing to be done 164 # nothing to be done
150} 165}
272 $self->{req_w} = $w; 287 $self->{req_w} = $w;
273 $self->{req_h} = $h; 288 $self->{req_h} = $h;
274 289
275 $self->{parent}->check_size 290 $self->{parent}->check_size
276 if $self->{parent}; 291 if $self->{parent};
277
278 $self->size_allocate ($w, $h);
279 $self->update;
280 } 292 }
281} 293}
282 294
283sub update { 295sub update {
284 my ($self) = @_; 296 my ($self) = @_;
386 $self->{children} = [ 398 $self->{children} = [
387 sort { $a->{z} <=> $b->{z} } 399 sort { $a->{z} <=> $b->{z} }
388 @{$self->{children}}, $child 400 @{$self->{children}}, $child
389 ]; 401 ];
390 402
391 $self->{w} = $self->{h} = -1;
392
393 $child->check_size; 403 $child->check_size;
394} 404}
395 405
396sub remove { 406sub remove {
397 my ($self, $widget) = @_; 407 my ($self, $child) = @_;
398 408
409 delete $child->{parent};
410
399 $self->{children} = [ grep $_ != $widget, @{ $self->{children} } ]; 411 $self->{children} = [ grep $_ != $child, @{ $self->{children} } ];
400 412
401 $self->check_size; 413 $self->check_size;
402} 414}
403 415
404sub find_widget { 416sub find_widget {
436 448
437 $class->SUPER::new (children => [$child], %arg) 449 $class->SUPER::new (children => [$child], %arg)
438} 450}
439 451
440sub add { 452sub add {
441 my ($self, $widget) = @_; 453 my ($self, $child) = @_;
442 454
443 $self->{children} = []; 455 $self->{children} = [];
444 456
445 $self->SUPER::add ($widget); 457 $self->SUPER::add ($child);
446} 458}
447 459
448sub remove { 460sub remove {
449 my ($self, $widget) = @_; 461 my ($self, $widget) = @_;
450 462
609 # TODO: user_x, user_y, overwrite moveto? 621 # TODO: user_x, user_y, overwrite moveto?
610 622
611 $class->SUPER::new ( 623 $class->SUPER::new (
612 bg => [1, 1, 1, 1], 624 bg => [1, 1, 1, 1],
613 border_bg => [1, 1, 1, 1], 625 border_bg => [1, 1, 1, 1],
614 border => int $::FONTSIZE * 0.8, 626 border => 0.8,
615 @_ 627 @_
616 ) 628 )
617} 629}
618 630
631sub border {
632 int $_[0]{border} * $::FONTSIZE
633}
634
619sub size_request { 635sub size_request {
620 my ($self) = @_; 636 my ($self) = @_;
621 637
622 return ($self->{user_w}, $self->{user_h}) if $self->{user_w} && $self->{user_h}; 638 return ($self->{user_w}, $self->{user_h}) if $self->{user_w} && $self->{user_h};
623 639
624 my ($w, $h) = $self->SUPER::size_request; 640 my ($w, $h) = $self->SUPER::size_request;
625 641
626 ( 642 (
627 $w + $self->{border} * 2, 643 $w + $self->border * 2,
628 $h + $self->{border} * 2, 644 $h + $self->border * 2,
629 ) 645 )
630} 646}
631 647
632sub size_allocate { 648sub size_allocate {
633 my ($self, $w, $h) = @_; 649 my ($self, $w, $h) = @_;
634 650
635 $h -= List::Util::max 0, $self->{border} * 2; 651 $h -= List::Util::max 0, $self->border * 2;
636 $w -= List::Util::max 0, $self->{border} * 2; 652 $w -= List::Util::max 0, $self->border * 2;
637 653
638 $self->child->configure ($self->{border}, $self->{border}, $w, $h); 654 $self->child->configure ($self->border, $self->border, $w, $h);
639} 655}
640 656
641sub button_down { 657sub button_down {
642 my ($self, $ev, $x, $y) = @_; 658 my ($self, $ev, $x, $y) = @_;
643 659
660 my $border = $self->border;
661
644 if ($x < $self->{w} && $x >= $self->{w} - $self->{border} 662 if ($x < $self->{w} && $x >= $self->{w} - $border
645 && $y < $self->{h} && $y >= $self->{h} - $self->{border}) { 663 && $y < $self->{h} && $y >= $self->{h} - $border) {
646 664
647 my ($ox, $oy) = ($ev->button_x, $ev->button_y); 665 my ($ox, $oy) = ($ev->button_x, $ev->button_y);
648 my ($bw, $bh) = ($self->{w}, $self->{h}); 666 my ($bw, $bh) = ($self->{w}, $self->{h});
649 667
650 $self->{motion} = sub { 668 $self->{motion} = sub {
656 $self->{user_h} = $bh + $y - $oy; 674 $self->{user_h} = $bh + $y - $oy;
657 $self->check_size; 675 $self->check_size;
658 }; 676 };
659 677
660 } elsif ($x >= 0 && $x < $self->{w} 678 } elsif ($x >= 0 && $x < $self->{w}
661 && $y >= 0 && $y < $self->{border}) { 679 && $y >= 0 && $y < $border) {
662 680
663 my ($ox, $oy) = ($ev->button_x, $ev->button_y); 681 my ($ox, $oy) = ($ev->button_x, $ev->button_y);
664 my ($bx, $by) = ($self->{x}, $self->{y}); 682 my ($bx, $by) = ($self->{x}, $self->{y});
665 683
666 $self->{motion} = sub { 684 $self->{motion} = sub {
695 glEnable GL_BLEND; 713 glEnable GL_BLEND;
696 glBlendFunc GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA; 714 glBlendFunc GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA;
697 glEnable GL_TEXTURE_2D; 715 glEnable GL_TEXTURE_2D;
698 glTexEnv GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE; 716 glTexEnv GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE;
699 717
718 my $border = $self->border;
719
700 glColor @{ $self->{border_bg} }; 720 glColor @{ $self->{border_bg} };
701 $tex[1]->draw_quad (0, 0, $w, $self->{border}); 721 $tex[1]->draw_quad (0, 0, $w, $border);
702 $tex[3]->draw_quad (0, $self->{border}, $self->{border}, $ch); 722 $tex[3]->draw_quad (0, $border, $border, $ch);
703 $tex[2]->draw_quad ($w - $self->{border}, $self->{border}, $self->{border}, $ch); 723 $tex[2]->draw_quad ($w - $border, $border, $border, $ch);
704 $tex[4]->draw_quad (0, $h - $self->{border}, $w, $self->{border}); 724 $tex[4]->draw_quad (0, $h - $border, $w, $border);
705 725
706 my $bg = $tex[0]; 726 my $bg = $tex[0];
707 727
708 # TODO: repeat texture not scale 728 # TODO: repeat texture not scale
709 my $rep_x = $cw / $bg->{w}; 729 my $rep_x = $cw / $bg->{w};
712 glColor @{ $self->{bg} }; 732 glColor @{ $self->{bg} };
713 733
714 $bg->{s} = $rep_x; 734 $bg->{s} = $rep_x;
715 $bg->{t} = $rep_y; 735 $bg->{t} = $rep_y;
716 $bg->{wrap_mode} = 1; 736 $bg->{wrap_mode} = 1;
717 $bg->draw_quad ($self->{border}, $self->{border}, $cw, $ch); 737 $bg->draw_quad ($border, $border, $cw, $ch);
718 738
719 glDisable GL_TEXTURE_2D; 739 glDisable GL_TEXTURE_2D;
720 glDisable GL_BLEND; 740 glDisable GL_BLEND;
721 741
722 $self->child->draw; 742 $self->child->draw;
744sub add { 764sub add {
745 my ($self, $x, $y, $child) = @_; 765 my ($self, $x, $y, $child) = @_;
746 766
747 $child->set_parent ($self); 767 $child->set_parent ($self);
748 $self->{children}[$y][$x] = $child; 768 $self->{children}[$y][$x] = $child;
749
750 $self->{w} = $self->{h} = -1;
751 769
752 $child->check_size; 770 $child->check_size;
753} 771}
754 772
755# TODO: move to container class maybe? send childs a signal on removal? 773# TODO: move to container class maybe? send childs a signal on removal?
988sub new { 1006sub new {
989 my ($class, %arg) = @_; 1007 my ($class, %arg) = @_;
990 1008
991 my $self = $class->SUPER::new ( 1009 my $self = $class->SUPER::new (
992 fg => [1, 1, 1], 1010 fg => [1, 1, 1],
993 fontsize => $::FONTSIZE, 1011 fontsize => 1,
994 text => "", 1012 text => "",
995 align => -1, 1013 align => -1,
996 valign => -1, 1014 valign => -1,
997 padding => 2, 1015 padding => 2,
998 layout => new CFClient::Layout, 1016 layout => new CFClient::Layout,
1037 1055
1038sub size_request { 1056sub size_request {
1039 my ($self) = @_; 1057 my ($self) = @_;
1040 1058
1041 $self->{layout}->set_width; 1059 $self->{layout}->set_width;
1042 $self->{layout}->set_height ($self->{fontsize}); 1060 $self->{layout}->set_height ($self->{fontsize} * $::FONTSIZE);
1043 1061
1044 my ($w, $h) = $self->{layout}->size; 1062 my ($w, $h) = $self->{layout}->size;
1045 1063
1046 ( 1064 (
1047 $w + $self->{padding} * 2, 1065 $w + $self->{padding} * 2,
1053 my ($self, $w, $h) = @_; 1071 my ($self, $w, $h) = @_;
1054 1072
1055 delete $self->{texture}; 1073 delete $self->{texture};
1056} 1074}
1057 1075
1058sub update {
1059 my ($self) = @_;
1060
1061 delete $self->{texture};
1062 $self->SUPER::update;
1063}
1064
1065sub _draw { 1076sub _draw {
1066 my ($self) = @_; 1077 my ($self) = @_;
1067 1078
1068 my $tex = $self->{texture} ||= do { 1079 my $tex = $self->{texture} ||= do {
1069 $self->{layout}->set_width ($self->{w}); 1080 $self->{layout}->set_width ($self->{w});
1070 $self->{layout}->set_height (List::Util::min $self->{h}, $self->{fontsize}); 1081 $self->{layout}->set_height (List::Util::min $self->{h}, $self->{fontsize} * $::FONTSIZE);
1071 new_from_layout CFClient::Texture $self->{layout} 1082 new_from_layout CFClient::Texture $self->{layout}
1072 }; 1083 };
1073 1084
1074 glEnable GL_BLEND; 1085 glEnable GL_BLEND;
1075 glBlendFunc GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA; 1086 glBlendFunc GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA;
1124 my ($self, $text) = @_; 1135 my ($self, $text) = @_;
1125 1136
1126 delete $self->{cur_h}; 1137 delete $self->{cur_h};
1127 1138
1128 return if $self->{text} eq $text; 1139 return if $self->{text} eq $text;
1140
1141 delete $self->{texture};
1129 1142
1130 $self->{last_activity} = $::NOW; 1143 $self->{last_activity} = $::NOW;
1131 $self->{text} = $text; 1144 $self->{text} = $text;
1132 1145
1133 $text =~ s/./*/g if $self->{hidden}; 1146 $text =~ s/./*/g if $self->{hidden};
1543 # TODO: calculations are off 1556 # TODO: calculations are off
1544 my $self = $class->SUPER::new ( 1557 my $self = $class->SUPER::new (
1545 fg => [1, 1, 1], 1558 fg => [1, 1, 1],
1546 active_fg => [0, 0, 0], 1559 active_fg => [0, 0, 0],
1547 range => [0, 0, 100, 10], 1560 range => [0, 0, 100, 10],
1548 req_w => 40, 1561 req_w => 20,
1549 req_h => 13, 1562 req_h => 20,
1550 vertical => 0, 1563 vertical => 0,
1551 can_hover => 1, 1564 can_hover => 1,
1552 inner_pad => 5, 1565 inner_pad => 5,
1553 @_ 1566 @_
1554 ); 1567 );
1664 1677
1665sub new { 1678sub new {
1666 my $class = shift; 1679 my $class = shift;
1667 1680
1668 my $self = $class->SUPER::new ( 1681 my $self = $class->SUPER::new (
1669 req_w => $::WIDTH / 6,
1670 req_h => $::HEIGHT / 6,
1671 fontsize => $::FONTSIZE, 1682 fontsize => 1,
1672 @_, 1683 @_,
1673 1684
1674 layout => (new CFClient::Layout), 1685 layout => (new CFClient::Layout),
1675 par => [], 1686 par => [],
1676 height => 0, 1687 height => 0,
1697sub text_height { 1708sub text_height {
1698 my ($self, $text) = @_; 1709 my ($self, $text) = @_;
1699 1710
1700 my $layout = $self->{layout}; 1711 my $layout = $self->{layout};
1701 1712
1702 $layout->set_height ($self->{fontsize}); 1713 $layout->set_height ($self->{fontsize} * $::FONTSIZE);
1703 $layout->set_width ($self->{w}); 1714 $layout->set_width ($self->{w});
1704 $layout->set_text ($text); 1715 $layout->set_text ($text);
1705 1716
1706 ($layout->size)[1] 1717 ($layout->size)[1]
1707} 1718}
1711 1722
1712 $self->{need_reflow}++; 1723 $self->{need_reflow}++;
1713 $self->update; 1724 $self->update;
1714} 1725}
1715 1726
1716sub size_request {
1717 my ($self) = @_;
1718
1719 ($self->{req_w}, $self->{req_h})
1720}
1721
1722sub size_allocate { 1727sub size_allocate {
1723 my ($self, $w, $h) = @_; 1728 my ($self, $w, $h) = @_;
1724 1729
1730 $self->SUPER::size_allocate ($w, $h);
1731
1725 $self->{layout}->set_height ($self->{fontsize}); 1732 $self->{layout}->set_height ($self->{fontsize} * $::FONTSIZE);
1726 $self->{layout}->set_width ($self->{w}); 1733 $self->{layout}->set_width ($self->{children}[0]{w});
1727 1734
1728 $self->reflow; 1735 $self->reflow;
1729 $self->update;
1730} 1736}
1731 1737
1732sub add_paragraph { 1738sub add_paragraph {
1733 my ($self, $color, $text) = @_; 1739 my ($self, $color, $text) = @_;
1734 1740
1815 glDisable GL_TEXTURE_2D; 1821 glDisable GL_TEXTURE_2D;
1816 } 1822 }
1817 1823
1818 $self->{children}[1]->draw; 1824 $self->{children}[1]->draw;
1819 1825
1820}
1821
1822#############################################################################
1823
1824package CFClient::UI::MapWidget;
1825
1826use strict;
1827
1828use List::Util qw(min max);
1829
1830use SDL;
1831use SDL::OpenGL;
1832
1833our @ISA = CFClient::UI::Base::;
1834
1835sub new {
1836 my $class = shift;
1837
1838 $class->SUPER::new (
1839 z => -1,
1840 can_focus => 1,
1841 list => (glGenLists 1),
1842 @_
1843 )
1844}
1845
1846sub key_down {
1847 print "MAPKEYDOWN\n";
1848}
1849
1850sub key_up {
1851}
1852
1853sub button_down {
1854 my ($self, $ev, $x, $y) = @_;
1855
1856 $self->focus_in;
1857
1858 if ($ev->button == 2) {
1859 my ($ox, $oy) = ($ev->button_x, $ev->button_y);
1860 my ($bw, $bh) = ($::CFG->{map_shift_x}, $::CFG->{map_shift_y});
1861
1862 $self->{motion} = sub {
1863 my ($ev, $x, $y) = @_;
1864
1865 ($x, $y) = ($ev->motion_x, $ev->motion_y);
1866
1867 $::CFG->{map_shift_x} = $bw + $x - $ox;
1868 $::CFG->{map_shift_y} = $bh + $y - $oy;
1869
1870 $self->update;
1871 };
1872 }
1873}
1874
1875sub button_up {
1876 my ($self, $ev, $x, $y) = @_;
1877
1878 delete $self->{motion};
1879}
1880
1881sub mouse_motion {
1882 my ($self, $ev, $x, $y) = @_;
1883
1884 $self->{motion}->($ev, $x, $y) if $self->{motion};
1885}
1886
1887sub size_request {
1888 (
1889 1 + 32 * int $::WIDTH / 32,
1890 1 + 32 * int $::HEIGHT / 32,
1891 )
1892}
1893
1894sub update {
1895 my ($self) = @_;
1896
1897 $self->{need_update} = 1;
1898 $self->SUPER::update;
1899}
1900
1901sub draw {
1902 my ($self) = @_;
1903
1904 if (delete $self->{need_update}) {
1905 glNewList $self->{list}, GL_COMPILE;
1906
1907 if ($::MAP) {
1908 my $sw = int $::WIDTH / 32;
1909 my $sh = int $::HEIGHT / 32;
1910
1911 my $sx = $::CFG->{map_shift_x}; my $sx0 = $sx & 31; $sx = ($sx - $sx0) / 32;
1912 my $sy = $::CFG->{map_shift_y}; my $sy0 = $sy & 31; $sy = ($sy - $sy0) / 32;
1913
1914 glTranslate $sx0 - 32, $sy0 - 32, 0;
1915
1916 my ($w, $h, $data) = $::MAP->draw ($sx, $sy, 0, 0, $sw + 1, $sh + 1);
1917
1918 if ($::CFG->{fow_enable}) {
1919 if ($::CFG->{fow_smooth} && $CFClient::GL_VERSION >= 1.2) { # smooth fog of war
1920 glConvolutionParameter (GL_CONVOLUTION_2D, GL_CONVOLUTION_BORDER_MODE, GL_CONSTANT_BORDER);
1921 glConvolutionFilter2D (
1922 GL_CONVOLUTION_2D,
1923 GL_ALPHA,
1924 3, 3,
1925 GL_ALPHA, GL_FLOAT,
1926 pack "f*",
1927 0.1, 0.1, 0.1,
1928 0.1, 0.2, 0.1,
1929 0.1, 0.1, 0.1,
1930 );
1931 glEnable GL_CONVOLUTION_2D;
1932 }
1933
1934 $self->{fow_texture} = new CFClient::Texture
1935 w => $w,
1936 h => $h,
1937 data => $data,
1938 internalformat => GL_ALPHA,
1939 format => GL_ALPHA;
1940
1941 glDisable GL_CONVOLUTION_2D if $::CFG->{fow_smooth};
1942
1943 glEnable GL_BLEND;
1944 glBlendFunc GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA;
1945 glEnable GL_TEXTURE_2D;
1946 glTexEnv GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE;
1947
1948 glColor +($::CFG->{fow_intensity}) x 3, 1;
1949 $self->{fow_texture}->draw_quad (0, 0, $w * 32, $h * 32);
1950
1951 glDisable GL_TEXTURE_2D;
1952 glDisable GL_BLEND;
1953 }
1954
1955 # HACK BEGIN
1956 {
1957 glTranslate -($sx0 - 32), -($sy0 - 32), 0;#remove
1958 my ($w, $h) = (250, 250);
1959
1960 glEnable GL_BLEND;
1961 glBlendFunc GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA;
1962 glEnable GL_TEXTURE_2D;
1963 glTexEnv GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE;
1964
1965 $self->{mapmap_texture} =
1966 new CFClient::Texture
1967 w => $w,
1968 h => $h,
1969 data => $::MAP->mapmap ($w, $h),
1970 type => $CFClient::GL_VERSION >= 1.2 ? GL_UNSIGNED_INT_8_8_8_8_REV : GL_UNSIGNED_BYTE;
1971
1972 $self->{mapmap_texture}->draw_quad (100, 100);
1973
1974 glDisable GL_TEXTURE_2D;
1975 glDisable GL_BLEND;
1976 }
1977 # HACK END
1978 }
1979
1980 glEndList;
1981 }
1982
1983 glPushMatrix;
1984 glCallList $self->{list};
1985 glPopMatrix;
1986
1987 if ($FOCUS != $self) {
1988 glColor 64/255, 64/255, 64/255;
1989 glLogicOp GL_AND;
1990 glEnable GL_COLOR_LOGIC_OP;
1991 glBegin GL_QUADS;
1992 glVertex 0, 0;
1993 glVertex 0, $::HEIGHT;
1994 glVertex $::WIDTH, $::HEIGHT;
1995 glVertex $::WIDTH, 0;
1996 glEnd;
1997 glDisable GL_COLOR_LOGIC_OP;
1998 }
1999}
2000
2001my %DIR = (
2002 SDLK_KP8, [1, "north"],
2003 SDLK_KP9, [2, "northeast"],
2004 SDLK_KP6, [3, "east"],
2005 SDLK_KP3, [4, "southeast"],
2006 SDLK_KP2, [5, "south"],
2007 SDLK_KP1, [6, "southwest"],
2008 SDLK_KP4, [7, "west"],
2009 SDLK_KP7, [8, "northwest"],
2010
2011 SDLK_UP, [1, "north"],
2012 SDLK_RIGHT, [3, "east"],
2013 SDLK_DOWN, [5, "south"],
2014 SDLK_LEFT, [7, "west"],
2015);
2016
2017sub key_down {
2018 my ($self, $ev) = @_;
2019
2020 my $mod = $ev->key_mod;
2021 my $sym = $ev->key_sym;
2022
2023 if ($sym == SDLK_KP5) {
2024 $::CONN->user_send ("stay fire");
2025 } elsif ($sym == SDLK_a) {
2026 $::CONN->user_send ("apply");
2027 } elsif ($sym == SDLK_QUOTE) {
2028 $self->emit ('activate_console');
2029 } elsif ($sym == SDLK_SLASH) {
2030 $self->emit ('activate_console' => '/');
2031 } elsif (exists $DIR{$sym}) {
2032 if ($mod & KMOD_SHIFT) {
2033 $self->{shft}++;
2034 $::CONN->user_send ("fire $DIR{$sym}[0]");
2035 } elsif ($mod & KMOD_CTRL) {
2036 $self->{ctrl}++;
2037 $::CONN->user_send ("run $DIR{$sym}[0]");
2038 } else {
2039 $::CONN->user_send ("$DIR{$sym}[1]");
2040 }
2041 }
2042}
2043
2044sub key_up {
2045 my ($self, $ev) = @_;
2046
2047 my $mod = $ev->key_mod;
2048 my $sym = $ev->key_sym;
2049
2050 if (!($mod & KMOD_SHIFT) && delete $self->{shft}) {
2051 $::CONN->user_send ("fire_stop");
2052 }
2053 if (!($mod & KMOD_CTRL ) && delete $self->{ctrl}) {
2054 $::CONN->user_send ("run_stop");
2055 }
2056} 1826}
2057 1827
2058############################################################################# 1828#############################################################################
2059 1829
2060package CFClient::UI::Animator; 1830package CFClient::UI::Animator;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines