Przeglądaj źródła

Moved object construction macros to more logical location

Ivan Savenko 1 rok temu
rodzic
commit
337431901f
2 zmienionych plików z 21 dodań i 21 usunięć
  1. 0 21
      client/gui/CGuiHandler.h
  2. 21 0
      client/gui/CIntObject.h

+ 0 - 21
client/gui/CGuiHandler.h

@@ -112,24 +112,3 @@ public:
 };
 
 extern CGuiHandler GH; //global gui handler
-
-struct SObjectConstruction
-{
-	CIntObject *myObj;
-	SObjectConstruction(CIntObject *obj);
-	~SObjectConstruction();
-};
-
-struct SSetCaptureState
-{
-	bool previousCapture;
-	SSetCaptureState(bool allow, ui8 actions);
-	~SSetCaptureState();
-};
-
-#define OBJ_CONSTRUCTION SObjectConstruction obj__i(this)
-#define OBJ_CONSTRUCTION_TARGETED(obj) SObjectConstruction obj__i(obj)
-#define OBJECT_CONSTRUCTION_CAPTURING(actions) SSetCaptureState obj__i1(true, actions); SObjectConstruction obj__i(this)
-#define OBJECT_CONSTRUCTION_CUSTOM_CAPTURING(actions) SSetCaptureState obj__i1(true, actions); SObjectConstruction obj__i(this)
-
-#define OBJ_CONSTRUCTION_CAPTURING_ALL_NO_DISPOSE SSetCaptureState obj__i1(true, 255 - DISPOSE); SObjectConstruction obj__i(this)

+ 21 - 0
client/gui/CIntObject.h

@@ -211,3 +211,24 @@ class EmptyStatusBar : public IStatusBar
 	virtual void setEnteringMode(bool on){};
 	virtual void setEnteredText(const std::string & text){};
 };
+
+struct SObjectConstruction
+{
+	CIntObject *myObj;
+	SObjectConstruction(CIntObject *obj);
+	~SObjectConstruction();
+};
+
+struct SSetCaptureState
+{
+	bool previousCapture;
+	SSetCaptureState(bool allow, ui8 actions);
+	~SSetCaptureState();
+};
+
+#define OBJ_CONSTRUCTION SObjectConstruction obj__i(this)
+#define OBJ_CONSTRUCTION_TARGETED(obj) SObjectConstruction obj__i(obj)
+#define OBJECT_CONSTRUCTION_CAPTURING(actions) SSetCaptureState obj__i1(true, actions); SObjectConstruction obj__i(this)
+#define OBJECT_CONSTRUCTION_CUSTOM_CAPTURING(actions) SSetCaptureState obj__i1(true, actions); SObjectConstruction obj__i(this)
+
+#define OBJ_CONSTRUCTION_CAPTURING_ALL_NO_DISPOSE SSetCaptureState obj__i1(true, ALL_ACTIONS); SObjectConstruction obj__i(this)