SBSPSS/source/gui/greadout.h

122 lines
2.2 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-02 18:16:10 +01:00
virtual void init(CGUIObject *_parent,GUIId _id);
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;
};
2000-11-03 01:07:42 +01:00
class CGUISpriteReadout : public CGUIObject
{
public:
typedef struct
{
int m_value;
int m_frame;
} SpriteReadoutData;
virtual void init(CGUIObject *_parent,GUIId _id);
virtual void shutdown();
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;
class SpriteBank *m_sprites;
int m_lastValue;
int m_frame;
int m_x,m_y;
};
2000-10-31 17:20:53 +01:00
/*----------------------------------------------------------------------
Globals
------- */
/*----------------------------------------------------------------------
Functions
--------- */
/*---------------------------------------------------------------------- */
#endif /* __GUI_GREADOUT_H__ */
/*===========================================================================
end */