SBSPSS/source/gui/greadout.h

163 lines
2.8 KiB
C
Raw Normal View History

2000-10-31 17:20:53 +01:00
/*=========================================================================
greadout.h
Author: PKG
Created:
Project: Spongebob
Purpose:
Copyright (c) 2000 Climax Development Ltd
===========================================================================*/
#ifndef __GUI_GREADOUT_H__
#define __GUI_GREADOUT_H__
/*----------------------------------------------------------------------
Includes
-------- */
#ifndef __GUI_GUI_H__
#include "gui\gui.h"
#endif
/* Std Lib
------- */
/*----------------------------------------------------------------------
Tyepdefs && Defines
------------------- */
/*----------------------------------------------------------------------
Structure defintions
-------------------- */
2000-11-02 18:16:10 +01:00
class CGUITextReadout : public CGUIObjectWithFont
2000-10-31 17:20:53 +01:00
{
public:
typedef struct
{
int m_value;
int m_textId;
} TextReadoutData;
2000-11-03 17:41:57 +01:00
virtual void init(CGUIObject *_parent,GUIId _id=noId);
2000-10-31 17:20:53 +01:00
virtual void setReadoutTarget(int *_target);
virtual void setReadoutData(TextReadoutData *_data);
virtual void render();
virtual void think(int _frames);
protected:
void recalc();
private:
int *m_target;
TextReadoutData *m_data;
int m_lastValue;
unsigned int m_textId;
int m_textY;
};
2001-05-13 23:06:26 +02:00
class CGUISpatCountReadout : public CGUIObjectWithFont
{
public:
virtual void init(CGUIObject *_parent,GUIId _id=noId);
virtual void shutdown();
virtual void setSpatCounts(int _collected,int _total);
virtual void render();
private:
int m_spatsCollected,m_spatsTotal;
class SpriteBank *m_spriteBank;
};
2000-11-03 22:22:27 +01:00
class CGUISpriteReadout : public CGUIObjectWithSpriteBank
2000-11-03 01:07:42 +01:00
{
public:
typedef struct
{
int m_value;
int m_frame;
} SpriteReadoutData;
2000-11-03 17:41:57 +01:00
virtual void init(CGUIObject *_parent,GUIId _id=noId);
2000-11-03 01:07:42 +01:00
virtual void setReadoutTarget(int *_target);
virtual void setReadoutData(SpriteReadoutData *_data);
virtual void render();
virtual void think(int _frames);
protected:
void recalc();
private:
int *m_target;
SpriteReadoutData *m_data;
int m_lastValue;
int m_frame;
int m_x,m_y;
};
2000-11-03 22:22:27 +01:00
class CGUIBarReadout : public CGUIObject
{
public:
virtual void init(CGUIObject *_parent,GUIId _id=noId);
virtual void setReadoutTarget(int *_target);
virtual void setReadoutRange(int _min,int _max);
virtual void render();
virtual void think(int _frames);
protected:
void recalc();
private:
int *m_target;
int m_min,m_max;
int m_markerOffset;
int m_lastValue;
};
2000-10-31 17:20:53 +01:00
/*----------------------------------------------------------------------
Globals
------- */
/*----------------------------------------------------------------------
Functions
--------- */
/*---------------------------------------------------------------------- */
#endif /* __GUI_GREADOUT_H__ */
/*===========================================================================
end */