Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

Jailbreak.JBDispositionGroupFree


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
// ============================================================================
// JBDispositionGroupFree
// Copyright 2002 by Mychaeel <mychaeel@planetjailbreak.com>
// $Id: JBDispositionGroupFree.uc,v 1.4 2004/04/07 01:13:55 mychaeel Exp $
//
// Manages the icons of free players on a team, arranging them in a horizontal
// row below the team status widget.
// ============================================================================


class JBDispositionGroupFree extends JBDispositionGroup;


// ============================================================================
// Variables
// ============================================================================

var vector LocationPlayers;  // upper-inner corner of row of player icons
var float WidthPlayer;       // width of a single player icon


// ============================================================================
// BelongsToGroup
//
// Players belong to this group when they are free.
// ============================================================================

function bool BelongsToGroup(JBTagPlayer TagPlayer)
{
  if (TagPlayer.IsFree())
    return Super.BelongsToGroup(TagPlayer);

  return False;
}


// ============================================================================
// Setup
//
// Arranges all icons horizontally below the team status widget.
// ============================================================================

function Setup()
{
  local int iDisposition;
  local vector LocationTarget;

  for (iDisposition = 0; iDisposition < ListDispositionPlayer.Length; iDisposition++) {
    LocationTarget.X = LocationPlayers.X + Scale * WidthPlayer * iDisposition;
    LocationTarget.Y = LocationPlayers.Y;

    if (DispositionTeam.Team.TeamIndex == 0)
      LocationTarget.X = -LocationTarget.X;

    ListDispositionPlayer[iDisposition].SetTarget(LocationTarget, Scale);
  }
}


// ============================================================================
// Defaults
// ============================================================================

defaultproperties
{
  LocationPlayers = (X=0.110,Y=0.085);
  WidthPlayer = 0.014;

  AddIconForFadein     = AddIconToEnd;
  AddIconForChange     = AddIconToStart;
  RemoveIconForChange  = RemoveIconFromStart;
  RemoveIconForFadeout = RemoveIconFromEnd;
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Mi 7.4.2004 03:13:56.000 - Creation time: Do 14.8.2014 09:58:42.006 - Created with UnCodeX