2012-04-29 23:27:12 +00: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.
|
|
|
|
*
|
2021-12-26 17:47:58 +00:00
|
|
|
* 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 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
2014-02-18 01:34:26 +00:00
|
|
|
*
|
2012-04-29 23:27:12 +00:00
|
|
|
* 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.
|
2014-02-18 01:34:26 +00:00
|
|
|
*
|
2012-04-29 23:27:12 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
2021-12-26 17:47:58 +00:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2012-04-29 23:27:12 +00:00
|
|
|
*
|
|
|
|
*/
|
2012-05-14 05:43:50 +00:00
|
|
|
/*
|
|
|
|
* This code is based on original Tony Tough source code
|
|
|
|
*
|
|
|
|
* Copyright (c) 1997-2003 Nayma Software
|
|
|
|
*/
|
2012-04-29 23:27:12 +00:00
|
|
|
|
|
|
|
#ifndef TONY_FONT_H
|
|
|
|
#define TONY_FONT_H
|
|
|
|
|
|
|
|
#include "common/system.h"
|
2012-05-11 13:15:59 +00:00
|
|
|
#include "common/coroutines.h"
|
2012-04-29 23:27:12 +00:00
|
|
|
#include "tony/gfxcore.h"
|
|
|
|
#include "tony/resid.h"
|
|
|
|
|
|
|
|
namespace Tony {
|
|
|
|
|
2012-05-01 14:23:41 +00:00
|
|
|
class RMInput;
|
2012-04-29 23:27:12 +00:00
|
|
|
class RMInventory;
|
2012-04-30 13:16:19 +00:00
|
|
|
class RMItem;
|
2012-05-01 14:23:41 +00:00
|
|
|
class RMLoc;
|
|
|
|
class RMLocation;
|
|
|
|
class RMPointer;
|
2012-04-29 23:27:12 +00:00
|
|
|
|
|
|
|
/**
|
2012-05-20 05:28:48 +00:00
|
|
|
* Manages a font, in which there is a different surface for each letter
|
2012-04-29 23:27:12 +00:00
|
|
|
*/
|
|
|
|
class RMFont : public RMGfxTaskSetPrior {
|
|
|
|
protected:
|
2012-06-10 22:34:45 +00:00
|
|
|
int _nLetters;
|
2012-06-06 06:04:33 +00:00
|
|
|
RMGfxSourceBuffer8RLEByte *_letter;
|
2012-04-29 23:27:12 +00:00
|
|
|
public:
|
2012-06-06 06:04:33 +00:00
|
|
|
int _fontDimx, _fontDimy;
|
2012-04-29 23:27:12 +00:00
|
|
|
|
|
|
|
private:
|
2012-06-06 06:04:33 +00:00
|
|
|
int _dimx, _dimy;
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-05-14 19:29:27 +00:00
|
|
|
class RMFontPrimitive : public RMGfxPrimitive {
|
|
|
|
public:
|
2012-06-13 22:11:56 +00:00
|
|
|
RMFontPrimitive() : RMGfxPrimitive() { _nChar = 0; }
|
|
|
|
RMFontPrimitive(RMGfxTask *task) : RMGfxPrimitive(task) { _nChar = 0; }
|
2020-02-09 11:05:33 +00:00
|
|
|
~RMFontPrimitive() override { }
|
|
|
|
RMGfxPrimitive *duplicate() override {
|
2012-05-14 19:29:27 +00:00
|
|
|
return new RMFontPrimitive(*this);
|
|
|
|
}
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-06-06 06:04:33 +00:00
|
|
|
int _nChar;
|
2012-05-14 19:29:27 +00:00
|
|
|
};
|
2012-04-29 23:27:12 +00:00
|
|
|
|
|
|
|
protected:
|
2012-05-20 05:28:48 +00:00
|
|
|
// Loads the font
|
2012-06-06 06:04:33 +00:00
|
|
|
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-29 23:27:12 +00:00
|
|
|
|
2012-05-20 05:28:48 +00:00
|
|
|
// Remove the font
|
2012-06-18 06:24:33 +00:00
|
|
|
void unload();
|
2012-04-29 23:27:12 +00:00
|
|
|
|
|
|
|
protected:
|
2012-05-20 05:28:48 +00:00
|
|
|
// Conversion form character to font index
|
2012-06-06 06:04:33 +00:00
|
|
|
virtual int convertToLetter(byte nChar) = 0;
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-05-20 05:28:48 +00:00
|
|
|
// Character width
|
2012-06-06 06:04:33 +00:00
|
|
|
virtual int letterLength(int nChar, int nNext = 0) = 0;
|
2012-04-29 23:27:12 +00:00
|
|
|
|
|
|
|
public:
|
2012-06-18 06:24:33 +00:00
|
|
|
virtual int letterHeight() = 0;
|
2012-04-29 23:27:12 +00:00
|
|
|
|
|
|
|
public:
|
2012-05-14 19:29:27 +00:00
|
|
|
RMFont();
|
2020-02-09 11:05:33 +00:00
|
|
|
~RMFont() override;
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-06-17 17:39:58 +00:00
|
|
|
// Initialization and closing
|
2012-06-18 06:24:33 +00:00
|
|
|
virtual void init() = 0;
|
|
|
|
virtual void close();
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-05-20 05:28:48 +00:00
|
|
|
// Drawing
|
2020-02-09 11:05:33 +00:00
|
|
|
void draw(CORO_PARAM, RMGfxTargetBuffer &bigBug, RMGfxPrimitive *prim) override;
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-05-20 05:28:48 +00:00
|
|
|
// Create a primitive for a letter
|
2012-06-06 06:04:33 +00:00
|
|
|
RMGfxPrimitive *makeLetterPrimitive(byte bChar, int &nLength);
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-05-20 05:28:48 +00:00
|
|
|
// Length in pixels of a string with the current font
|
2012-08-24 22:21:58 +00:00
|
|
|
int stringLen(const Common::String &text);
|
2012-06-06 06:04:33 +00:00
|
|
|
int stringLen(char bChar, char bNext = 0);
|
2012-04-29 23:27:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class RMFontColor : public virtual RMFont {
|
|
|
|
private:
|
2012-06-10 22:34:45 +00:00
|
|
|
byte _fontR, _fontG, _fontB;
|
2012-04-29 23:27:12 +00:00
|
|
|
|
|
|
|
public:
|
2012-05-14 19:29:27 +00:00
|
|
|
RMFontColor();
|
2020-02-09 11:05:33 +00:00
|
|
|
~RMFontColor() override;
|
2012-06-06 06:31:06 +00:00
|
|
|
virtual void setBaseColor(byte r, byte g, byte b);
|
2012-04-29 23:27:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class RMFontWithTables : public virtual RMFont {
|
|
|
|
protected:
|
2012-06-10 22:34:45 +00:00
|
|
|
int _cTable[256];
|
|
|
|
int _lTable[256];
|
|
|
|
int _lDefault;
|
|
|
|
int _hDefault;
|
|
|
|
signed char _l2Table[256][256];
|
2012-04-29 23:27:12 +00:00
|
|
|
|
|
|
|
protected:
|
2012-05-20 05:28:48 +00:00
|
|
|
// Overloaded methods
|
2020-02-09 11:05:33 +00:00
|
|
|
int convertToLetter(byte nChar) override;
|
|
|
|
int letterLength(int nChar, int nNext = 0) override;
|
2012-05-14 19:29:27 +00:00
|
|
|
|
2012-04-29 23:27:12 +00:00
|
|
|
public:
|
2020-02-09 11:05:33 +00:00
|
|
|
int letterHeight() override {
|
2012-06-10 22:34:45 +00:00
|
|
|
return _hDefault;
|
2012-05-14 19:29:27 +00:00
|
|
|
}
|
2020-02-09 11:05:33 +00:00
|
|
|
~RMFontWithTables() override {}
|
2012-04-29 23:27:12 +00:00
|
|
|
};
|
|
|
|
|
2012-06-18 06:28:13 +00:00
|
|
|
class RMFontDialog : public RMFontColor, public RMFontWithTables {
|
2012-04-29 23:27:12 +00:00
|
|
|
public:
|
2020-02-09 11:05:33 +00:00
|
|
|
void init() override;
|
|
|
|
~RMFontDialog() override {}
|
2012-04-29 23:27:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class RMFontObj : public RMFontColor, public RMFontWithTables {
|
|
|
|
private:
|
2012-06-06 06:04:33 +00:00
|
|
|
void setBothCase(int nChar, int nNext, signed char spiazz);
|
2012-04-29 23:27:12 +00:00
|
|
|
|
|
|
|
public:
|
2020-02-09 11:05:33 +00:00
|
|
|
void init() override;
|
|
|
|
~RMFontObj() override {}
|
2012-04-29 23:27:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class RMFontMacc : public RMFontColor, public RMFontWithTables {
|
|
|
|
public:
|
2020-02-09 11:05:33 +00:00
|
|
|
void init() override;
|
|
|
|
~RMFontMacc() override {}
|
2012-04-29 23:27:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class RMFontCredits : public RMFontColor, public RMFontWithTables {
|
|
|
|
public:
|
2020-02-09 11:05:33 +00:00
|
|
|
void init() override;
|
|
|
|
~RMFontCredits() override {}
|
|
|
|
void setBaseColor(byte r, byte g, byte b) override {}
|
2012-04-29 23:27:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2012-05-20 05:28:48 +00:00
|
|
|
* Manages writing text onto9 the screen
|
2012-04-29 23:27:12 +00:00
|
|
|
*/
|
|
|
|
class RMText : public RMGfxWoodyBuffer {
|
|
|
|
private:
|
2012-06-06 06:04:33 +00:00
|
|
|
static RMFontColor *_fonts[4];
|
2012-06-10 22:34:45 +00:00
|
|
|
int _maxLineLength;
|
2012-04-29 23:27:12 +00:00
|
|
|
|
|
|
|
public:
|
2012-06-16 09:09:08 +00:00
|
|
|
enum HorAlign {
|
2012-11-12 00:39:20 +00:00
|
|
|
HLEFT,
|
|
|
|
HLEFTPAR,
|
|
|
|
HCENTER,
|
|
|
|
HRIGHT
|
2012-05-14 19:29:27 +00:00
|
|
|
};
|
|
|
|
|
2012-06-16 09:09:08 +00:00
|
|
|
enum VerAlign {
|
2012-11-12 00:39:20 +00:00
|
|
|
VTOP,
|
|
|
|
VCENTER,
|
|
|
|
VBOTTOM
|
2012-05-14 19:29:27 +00:00
|
|
|
};
|
2012-04-29 23:27:12 +00:00
|
|
|
|
|
|
|
private:
|
2012-06-16 09:09:08 +00:00
|
|
|
HorAlign _aHorType;
|
|
|
|
VerAlign _aVerType;
|
2012-06-10 22:34:45 +00:00
|
|
|
byte _textR, _textG, _textB;
|
2012-04-29 23:27:12 +00:00
|
|
|
|
|
|
|
protected:
|
2012-06-06 06:04:33 +00:00
|
|
|
virtual void clipOnScreen(RMGfxPrimitive *prim);
|
2012-04-29 23:27:12 +00:00
|
|
|
|
|
|
|
public:
|
2012-05-14 19:29:27 +00:00
|
|
|
RMText();
|
2020-02-09 11:05:33 +00:00
|
|
|
~RMText() override;
|
2012-06-05 06:39:55 +00:00
|
|
|
static void initStatics();
|
2012-06-06 06:04:33 +00:00
|
|
|
static void unload();
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-05-20 05:28:48 +00:00
|
|
|
// Set the alignment type
|
2012-09-02 08:34:11 +00:00
|
|
|
void setAlignType(HorAlign aHor, VerAlign aVer);
|
2012-05-14 19:29:27 +00:00
|
|
|
|
2012-05-20 05:28:48 +00:00
|
|
|
// Sets the maximum length of a line in pixels (used to format the text)
|
2012-06-06 06:04:33 +00:00
|
|
|
void setMaxLineLength(int max);
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-05-20 05:28:48 +00:00
|
|
|
// Write the text
|
2012-08-24 20:35:22 +00:00
|
|
|
void writeText(const Common::String &text, int font, int *time = NULL);
|
|
|
|
void writeText(Common::String text, RMFontColor *font, int *time = NULL);
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-05-20 05:28:48 +00:00
|
|
|
// Overloaded function to decide when you delete the object from the OT list
|
2020-02-09 11:05:33 +00:00
|
|
|
void removeThis(CORO_PARAM, bool &result) override;
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-05-20 05:28:48 +00:00
|
|
|
// Overloading of the Draw to center the text, if necessary
|
2020-02-09 11:05:33 +00:00
|
|
|
void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) override;
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-06-17 16:36:23 +00:00
|
|
|
// Set the base color
|
2012-09-02 08:34:11 +00:00
|
|
|
void setColor(byte r, byte g, byte b);
|
2012-04-29 23:27:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2012-05-20 05:28:48 +00:00
|
|
|
* Manages text in a dialog
|
2012-04-29 23:27:12 +00:00
|
|
|
*/
|
2012-05-01 14:23:41 +00:00
|
|
|
class RMTextDialog : public RMText {
|
2012-05-14 19:29:27 +00:00
|
|
|
protected:
|
2012-06-06 06:04:33 +00:00
|
|
|
int _startTime;
|
|
|
|
int _time;
|
|
|
|
bool _bSkipStatus;
|
2012-06-10 22:34:45 +00:00
|
|
|
RMPoint _dst;
|
|
|
|
uint32 _hEndDisplay;
|
2012-06-06 06:04:33 +00:00
|
|
|
bool _bShowed;
|
|
|
|
bool _bForceTime;
|
|
|
|
bool _bForceNoTime;
|
2012-06-10 22:34:45 +00:00
|
|
|
uint32 _hCustomSkip;
|
|
|
|
uint32 _hCustomSkip2;
|
2012-06-06 06:04:33 +00:00
|
|
|
RMInput *_input;
|
|
|
|
bool _bAlwaysDisplay;
|
|
|
|
bool _bNoTab;
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-05-14 19:29:27 +00:00
|
|
|
public:
|
|
|
|
RMTextDialog();
|
2020-02-09 11:05:33 +00:00
|
|
|
~RMTextDialog() override;
|
2012-05-14 19:29:27 +00:00
|
|
|
|
2012-05-20 05:28:48 +00:00
|
|
|
// Write the text
|
2012-08-24 22:21:58 +00:00
|
|
|
void writeText(const Common::String &text, int font, int *time = NULL);
|
|
|
|
void writeText(const Common::String &text, RMFontColor *font, int *time = NULL);
|
2012-05-14 19:29:27 +00:00
|
|
|
|
2012-05-20 05:28:48 +00:00
|
|
|
// Overloaded function to decide when you delete the object from the OT list
|
2020-02-09 11:05:33 +00:00
|
|
|
void removeThis(CORO_PARAM, bool &result) override;
|
2012-05-14 19:29:27 +00:00
|
|
|
|
2012-05-20 05:28:48 +00:00
|
|
|
// Overloaded de-registration
|
2020-02-09 11:05:33 +00:00
|
|
|
void unregister() override;
|
2012-05-14 19:29:27 +00:00
|
|
|
|
2012-05-20 05:28:48 +00:00
|
|
|
// Overloading of the Draw to center the text, if necessary
|
2020-02-09 11:05:33 +00:00
|
|
|
void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) override;
|
2012-05-14 19:29:27 +00:00
|
|
|
|
2012-05-20 05:28:48 +00:00
|
|
|
// Set the position
|
2012-09-02 08:34:11 +00:00
|
|
|
void setPosition(const RMPoint &pt);
|
2012-05-14 19:29:27 +00:00
|
|
|
|
2012-05-20 05:28:48 +00:00
|
|
|
// Waiting
|
2012-06-06 06:04:33 +00:00
|
|
|
void waitForEndDisplay(CORO_PARAM);
|
|
|
|
void setCustomSkipHandle(uint32 hCustomSkip);
|
|
|
|
void setCustomSkipHandle2(uint32 hCustomSkip);
|
|
|
|
void setSkipStatus(bool bEnabled);
|
|
|
|
void setForcedTime(uint32 dwTime);
|
2012-06-18 06:24:33 +00:00
|
|
|
void setNoTab();
|
|
|
|
void forceTime();
|
|
|
|
void forceNoTime();
|
|
|
|
void setAlwaysDisplay();
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-05-20 05:28:48 +00:00
|
|
|
// Set the input device, to allow skip from mouse
|
2012-06-06 06:04:33 +00:00
|
|
|
void setInput(RMInput *input);
|
2012-05-14 19:29:27 +00:00
|
|
|
|
2012-06-18 06:24:33 +00:00
|
|
|
void show();
|
2012-06-06 06:04:33 +00:00
|
|
|
void hide(CORO_PARAM);
|
2012-04-29 23:27:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class RMTextDialogScrolling : public RMTextDialog {
|
|
|
|
protected:
|
2012-06-10 22:34:45 +00:00
|
|
|
RMLocation *_curLoc;
|
|
|
|
RMPoint _startScroll;
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2020-02-09 11:05:33 +00:00
|
|
|
void clipOnScreen(RMGfxPrimitive *prim) override;
|
2012-04-29 23:27:12 +00:00
|
|
|
|
|
|
|
public:
|
2012-05-14 19:29:27 +00:00
|
|
|
RMTextDialogScrolling();
|
|
|
|
RMTextDialogScrolling(RMLocation *loc);
|
2020-02-09 11:05:33 +00:00
|
|
|
~RMTextDialogScrolling() override;
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2020-02-09 11:05:33 +00:00
|
|
|
void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) override;
|
2012-04-29 23:27:12 +00:00
|
|
|
};
|
|
|
|
|
2012-05-20 05:28:48 +00:00
|
|
|
/**
|
|
|
|
* Manages the name of a selected item on the screen
|
|
|
|
*/
|
2012-04-29 23:27:12 +00:00
|
|
|
class RMTextItemName : protected RMText {
|
|
|
|
protected:
|
2012-06-06 06:04:33 +00:00
|
|
|
RMPoint _mpos;
|
|
|
|
RMPoint _curscroll;
|
|
|
|
RMItem *_item;
|
2012-04-29 23:27:12 +00:00
|
|
|
|
|
|
|
public:
|
2012-05-14 19:29:27 +00:00
|
|
|
RMTextItemName();
|
2020-02-09 11:05:33 +00:00
|
|
|
~RMTextItemName() override;
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-09-02 08:34:11 +00:00
|
|
|
void setMouseCoord(const RMPoint &m);
|
2012-05-14 19:29:27 +00:00
|
|
|
|
2012-06-06 06:04:33 +00:00
|
|
|
void doFrame(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMLocation &loc, RMPointer &ptr, RMInventory &inv);
|
2020-02-09 11:05:33 +00:00
|
|
|
void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) override;
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2012-06-06 06:04:33 +00:00
|
|
|
RMPoint getHotspot();
|
|
|
|
RMItem *getSelectedItem();
|
|
|
|
bool isItemSelected();
|
2012-04-29 23:27:12 +00:00
|
|
|
|
2020-02-09 11:05:33 +00:00
|
|
|
void removeThis(CORO_PARAM, bool &result) override;
|
2012-04-29 23:27:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
2012-05-20 07:01:20 +00:00
|
|
|
* Manages the selection of screen items in a box
|
2012-04-29 23:27:12 +00:00
|
|
|
*/
|
|
|
|
class RMDialogChoice : public RMGfxWoodyBuffer {
|
|
|
|
private:
|
2012-06-06 06:04:33 +00:00
|
|
|
int _curSelection;
|
|
|
|
int _numChoices;
|
|
|
|
RMText *_drawedStrings;
|
|
|
|
RMPoint *_ptDrawStrings;
|
|
|
|
int _curAdded;
|
|
|
|
bool _bShow;
|
2012-06-10 22:34:45 +00:00
|
|
|
RMGfxSourceBuffer8 _dlgText;
|
|
|
|
RMGfxSourceBuffer8 _dlgTextLine;
|
2012-06-06 06:04:33 +00:00
|
|
|
RMPoint _ptDrawPos;
|
2012-06-10 22:34:45 +00:00
|
|
|
uint32 _hUnreg;
|
|
|
|
bool _bRemoveFromOT;
|
2012-04-29 23:27:12 +00:00
|
|
|
|
|
|
|
protected:
|
2012-06-06 06:04:33 +00:00
|
|
|
void prepare(CORO_PARAM);
|
|
|
|
void setSelected(CORO_PARAM, int pos);
|
2012-05-14 19:29:27 +00:00
|
|
|
|
2012-04-29 23:27:12 +00:00
|
|
|
public:
|
2020-02-09 11:05:33 +00:00
|
|
|
void removeThis(CORO_PARAM, bool &result) override;
|
|
|
|
void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) override;
|
|
|
|
void unregister() override;
|
2012-04-29 23:27:12 +00:00
|
|
|
|
|
|
|
public:
|
2012-06-17 17:39:58 +00:00
|
|
|
// Initialization
|
2012-05-14 19:29:27 +00:00
|
|
|
RMDialogChoice();
|
2020-02-09 11:05:33 +00:00
|
|
|
~RMDialogChoice() override;
|
2012-05-14 19:29:27 +00:00
|
|
|
|
2012-06-17 17:39:58 +00:00
|
|
|
// Initialization and closure
|
2014-03-10 05:47:26 +00:00
|
|
|
using RMGfxWoodyBuffer::init;
|
2012-06-18 06:24:33 +00:00
|
|
|
void init();
|
|
|
|
void close();
|
2012-05-14 19:29:27 +00:00
|
|
|
|
2012-05-20 05:28:48 +00:00
|
|
|
// Sets the number of possible sentences, which then be added with AddChoice()
|
2012-06-06 06:04:33 +00:00
|
|
|
void setNumChoices(int num);
|
2012-05-14 19:29:27 +00:00
|
|
|
|
2012-05-20 05:28:48 +00:00
|
|
|
// Adds a string with the choice
|
2012-08-24 22:21:58 +00:00
|
|
|
void addChoice(const Common::String &string);
|
2012-05-14 19:29:27 +00:00
|
|
|
|
2012-05-20 05:28:48 +00:00
|
|
|
// Show and hide the selection, with possible animations.
|
|
|
|
// NOTE: If no parameter is passed to Show(), it is the obligation of
|
|
|
|
// caller to ensure that the class is inserted into OT list
|
2012-06-06 06:04:33 +00:00
|
|
|
void show(CORO_PARAM, RMGfxTargetBuffer *bigBuf = NULL);
|
|
|
|
void hide(CORO_PARAM);
|
2012-05-14 19:29:27 +00:00
|
|
|
|
2012-05-20 05:28:48 +00:00
|
|
|
// Polling Update
|
2012-06-06 06:04:33 +00:00
|
|
|
void doFrame(CORO_PARAM, RMPoint ptMousePos);
|
2012-05-14 19:29:27 +00:00
|
|
|
|
2012-05-20 05:28:48 +00:00
|
|
|
// Returns the currently selected item, or -1 if none is selected
|
2012-06-18 06:24:33 +00:00
|
|
|
int getSelection();
|
2012-04-29 23:27:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // End of namespace Tony
|
|
|
|
|
|
|
|
#endif
|