2012-04-30 09:27:12 +10:00
|
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
|
*
|
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
|
* file distributed with this source distribution.
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
*
|
|
|
|
|
*/
|
2012-05-14 07:43:50 +02:00
|
|
|
|
/*
|
|
|
|
|
* This code is based on original Tony Tough source code
|
|
|
|
|
*
|
|
|
|
|
* Copyright (c) 1997-2003 Nayma Software
|
|
|
|
|
*/
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
|
|
|
|
#ifndef TONY_FONT_H
|
|
|
|
|
#define TONY_FONT_H
|
|
|
|
|
|
|
|
|
|
#include "common/system.h"
|
2012-05-11 23:15:59 +10:00
|
|
|
|
#include "common/coroutines.h"
|
2012-04-30 09:27:12 +10:00
|
|
|
|
#include "tony/gfxcore.h"
|
|
|
|
|
#include "tony/resid.h"
|
|
|
|
|
|
|
|
|
|
namespace Tony {
|
|
|
|
|
|
2012-05-02 00:23:41 +10:00
|
|
|
|
class RMInput;
|
2012-04-30 09:27:12 +10:00
|
|
|
|
class RMInventory;
|
2012-04-30 23:16:19 +10:00
|
|
|
|
class RMItem;
|
2012-05-02 00:23:41 +10:00
|
|
|
|
class RMLoc;
|
|
|
|
|
class RMLocation;
|
|
|
|
|
class RMPointer;
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Gestisce un font, in cui ha varie surface per ogni lettera
|
|
|
|
|
*/
|
|
|
|
|
class RMFont : public RMGfxTaskSetPrior {
|
|
|
|
|
protected:
|
2012-05-14 21:29:27 +02:00
|
|
|
|
int nLetters;
|
|
|
|
|
RMGfxSourceBuffer8RLEByte *m_letter;
|
2012-04-30 09:27:12 +10:00
|
|
|
|
public:
|
2012-05-14 21:29:27 +02:00
|
|
|
|
int m_fontDimx, m_fontDimy;
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
|
|
|
|
private:
|
2012-05-14 21:29:27 +02:00
|
|
|
|
int m_dimx, m_dimy;
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
2012-05-14 21:29:27 +02:00
|
|
|
|
class RMFontPrimitive : public RMGfxPrimitive {
|
|
|
|
|
public:
|
|
|
|
|
RMFontPrimitive() : RMGfxPrimitive() {}
|
|
|
|
|
RMFontPrimitive(RMGfxTask *task) : RMGfxPrimitive(task) {}
|
2012-05-04 21:30:45 +10:00
|
|
|
|
virtual ~RMFontPrimitive() { }
|
2012-05-14 21:29:27 +02:00
|
|
|
|
virtual RMGfxPrimitive *Duplicate() {
|
|
|
|
|
return new RMFontPrimitive(*this);
|
|
|
|
|
}
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
2012-05-14 21:29:27 +02:00
|
|
|
|
int m_nChar;
|
|
|
|
|
};
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
|
|
|
|
protected:
|
2012-05-14 21:29:27 +02:00
|
|
|
|
// Caricamento del font
|
|
|
|
|
void Load(uint32 resID, int nChars, int dimx, int dimy, uint32 palResID = RES_F_PAL);
|
|
|
|
|
void Load(const byte *buf, int nChars, int dimx, int dimy, uint32 palResID = RES_F_PAL);
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
2012-05-14 21:29:27 +02:00
|
|
|
|
// Scaricamente del font (anche da distruttore)
|
|
|
|
|
void Unload(void);
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
|
|
|
|
protected:
|
2012-05-14 21:29:27 +02:00
|
|
|
|
// Conversione (da overloadare)
|
|
|
|
|
virtual int ConvertToLetter(int nChar) = 0;
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
2012-05-14 21:29:27 +02:00
|
|
|
|
// Lunghezza dei caratteri (da overloadare)
|
|
|
|
|
virtual int LetterLength(int nChar, int nNext = 0) = 0;
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
|
|
|
|
public:
|
2012-05-14 21:29:27 +02:00
|
|
|
|
virtual int LetterHeight(void) = 0;
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
|
|
|
|
public:
|
2012-05-14 21:29:27 +02:00
|
|
|
|
RMFont();
|
|
|
|
|
virtual ~RMFont();
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
2012-05-14 21:29:27 +02:00
|
|
|
|
// Inizializzazione e chiusura
|
|
|
|
|
virtual void Init(void) = 0;
|
|
|
|
|
virtual void Close(void);
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
2012-05-14 21:29:27 +02:00
|
|
|
|
// Funzione del task da overloadare
|
|
|
|
|
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBug, RMGfxPrimitive *prim);
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
2012-05-14 21:29:27 +02:00
|
|
|
|
// Crea una primitiva per una lettera
|
|
|
|
|
RMGfxPrimitive *MakeLetterPrimitive(byte bChar, int &nLength);
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
2012-05-14 21:29:27 +02:00
|
|
|
|
// Lunghezza in pixel di una stringa con il font corrente
|
|
|
|
|
int StringLen(const RMString &text);
|
|
|
|
|
int StringLen(char bChar, char bNext = 0);
|
2012-04-30 09:27:12 +10:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class RMFontColor : public virtual RMFont {
|
|
|
|
|
private:
|
2012-05-14 21:29:27 +02:00
|
|
|
|
byte m_r, m_g, m_b;
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
|
|
|
|
public:
|
2012-05-14 21:29:27 +02:00
|
|
|
|
RMFontColor();
|
2012-04-30 09:27:12 +10:00
|
|
|
|
virtual ~RMFontColor();
|
2012-05-14 21:29:27 +02:00
|
|
|
|
virtual void SetBaseColor(byte r, byte g, byte b);
|
2012-04-30 09:27:12 +10:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class RMFontWithTables : public virtual RMFont {
|
|
|
|
|
protected:
|
2012-05-14 21:29:27 +02:00
|
|
|
|
int cTable[256];
|
|
|
|
|
int lTable[256];
|
|
|
|
|
int lDefault;
|
|
|
|
|
int hDefault;
|
|
|
|
|
signed char l2Table[256][256];
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
|
|
|
|
protected:
|
2012-05-14 21:29:27 +02:00
|
|
|
|
// Overload dei metodi
|
|
|
|
|
int ConvertToLetter(int nChar) {
|
|
|
|
|
return cTable[nChar];
|
|
|
|
|
}
|
|
|
|
|
int LetterLength(int nChar, int nNext = 0) {
|
|
|
|
|
return (nChar != -1 ? lTable[nChar] + l2Table[nChar][nNext] : lDefault);
|
|
|
|
|
}
|
|
|
|
|
|
2012-04-30 09:27:12 +10:00
|
|
|
|
public:
|
2012-05-14 21:29:27 +02:00
|
|
|
|
int LetterHeight() {
|
|
|
|
|
return hDefault;
|
|
|
|
|
}
|
2012-04-30 09:27:12 +10:00
|
|
|
|
virtual ~RMFontWithTables() {}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class RMFontParla : public RMFontColor, public RMFontWithTables {
|
|
|
|
|
public:
|
2012-05-14 21:29:27 +02:00
|
|
|
|
void Init(void);
|
2012-04-30 09:27:12 +10:00
|
|
|
|
virtual ~RMFontParla() {}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class RMFontObj : public RMFontColor, public RMFontWithTables {
|
|
|
|
|
private:
|
2012-05-14 21:29:27 +02:00
|
|
|
|
void SetBothCase(int nChar, int nNext, signed char spiazz);
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
|
|
|
|
public:
|
2012-05-14 21:29:27 +02:00
|
|
|
|
void Init(void);
|
2012-04-30 09:27:12 +10:00
|
|
|
|
virtual ~RMFontObj() {}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class RMFontMacc : public RMFontColor, public RMFontWithTables {
|
|
|
|
|
public:
|
2012-05-14 21:29:27 +02:00
|
|
|
|
void Init(void);
|
2012-04-30 09:27:12 +10:00
|
|
|
|
virtual ~RMFontMacc() {}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class RMFontCredits : public RMFontColor, public RMFontWithTables {
|
|
|
|
|
public:
|
2012-05-14 21:29:27 +02:00
|
|
|
|
void Init(void);
|
2012-04-30 09:27:12 +10:00
|
|
|
|
virtual ~RMFontCredits() {}
|
2012-05-14 21:29:27 +02:00
|
|
|
|
virtual void SetBaseColor(byte r, byte g, byte b) {}
|
2012-04-30 09:27:12 +10:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Gestisce una scritta su schermo, con tutte le possibilita' di formattazione disponibile
|
|
|
|
|
*/
|
|
|
|
|
class RMText : public RMGfxWoodyBuffer {
|
|
|
|
|
private:
|
2012-05-14 21:29:27 +02:00
|
|
|
|
static RMFontColor *m_fonts[4];
|
|
|
|
|
static RMGfxClearTask m_clear;
|
|
|
|
|
int maxLineLength;
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
|
|
|
|
public:
|
2012-05-14 21:29:27 +02:00
|
|
|
|
enum HORALIGN {
|
|
|
|
|
HLEFT,
|
|
|
|
|
HLEFTPAR,
|
|
|
|
|
HCENTER,
|
|
|
|
|
HRIGHT
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
enum VERALIGN {
|
|
|
|
|
VTOP,
|
|
|
|
|
VCENTER,
|
|
|
|
|
VBOTTOM
|
|
|
|
|
};
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
HORALIGN aHorType;
|
2012-05-14 21:29:27 +02:00
|
|
|
|
VERALIGN aVerType;
|
|
|
|
|
byte m_r, m_g, m_b;
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
|
|
|
|
protected:
|
2012-05-14 21:29:27 +02:00
|
|
|
|
virtual void ClipOnScreen(RMGfxPrimitive *prim);
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
|
|
|
|
public:
|
2012-05-14 21:29:27 +02:00
|
|
|
|
RMText();
|
|
|
|
|
virtual ~RMText();
|
2012-05-13 23:05:41 +10:00
|
|
|
|
static void InitStatics();
|
2012-05-05 10:56:56 +10:00
|
|
|
|
static void Unload();
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
2012-05-14 21:29:27 +02:00
|
|
|
|
// Setta il tipo di allineamento
|
|
|
|
|
void SetAlignType(HORALIGN aHor, VERALIGN aVer) {
|
|
|
|
|
aHorType = aHor;
|
|
|
|
|
aVerType = aVer;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Setta la lunghezza massima di una linea in pixel (utilizzato per formattare il testo)
|
|
|
|
|
void SetMaxLineLength(int max);
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
2012-05-14 21:29:27 +02:00
|
|
|
|
// Scrive un testo
|
|
|
|
|
void WriteText(const RMString &text, int font, int *time = NULL);
|
|
|
|
|
void WriteText(const RMString &text, RMFontColor *font, int *time = NULL);
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
2012-05-14 21:29:27 +02:00
|
|
|
|
// Overloading della funzione ereditata da RMGfxTask per decidere
|
|
|
|
|
// quando eliminare un oggetto dalla OTLIST
|
|
|
|
|
virtual void RemoveThis(CORO_PARAM, bool &result);
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
2012-05-14 21:29:27 +02:00
|
|
|
|
// Overloading del Draw per centrare la scritta, se necessario
|
|
|
|
|
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
2012-05-14 21:29:27 +02:00
|
|
|
|
// Setta il colore di base
|
|
|
|
|
void SetColor(byte r, byte g, byte b) {
|
|
|
|
|
m_r = r;
|
|
|
|
|
m_g = g;
|
|
|
|
|
m_b = b;
|
|
|
|
|
}
|
2012-04-30 09:27:12 +10:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
2012-05-14 21:29:27 +02:00
|
|
|
|
* Gestisce il testo di un dialogo
|
2012-04-30 09:27:12 +10:00
|
|
|
|
*/
|
2012-05-02 00:23:41 +10:00
|
|
|
|
class RMTextDialog : public RMText {
|
2012-05-14 21:29:27 +02:00
|
|
|
|
protected:
|
|
|
|
|
int m_startTime;
|
|
|
|
|
int m_time;
|
|
|
|
|
bool m_bSkipStatus;
|
|
|
|
|
RMPoint dst;
|
|
|
|
|
uint32 hEndDisplay;
|
|
|
|
|
bool m_bShowed;
|
2012-04-30 09:27:12 +10:00
|
|
|
|
bool m_bForceTime;
|
2012-05-14 21:29:27 +02:00
|
|
|
|
bool m_bForceNoTime;
|
2012-05-09 00:42:27 +10:00
|
|
|
|
uint32 hCustomSkip;
|
2012-05-14 21:29:27 +02:00
|
|
|
|
uint32 hCustomSkip2;
|
|
|
|
|
RMInput *m_input;
|
2012-04-30 09:27:12 +10:00
|
|
|
|
bool m_bAlwaysDisplay;
|
|
|
|
|
bool m_bNoTab;
|
|
|
|
|
|
2012-05-14 21:29:27 +02:00
|
|
|
|
public:
|
|
|
|
|
RMTextDialog();
|
|
|
|
|
virtual ~RMTextDialog();
|
|
|
|
|
|
|
|
|
|
// Scrive un testo
|
|
|
|
|
void WriteText(const RMString &text, int font, int *time = NULL);
|
|
|
|
|
void WriteText(const RMString &text, RMFontColor *font, int *time = NULL);
|
|
|
|
|
|
|
|
|
|
// Overloading della funzione ereditata da RMGfxTask per decidere
|
|
|
|
|
// quando eliminare un oggetto dalla OTLIST
|
|
|
|
|
virtual void RemoveThis(CORO_PARAM, bool &result);
|
|
|
|
|
|
|
|
|
|
// Overloading della funzione di deregistrazione, utilizzata per capire
|
|
|
|
|
// quando ci leviamo di torno
|
|
|
|
|
virtual void Unregister(void);
|
|
|
|
|
|
|
|
|
|
// Overloading del Draw per centrare la scritta, se necessario
|
|
|
|
|
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
|
|
|
|
|
|
|
|
|
|
// Setta la posizione
|
|
|
|
|
void SetPosition(const RMPoint &pt) {
|
|
|
|
|
dst = pt;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Aspetta che venga finita la visualizzazione
|
|
|
|
|
void WaitForEndDisplay(CORO_PARAM);
|
|
|
|
|
void SetCustomSkipHandle(uint32 hCustomSkip);
|
|
|
|
|
void SetCustomSkipHandle2(uint32 hCustomSkip);
|
|
|
|
|
void SetSkipStatus(bool bEnabled);
|
2012-04-30 09:27:12 +10:00
|
|
|
|
void SetForcedTime(uint32 dwTime);
|
|
|
|
|
void SetNoTab(void);
|
|
|
|
|
void ForceTime(void);
|
|
|
|
|
void ForceNoTime(void);
|
|
|
|
|
void SetAlwaysDisplay(void);
|
|
|
|
|
|
2012-05-14 21:29:27 +02:00
|
|
|
|
// Setta il dispositivo di input, per permettere skip da mouse
|
|
|
|
|
void SetInput(RMInput *input);
|
|
|
|
|
|
|
|
|
|
void Show(void);
|
|
|
|
|
void Hide(CORO_PARAM);
|
2012-04-30 09:27:12 +10:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class RMTextDialogScrolling : public RMTextDialog {
|
|
|
|
|
protected:
|
2012-05-14 21:29:27 +02:00
|
|
|
|
RMLocation *curLoc;
|
|
|
|
|
RMPoint startScroll;
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
2012-05-14 21:29:27 +02:00
|
|
|
|
virtual void ClipOnScreen(RMGfxPrimitive *prim);
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
|
|
|
|
public:
|
2012-05-14 21:29:27 +02:00
|
|
|
|
RMTextDialogScrolling();
|
|
|
|
|
RMTextDialogScrolling(RMLocation *loc);
|
2012-04-30 09:27:12 +10:00
|
|
|
|
virtual ~RMTextDialogScrolling();
|
|
|
|
|
|
2012-05-14 21:29:27 +02:00
|
|
|
|
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
|
2012-04-30 09:27:12 +10:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/****************************************************************************\
|
|
|
|
|
* class RMTextItemName
|
|
|
|
|
* --------------------
|
|
|
|
|
* Description: Gestisce il nome dell'oggetto selezionato su schermo
|
|
|
|
|
\****************************************************************************/
|
|
|
|
|
|
|
|
|
|
class RMTextItemName : protected RMText {
|
|
|
|
|
protected:
|
2012-05-14 21:29:27 +02:00
|
|
|
|
RMPoint m_mpos;
|
|
|
|
|
RMPoint m_curscroll;
|
|
|
|
|
RMItem *m_item;
|
|
|
|
|
RMString m_itemName;
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
|
|
|
|
public:
|
2012-05-14 21:29:27 +02:00
|
|
|
|
RMTextItemName();
|
2012-04-30 09:27:12 +10:00
|
|
|
|
virtual ~RMTextItemName();
|
|
|
|
|
|
2012-05-14 21:29:27 +02:00
|
|
|
|
void SetMouseCoord(const RMPoint &m) {
|
|
|
|
|
m_mpos = m;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void DoFrame(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMLocation &loc, RMPointer &ptr, RMInventory &inv);
|
|
|
|
|
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
2012-05-14 21:29:27 +02:00
|
|
|
|
RMPoint GetHotspot();
|
|
|
|
|
RMItem *GetSelectedItem();
|
|
|
|
|
bool IsItemSelected();
|
|
|
|
|
bool IsNormalItemSelected();
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
2012-05-14 21:29:27 +02:00
|
|
|
|
virtual void RemoveThis(CORO_PARAM, bool &result) {
|
|
|
|
|
result = true;
|
|
|
|
|
}
|
2012-04-30 09:27:12 +10:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Gestisce la schermata di scelta delle voci di un dialogo
|
|
|
|
|
*/
|
|
|
|
|
class RMDialogChoice : public RMGfxWoodyBuffer {
|
|
|
|
|
private:
|
2012-05-14 21:29:27 +02:00
|
|
|
|
int m_curSelection;
|
|
|
|
|
int m_numChoices;
|
|
|
|
|
RMText *m_drawedStrings;
|
|
|
|
|
RMPoint *m_ptDrawStrings;
|
|
|
|
|
int m_curAdded;
|
|
|
|
|
bool m_bShow;
|
|
|
|
|
RMGfxSourceBuffer8 DlgText;
|
|
|
|
|
RMGfxSourceBuffer8 DlgTextLine;
|
|
|
|
|
RMPoint m_ptDrawPos;
|
|
|
|
|
uint32 hUnreg;
|
|
|
|
|
bool bRemoveFromOT;
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
|
|
|
|
protected:
|
2012-05-14 21:29:27 +02:00
|
|
|
|
void Prepare(CORO_PARAM);
|
|
|
|
|
void SetSelected(CORO_PARAM, int pos);
|
|
|
|
|
|
2012-04-30 09:27:12 +10:00
|
|
|
|
public:
|
2012-05-14 21:29:27 +02:00
|
|
|
|
virtual void RemoveThis(CORO_PARAM, bool &result);
|
|
|
|
|
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
|
|
|
|
|
void Unregister(void);
|
2012-04-30 09:27:12 +10:00
|
|
|
|
|
|
|
|
|
public:
|
2012-05-14 21:29:27 +02:00
|
|
|
|
// Inizializzazione
|
|
|
|
|
RMDialogChoice();
|
|
|
|
|
virtual ~RMDialogChoice();
|
|
|
|
|
|
|
|
|
|
// Inizializzazione e chiusura
|
|
|
|
|
void Init(void);
|
|
|
|
|
void Close(void);
|
|
|
|
|
|
|
|
|
|
// Setta il numero delle frasi possibili, che dovranno essere poi aggiunte
|
|
|
|
|
// con AddChoice()
|
|
|
|
|
void SetNumChoices(int num);
|
|
|
|
|
|
|
|
|
|
// Aggiunge una stringa con la scelta
|
|
|
|
|
void AddChoice(const RMString &string);
|
|
|
|
|
|
|
|
|
|
// Mostra e nasconde la scelta, con eventuali animazioni
|
|
|
|
|
// NOTA: Se non viene passato parametro alla Show(), <20> obbligo del
|
|
|
|
|
// chiamante assicurarsi che la classe venga inserita alla OTlist
|
|
|
|
|
void Show(CORO_PARAM, RMGfxTargetBuffer *bigBuf = NULL);
|
|
|
|
|
void Hide(CORO_PARAM);
|
|
|
|
|
|
|
|
|
|
// Polling di aggiornamento
|
|
|
|
|
void DoFrame(CORO_PARAM, RMPoint ptMousePos);
|
|
|
|
|
|
|
|
|
|
// Ritorna la voce attualmente selezionata, o -1 se nessuna <20> selezionata
|
|
|
|
|
int GetSelection(void);
|
2012-04-30 09:27:12 +10:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // End of namespace Tony
|
|
|
|
|
|
|
|
|
|
#endif
|