22 #ifndef CRYOMNI3D_VERSAILLES_TOOLBAR_H 23 #define CRYOMNI3D_VERSAILLES_TOOLBAR_H 25 #include "common/array.h" 26 #include "common/rect.h" 27 #include "graphics/managed_surface.h" 28 #include "graphics/surface.h" 30 #include "cryomni3d/font_manager.h" 31 #include "cryomni3d/objects.h" 32 #include "cryomni3d/sprites.h" 35 class CryOmni3DEngine;
37 namespace Versailles {
42 Toolbar() : _sprites(
nullptr), _fontManager(
nullptr), _inventory(
nullptr),
43 _messages(
nullptr), _engine(
nullptr), _inventoryEnabled(
true), _inventoryMaxOffset(0),
44 _inventoryOffset(0), _inventoryHovered(uint(-1)), _inventorySelected(uint(-1)), _backupSelectedObject(
nullptr),
45 _mouseInOptions(
false), _mouseInViewObject(
false), _inventoryButtonDragging(
false), _parentMustRedraw(
false),
46 _shortExit(
false), _position(60) { }
54 void inventoryChanged(uint newPosition);
55 uint inventoryOffset()
const {
return _inventoryOffset; }
56 void setInventoryOffset(uint offset) { _inventoryOffset = offset; }
57 void setInventoryEnabled(
bool enabled) { _inventoryEnabled = enabled; }
60 typedef uint(
Toolbar::*ZoneCallback)(uint dragStatus);
64 uint16 imageSecondary;
65 ZoneCallback callback;
76 static const uint kTextOffset = 13;
78 void addZone(uint16 cursorMainId, uint16 cursorSecondaryId,
Common::Point position,
79 ZoneCallback callback);
82 uint captureEvent(
const Common::Point &mousePos, uint dragStatus);
86 bool _inventoryEnabled;
87 uint _inventoryMaxOffset;
88 uint _inventoryOffset;
89 uint _inventoryHovered;
90 uint _inventorySelected;
92 Object *_backupSelectedObject;
94 bool _mouseInViewObject;
95 bool _inventoryButtonDragging;
97 bool _parentMustRedraw;
105 uint callbackInventory(uint dragStatus) {
return callbackInventory(N, dragStatus); }
106 uint callbackInventory(uint invId, uint dragStatus);
107 uint callbackInventoryPrev(uint dragStatus);
108 uint callbackInventoryNext(uint dragStatus);
109 uint callbackViewObject(uint dragStatus);
110 uint callbackOptions(uint dragStatus);
111 uint callbackDocumentation(uint dragStatus);
Definition: managed_surface.h:51
Definition: cryomni3d.h:62
Definition: font_manager.h:40
const T * const_iterator
Definition: array.h:55
Definition: cryomni3d.h:80