22 #ifndef SCUMM_MACGUI_MACGUI_INDY3_H 23 #define SCUMM_MACGUI_MACGUI_INDY3_H 25 #include "common/events.h" 26 #include "common/rect.h" 27 #include "common/str.h" 29 #include "graphics/surface.h" 37 enum ScrollDirection {
51 void setupCursor(
int &width,
int &height,
int &hotspotX,
int &hotspotY,
int &animate);
55 void initTextAreaForActor(
Actor *a, byte color);
56 void printCharToTextArea(
int chr,
int x,
int y,
int color);
68 bool isVerbGuiActive()
const;
71 void resetAfterLoad();
72 void update(
int delta);
76 bool getFontParams(FontId fontId,
int &
id,
int &size,
int &slant)
const;
80 void runAboutDialog();
81 bool runOpenDialog(
int &saveSlotToHandle);
83 bool runOptionsDialog();
84 bool runIqPointsDialog();
90 bool _visible =
false;
92 bool _leftButtonIsPressed =
false;
98 bool updateVerbs(
int delta);
99 void updateMouseHeldTimer(
int delta);
104 int getInventoryScrollOffset()
const;
105 void setInventoryScrollOffset(
int n)
const;
116 Widget(
int x,
int y,
int width,
int height);
119 void setEnabled(
bool enabled) {
120 if (enabled != _enabled)
127 void setTimer(
int t) { _timer = t; }
128 void clearTimer() { _timer = 0; }
129 bool hasTimer()
const {
return _timer > 0; }
131 virtual void setRedraw(
bool redraw) { _redraw = redraw; }
133 virtual void reset();
137 virtual void updateTimer(
int delta);
138 virtual void timeOut() {}
141 virtual void undraw();
143 byte translateChar(byte c)
const;
147 void drawBitmap(
Common::Rect r,
const uint16 *bitmap, Color color)
const;
149 void drawShadowFrame(
Common::Rect r, Color shadowColor, Color fillColor);
154 class VerbWidget :
public Widget {
161 VerbWidget(
int x,
int y,
int width,
int height) : Widget(x, y, width, height) {}
163 void setVerbid(
int n) { _verbid = n; }
164 bool hasVerb()
const {
return _verbslot != -1; }
165 void threaten() { _kill =
true; }
166 bool isDying()
const {
return _kill; }
170 virtual void updateVerb(
int verbslot);
176 class Button :
public VerbWidget {
181 Button(
int x,
int y,
int width,
int height);
187 void updateVerb(
int verbslot);
192 class Inventory :
public VerbWidget {
194 class ScrollBar :
public Widget {
200 ScrollBar(
int x,
int y,
int width,
int height);
202 void setInventoryParameters(
int invCount,
int invOffset);
203 void scroll(ScrollDirection dir);
204 int getHandlePosition();
213 class ScrollButton :
public Widget {
215 ScrollDirection _direction;
217 ScrollButton(
int x,
int y,
int width,
int height, ScrollDirection direction);
226 class Slot :
public Widget {
233 Slot(
int slot,
int x,
int y,
int width,
int height);
235 void clearName() { _name.
clear(); }
236 bool hasName()
const {
return !_name.empty(); }
239 void setObject(
int n);
240 int getObject()
const {
return _obj; }
251 ScrollBar *_scrollBar;
252 ScrollButton *_scrollButtons[2];
254 static const uint16 _upArrow[16];
255 static const uint16 _downArrow[16];
258 Inventory(
int x,
int y,
int width,
int height);
261 void setRedraw(
bool redraw);
267 void updateTimer(
int delta);
268 void updateVerb(
int verbslot);
276 bool isVerbGuiAllowed()
const;
284 void copyDirtyRectsToScreen();
Definition: macgui_impl.h:47
int16 h
Definition: surface.h:75
Definition: macgui_indy3.h:35
Definition: macgui_impl.h:484
Definition: macgui_impl.h:156
int16 w
Definition: surface.h:70
void fillRect(Common::Rect r, uint32 color)