--- deliantra/Deliantra-Client/DC/UI.pm 2008/07/18 22:32:54 1.464 +++ deliantra/Deliantra-Client/DC/UI.pm 2008/09/03 06:07:39 1.467 @@ -1346,15 +1346,15 @@ use DC::OpenGL; my $bg = - new_from_file DC::Texture DC::find_rcfile "d1_bg.png", + new_from_resource DC::Texture "d1_bg.png", mipmap => 1, wrap => 1; my @border = - map { new_from_file DC::Texture DC::find_rcfile $_, mipmap => 1 } + map { new_from_resource DC::Texture $_, mipmap => 1 } qw(d1_border_top.png d1_border_right.png d1_border_left.png d1_border_bottom.png); my @icon = - map { new_from_file DC::Texture DC::find_rcfile $_, mipmap => 1 } + map { new_from_resource DC::Texture $_, mipmap => 1 } qw(x1_move.png x1_resize.png); sub new { @@ -1363,7 +1363,7 @@ my $self = $class->SUPER::new ( bg => [1, 1, 1, 1], border_bg => [1, 1, 1, 1], - border => 0.6, + border => 1, can_events => 1, min_w => 64, min_h => 32, @@ -2160,9 +2160,9 @@ $self->{cursor} = List::Util::max 0, List::Util::min $self->{cursor}, length $text; - if ($uni == 8) { + if ($sym == DC::SDLK_BACKSPACE) { substr $text, --$self->{cursor}, 1, "" if $self->{cursor}; - } elsif ($uni == 127) { + } elsif ($sym == DC::SDLK_DELETE) { substr $text, $self->{cursor}, 1, ""; } elsif ($sym == DC::SDLK_LEFT) { --$self->{cursor} if $self->{cursor}; @@ -2407,7 +2407,7 @@ use DC::OpenGL; my @tex = - map { new_from_file DC::Texture DC::find_rcfile $_, mipmap => 1 } + map { new_from_resource DC::Texture $_, mipmap => 1 } qw(b1_button_inactive.png b1_button_active.png); sub new { @@ -2456,7 +2456,7 @@ use DC::OpenGL; my @tex = - map { new_from_file DC::Texture DC::find_rcfile $_, mipmap => 1 } + map { new_from_resource DC::Texture $_, mipmap => 1 } qw(b1_button_inactive.png b1_button_active.png); sub new { @@ -2509,7 +2509,7 @@ our @ISA = DC::UI::DrawBG::; my @tex = - map { new_from_file DC::Texture DC::find_rcfile $_, mipmap => 1 } + map { new_from_resource DC::Texture $_, mipmap => 1 } qw(c1_checkbox_bg.png c1_checkbox_active.png); use DC::OpenGL; @@ -2600,7 +2600,7 @@ or Carp::croak "'path' or 'tex' attributes required"; $self->{tex} ||= $texture_cache{$self->{path}} ||= - new_from_file DC::Texture DC::find_rcfile $self->{path}, mipmap => 1; + new_from_resource DC::Texture $self->{path}, mipmap => 1; DC::weaken $texture_cache{$self->{path}}; @@ -2706,19 +2706,19 @@ my %tex = ( food => [ - map { new_from_file DC::Texture DC::find_rcfile $_, mipmap => 1 } + map { new_from_resource DC::Texture $_, mipmap => 1 } qw/g1_food_gauge_empty.png g1_food_gauge_full.png/ ], grace => [ - map { new_from_file DC::Texture DC::find_rcfile $_, mipmap => 1 } + map { new_from_resource DC::Texture $_, mipmap => 1 } qw/g1_grace_gauge_empty.png g1_grace_gauge_full.png g1_grace_gauge_overflow.png/ ], hp => [ - map { new_from_file DC::Texture DC::find_rcfile $_, mipmap => 1 } + map { new_from_resource DC::Texture $_, mipmap => 1 } qw/g1_hp_gauge_empty.png g1_hp_gauge_full.png/ ], mana => [ - map { new_from_file DC::Texture DC::find_rcfile $_, mipmap => 1 } + map { new_from_resource DC::Texture $_, mipmap => 1 } qw/g1_mana_gauge_empty.png g1_mana_gauge_full.png g1_mana_gauge_overflow.png/ ], ); @@ -3025,7 +3025,7 @@ our @ISA = DC::UI::DrawBG::; my @tex = - map { new_from_file DC::Texture DC::find_rcfile $_ } + map { new_from_resource DC::Texture $_ } qw(s1_slider.png s1_slider_bg.png); sub new {