aboutsummaryrefslogtreecommitdiff
path: root/engines/macventure/gui.h
diff options
context:
space:
mode:
Diffstat (limited to 'engines/macventure/gui.h')
-rw-r--r--engines/macventure/gui.h65
1 files changed, 5 insertions, 60 deletions
diff --git a/engines/macventure/gui.h b/engines/macventure/gui.h
index eb929cfcdd..95e1480762 100644
--- a/engines/macventure/gui.h
+++ b/engines/macventure/gui.h
@@ -35,6 +35,7 @@
#include "macventure/prebuilt_dialogs.h"
#include "macventure/dialog.h"
#include "macventure/controls.h"
+#include "macventure/windows.h"
namespace MacVenture {
@@ -49,6 +50,9 @@ class CommandButton;
class ImageAsset;
class Dialog;
+BorderBounds borderBounds(MVWindowType type);
+extern PrebuiltDialog prebuiltDialogs[];
+
enum MenuAction {
kMenuActionAbout,
kMenuActionNew,
@@ -68,64 +72,6 @@ enum MenuAction {
};
//} using namespace MacVentureMenuActions;
-enum WindowReference {
- kNoWindow = 0,
- kInventoryStart = 1,
- kCommandsWindow = 0x80,
- kMainGameWindow = 0x81,
- kOutConsoleWindow = 0x82,
- kSelfWindow = 0x83,
- kExitsWindow = 0x84,
- kDiplomaWindow = 0x85
-};
-
-enum MVWindowType {
- kDocument = 0x00,
- kDBox = 0x01,
- kPlainDBox = 0x02,
- kAltBox = 0x03,
- kNoGrowDoc = 0x04,
- kMovableDBox = 0x05,
- kZoomDoc = 0x08,
- kZoomNoGrow = 0x0c,
- kRDoc16 = 0x10,
- kRDoc4 = 0x12,
- kRDoc6 = 0x14,
- kRDoc10 = 0x16
-};
-
-
-struct DrawableObject {
- ObjID obj;
- byte mode;
- DrawableObject(ObjID id, byte md) {
- obj = id;
- mode = md;
- }
-};
-
-struct WindowData {
- Common::Rect bounds;
- MVWindowType type;
- ObjID objRef;
- uint16 visible;
- uint16 hasCloseBox;
- WindowReference refcon;
- uint8 titleLength;
- Common::String title;
- Common::Array<DrawableObject> children;
- bool updateScroll;
-};
-
-struct BorderBounds {
- uint16 leftOffset;
- uint16 topOffset;
- uint16 rightOffset;
- uint16 bottomOffset;
-
- BorderBounds(uint16 l, uint16 t, uint16 r, uint16 b) : leftOffset(l), topOffset(t), rightOffset(r), bottomOffset(b) {}
-};
-
struct DraggedObj {
ObjID id;
Common::Point pos;
@@ -213,8 +159,6 @@ public:
void loadGame(int slot);
void saveInto(int slot);
- // Ugly switches
- BorderBounds borderBounds(MVWindowType type);
private: // Attributes
@@ -292,6 +236,7 @@ private: // Methods
void handleDragRelease(Common::Point pos, bool shiftPressed, bool isDoubleClick);
Common::Rect calculateClickRect(Common::Point clickPos, Common::Rect windowBounds);
Common::Point localize(Common::Point point, WindowReference origin, WindowReference target);
+ void removeInventoryWindow(WindowReference ref);
void ensureAssetLoaded(ObjID obj);