Deliantra-Client

 view release on metacpan or  search on metacpan

DC/Item.pm  view on Meta::CPAN

      },
      on_escape => sub { $w->destroy; 1 },
   );
   $entry->grab_focus;
   $w->show;
}

my $bg_cursed = [1  , 0  , 0, 0.5];
my $bg_magic  = [0.2, 0.2, 1, 0.5];

sub update_widgets {
   my ($self) = @_;

   # necessary to avoid cyclic references
   DC::weaken $self;

   my $button_cb = sub {
      my (undef, $ev, $x, $y) = @_;

      my $targ = $::CONN->{player}{tag};

DC/MapWidget.pm  view on Meta::CPAN


sub size_request {
   my ($self) = @_;

   (
      $self->{tilesize} * DC::ceil $::WIDTH  / $self->{tilesize},
      $self->{tilesize} * DC::ceil $::HEIGHT / $self->{tilesize},
   )
}

sub update {
   my ($self) = @_;

   $self->{need_update} = 1;
   $self->SUPER::update;
}

my %DIR = (
   ( "," . DC::SDLK_KP5      ), [0, "stay fire"],
   ( "," . DC::SDLK_KP8      ), [1, "north"],
   ( "," . DC::SDLK_KP9      ), [2, "northeast"],

DC/MessageDistributor.pm  view on Meta::CPAN

sub touch_channel {
   my ($self, $id) = @_;

   if (exists $self->{chatview}->{$id}) {
      $self->update_chat ($id);
   } else {
      $self->init_chat ($id);
   }
}

sub update_chat {
   my ($self, $id) = @_;

   $self->{chatview}->{$id}->update_info ($self->{info}->{$id});
}

sub init_chat {
   my ($self, $id) = @_;

   my $chaninfo = $self->{info}->{$id};
   my $dock = $self->{chatview}->{$id} =

DC/Protocol.pm  view on Meta::CPAN

#   };

   $self->{open_container} = 0;

   # per server
   $self->{mapcache} = "mapcache_$self->{host}_$self->{port}";

   $self
}

sub update_fx_want {
   my ($self) = @_;

   $self->send_exti_msg (fx_want => {
      3 => !!$::CFG->{bgm_enable},   # FT_MUSIC
      5 => !!$::CFG->{audio_enable}, # FT_SOUND
      6 => 1,                        # FT_RSRC
   });
}

sub ext_capabilities {

DC/UI/ChatView.pm  view on Meta::CPAN

      },
   ));

   $self->{initiated} = 1; # for update_info
   $self->update_tooltip;

   $self
}

# (private) This method updates the channel info associated with this chat view.
sub update_info {
   my ($self, $info) = @_;
   $self->{title}         = $info->{title};
   $self->{text_tooltip}  = $info->{tooltip};
   $self->{say_command}   = $info->{reply};
   $self->{entry_tooltip} =
      $info->{entry_tooltip}
      || "Enter a message and press enter to send it to the channel '$info->{title}'.";

   if ($self->{initiated}) {
      $self->{say_command_label}->set_markup ($self->{say_command});
      $self->set_title ($self->{title});
      $self->update_tooltip;
   }
}

# updates only the 
sub update_tooltip {
   my ($self) = @_;
   my $t = $self->{text_tooltip}
           . (defined $self->{dockbar_pos}
                 ? "\n\n<small>Alt+"
                   . ($self->{dockbar_pos} == 9 ? '0' : $self->{dockbar_pos} + 1)
                   . " - activates this tab.\n"
                   . "Return - toggles activity of the entry."
                   . "</small>"
                 : "");
   $self->{c_tab}->set_tooltip ($t);

DC/UI/Dockable.pm  view on Meta::CPAN

# (private) This method tells the dockable that it is 'active', which means:
# it is docked and it's tab has been activated and it is currently shown.
sub set_dockbar_tab_active {
   my ($self, $active) = @_;
   $self->{dockbar_active} = $active;
   $self->update_tab;
}

# (private) This method updates the tab and other things of the dockable
# whenever something has been changed (title, color, ...)
sub update_tab {
   my ($self) = @_;
   # TODO: set color according to dockbar_active

   my $oldcolor = $self->{tab_label}->{fg};
   if ($self->is_docked_active) {
      $self->{tab_label}->{fg} = $self->{active_fg}   || [1, 1, 1];
   } else {
      $self->{tab_label}->{fg} = $self->{inactive_fg} || [1, 1, 1,];
   }
   if (join (',', @$oldcolor) ne join (',', @{$self->{tab_label}->{fg}})) {

DC/UI/Dockbar.pm  view on Meta::CPAN


   # here the assumption is done that $dockable is inserted at the end of the
   # notebook tabs, so that the other tabs dont have to be updated
   $self->{notebook}->add ($dockable);
   $dockable->set_dockbar_pos ($self->{notebook}->page_index ($dockable));
   $self->update_active;
}

# (private) This method updates all docked tabs and tells them whether their
# tab is 'active'.
sub update_active {
   my ($self, $page) = @_;

   unless ($page) {
      $page = $self->{notebook}->get_current_page;
   }

   for ($self->{notebook}->pages) {
      $_->set_dockbar_tab_active ($_ eq $page);
   }
}

bin/deliantra  view on Meta::CPAN

}

sub debug {
   $DEBUG_STATUS->set_text ($_[0]);
}

sub message {
   $MESSAGE_DIST->message (@_);
}

sub update_modbox {
   my $mod = DC::SDL_GetModState;

   my $markup;

   $markup .= $mod & DC::KMOD_CTRL
              ? ($MAPWIDGET->{ctrl} ? "[REPEAT]" : "[<span foreground='#888'>REPEAT</span>]")
              : "[<span foreground='#888'> once </span>]";

   $markup .= $mod & DC::KMOD_SHIFT
              ? ($MAPWIDGET->{shft} ? "[FIRE]" : "[<span foreground='#888'>FIRE</span>]")

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.661 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )