--- deliantra/Deliantra-Client/DC/UI.pm 2006/10/01 12:08:58 1.351
+++ deliantra/Deliantra-Client/DC/UI.pm 2006/12/06 00:15:12 1.356
@@ -516,8 +516,8 @@
sub emit {
my ($self, $signal, @args) = @_;
- # I do not really like this solution, but I dislike duplication
- # and needlessly verbose code, too.
+ # I do not really like this solution, but I do not like duplication
+ # and needlessly verbose code, either.
my @append
= $has_coords{$signal}
? $args[0]->xy ($self)
@@ -902,9 +902,9 @@
local ($draw_x, $draw_y, $draw_w, $draw_h) =
(0, 0, $self->{w}, $self->{h});
- }
- $self->_render;
+ $self->_render;
+ }
};
}
@@ -2961,12 +2961,9 @@
glClearColor 0, 0, 0, 0;
glClear GL_COLOR_BUFFER_BIT;
- {
- package CFPlus::UI::Base;
-
- local ($draw_x, $draw_y, $draw_w, $draw_h) =
- (0, 0, $self->{w}, $self->{h});
- }
+ package CFPlus::UI::Base;
+ local ($draw_x, $draw_y, $draw_w, $draw_h) =
+ (0, 0, $self->{w}, $self->{h});
my $top = int $self->{children}[1]{range}[0];
@@ -3293,7 +3290,7 @@
our @ISA = CFPlus::UI::HBox::;
-# TODO: should actualyl wrap buttons and other goodies.
+# TODO: should actually wrap buttons and other goodies.
#############################################################################
@@ -3832,10 +3829,11 @@
} elsif ($ev->{button} == 2) {
$::CONN->user_send ("invoke $spell->{name}");
} elsif ($ev->{button} == 3) {
+ my $shortname = CFPlus::shorten $spell->{name}, 14;
(new CFPlus::UI::Menu
items => [
- ["bind cast $spell->{name} to a key" => sub { $::BIND_EDITOR->do_quick_binding (["cast $spell->{name}"]) }],
- ["bind invoke $spell->{name} to a key" => sub { $::BIND_EDITOR->do_quick_binding (["invoke $spell->{name}"]) }],
+ ["bind cast $shortname to a key" => sub { $::BIND_EDITOR->do_quick_binding (["cast $spell->{name}"]) }],
+ ["bind invoke $shortname to a key" => sub { $::BIND_EDITOR->do_quick_binding (["invoke $spell->{name}"]) }],
],
)->popup ($ev);
} else {
@@ -4135,9 +4133,9 @@
local ($draw_x, $draw_y, $draw_w, $draw_h) =
(0, 0, $self->{w}, $self->{h});
- }
- $self->_draw;
+ $self->_draw;
+ }
}
#############################################################################