game.graphics.text
Class COnscreenMessage

java.lang.Object
  extended by game.physics.CStaticShape
      extended by game.graphics.text.COnscreenMessage
All Implemented Interfaces:
IGraphicObject
Direct Known Subclasses:
CEphemereMessage

public class COnscreenMessage
extends CStaticShape
implements IGraphicObject

A text displayed onscreen. It gently swings and zooms at a given frequency.

Author:
sroccaserra

Field Summary
static java.awt.Color DEFAULT_COLOR
           
static int DEFAULT_TYPE
           
private  int m_centerX
           
private  int m_centerY
           
private  CImageProcessor m_imgMessage
           
private  CImageProcessor m_imgShadow
           
private  float m_maxRot
           
private  float m_maxZoom
           
private  float m_minZoom
           
protected  float m_sDelay
           
private  float m_sFrequency
           
private  int m_shadowOffset
           
private  float m_sTime
           
protected  java.lang.String m_strText
           
protected  int m_type
           
private  float m_zoomAmplitude
           
static int PADDING
           
static int TYPE_BOTTOM_RIGHT
           
static int TYPE_CENTRED
           
 
Fields inherited from class game.physics.CStaticShape
m_box, m_gameDisplay, m_isHidden
 
Constructor Summary
COnscreenMessage(IGameDisplay gameDisplay, CBitmapFont bmpFont, java.lang.String strText)
           
COnscreenMessage(IGameDisplay gameDisplay, java.lang.String strText)
           
COnscreenMessage(IGameDisplay gameDisplay, java.lang.String strText, float sDelay, CBitmapFont bmpFont, int type)
           
 
Method Summary
 void animate(float dt)
          Zoom and rotation are dealt with here.
 void draw(java.awt.Graphics g)
           
 void initImage(CBitmapFont bmpFont)
           
 boolean isShowing()
           
 void setFrequency(float f)
           
 void setMaxRot(float a)
          in radiants
 void setMinZoom(float z)
           
 void setZoomAmplitude(float a)
           
 void show(float sDelay)
          show in sDelay seconds
 
Methods inherited from class game.physics.CStaticShape
cycle, drawBox, getCenter, getVelocity, hide, intersect, isHidden, show
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface game.graphics.IGraphicObject
cycle, getCenter, getVelocity, intersect
 

Field Detail

TYPE_CENTRED

public static final int TYPE_CENTRED
See Also:
Constant Field Values

TYPE_BOTTOM_RIGHT

public static final int TYPE_BOTTOM_RIGHT
See Also:
Constant Field Values

DEFAULT_COLOR

public static final java.awt.Color DEFAULT_COLOR

DEFAULT_TYPE

public static final int DEFAULT_TYPE
See Also:
Constant Field Values

PADDING

public static final int PADDING
See Also:
Constant Field Values

m_maxRot

private float m_maxRot

m_minZoom

private float m_minZoom

m_zoomAmplitude

private float m_zoomAmplitude

m_maxZoom

private float m_maxZoom

m_centerX

private int m_centerX

m_centerY

private int m_centerY

m_shadowOffset

private int m_shadowOffset

m_type

protected int m_type

m_sDelay

protected float m_sDelay

m_strText

protected final java.lang.String m_strText

m_imgMessage

private CImageProcessor m_imgMessage

m_imgShadow

private CImageProcessor m_imgShadow

m_sFrequency

private float m_sFrequency

m_sTime

private float m_sTime
Constructor Detail

COnscreenMessage

public COnscreenMessage(IGameDisplay gameDisplay,
                        java.lang.String strText,
                        float sDelay,
                        CBitmapFont bmpFont,
                        int type)

COnscreenMessage

public COnscreenMessage(IGameDisplay gameDisplay,
                        CBitmapFont bmpFont,
                        java.lang.String strText)

COnscreenMessage

public COnscreenMessage(IGameDisplay gameDisplay,
                        java.lang.String strText)
Method Detail

setMaxRot

public final void setMaxRot(float a)
in radiants


setMinZoom

public final void setMinZoom(float z)

setZoomAmplitude

public final void setZoomAmplitude(float a)

setFrequency

public void setFrequency(float f)

initImage

public void initImage(CBitmapFont bmpFont)

show

public void show(float sDelay)
show in sDelay seconds


animate

public void animate(float dt)
Zoom and rotation are dealt with here.

Specified by:
animate in interface IGraphicObject
Overrides:
animate in class CStaticShape

draw

public void draw(java.awt.Graphics g)
Specified by:
draw in interface IGraphicObject

isShowing

public boolean isShowing()