|
@@ -1,4 +1,4 @@
|
|
|
-// Editor main handlers (add your's local handler in proper main handler to prevent losing events)
|
|
|
|
|
|
|
+// Editor main handlers (add yours local handler in proper main handler to prevent losing events)
|
|
|
|
|
|
|
|
void EditorSubscribeToEvents()
|
|
void EditorSubscribeToEvents()
|
|
|
{
|
|
{
|
|
@@ -8,18 +8,33 @@ void EditorSubscribeToEvents()
|
|
|
SubscribeToEvent("MouseMove", "EditorMainHandleMouseMove");
|
|
SubscribeToEvent("MouseMove", "EditorMainHandleMouseMove");
|
|
|
SubscribeToEvent("MouseWheel", "EditorMainHandleMouseWheel");
|
|
SubscribeToEvent("MouseWheel", "EditorMainHandleMouseWheel");
|
|
|
SubscribeToEvent("MouseButtonDown", "EditorMainHandleMouseButtonDown");
|
|
SubscribeToEvent("MouseButtonDown", "EditorMainHandleMouseButtonDown");
|
|
|
-
|
|
|
|
|
|
|
+ SubscribeToEvent("MouseButtonUp", "EditorMainHandleMouseButtonUp");
|
|
|
|
|
+
|
|
|
|
|
+ SubscribeToEvent("PostRenderUpdate", "EditorMainHandlePostRenderUpdate");
|
|
|
|
|
+
|
|
|
|
|
+ SubscribeToEvent("UIMouseClick", "EditorMainHandleUIMouseClick");
|
|
|
|
|
+ SubscribeToEvent("UIMouseClickEnd", "EditorMainHandleUIMouseClickEnd");
|
|
|
|
|
+
|
|
|
|
|
+ SubscribeToEvent("BeginViewUpdate", "EditorMainHandleBeginViewUpdate");
|
|
|
|
|
+ SubscribeToEvent("EndViewUpdate", "EditorMainHandleEndViewUpdate");
|
|
|
|
|
+ SubscribeToEvent("BeginViewRender", "EditorMainHandleBeginViewRender");
|
|
|
|
|
+ SubscribeToEvent("EndViewRender", "EditorMainHandleEndViewRender");
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void EditorMainHandleKeyDown(StringHash eventType, VariantMap& eventData)
|
|
void EditorMainHandleKeyDown(StringHash eventType, VariantMap& eventData)
|
|
|
{
|
|
{
|
|
|
|
|
+ // EditorUI.as handler
|
|
|
|
|
+ HandleKeyDown(eventType, eventData);
|
|
|
|
|
+
|
|
|
// EditorColorWheel.as handler
|
|
// EditorColorWheel.as handler
|
|
|
HandleColorWheelKeyDown(eventType, eventData);
|
|
HandleColorWheelKeyDown(eventType, eventData);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void EditorMainHandleKeyUp(StringHash eventType, VariantMap& eventData)
|
|
void EditorMainHandleKeyUp(StringHash eventType, VariantMap& eventData)
|
|
|
{
|
|
{
|
|
|
-
|
|
|
|
|
|
|
+ // EditorUI.as handler
|
|
|
|
|
+ UnfadeUI();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void EditorMainHandleMouseMove(StringHash eventType, VariantMap& eventData)
|
|
void EditorMainHandleMouseMove(StringHash eventType, VariantMap& eventData)
|
|
@@ -54,6 +69,49 @@ void EditorMainHandleMouseButtonDown(StringHash eventType, VariantMap& eventData
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+void EditorMainHandleMouseButtonUp(StringHash eventType, VariantMap& eventData)
|
|
|
|
|
+{
|
|
|
|
|
+ // EditorUI.as handler
|
|
|
|
|
+ UnfadeUI();
|
|
|
|
|
+
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+void EditorMainHandlePostRenderUpdate(StringHash eventType, VariantMap& eventData)
|
|
|
|
|
+{
|
|
|
|
|
+ // EditorView.as handler
|
|
|
|
|
+ HandlePostRenderUpdate();
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+void EditorMainHandleUIMouseClick(StringHash eventType, VariantMap& eventData)
|
|
|
|
|
+{
|
|
|
|
|
+ // EditorView.as handler
|
|
|
|
|
+ ViewMouseClick();
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+void EditorMainHandleUIMouseClickEnd(StringHash eventType, VariantMap& eventData)
|
|
|
|
|
+{
|
|
|
|
|
+ // EditorView.as handler
|
|
|
|
|
+ ViewMouseClickEnd();
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
|
|
+void EditorMainHandleBeginViewUpdate(StringHash eventType, VariantMap& eventData)
|
|
|
|
|
+{
|
|
|
|
|
+ // EditorView.as handler
|
|
|
|
|
+ HandleBeginViewUpdate(eventType, eventData);
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
|
|
+void EditorMainHandleEndViewUpdate(StringHash eventType, VariantMap& eventData)
|
|
|
|
|
+{
|
|
|
|
|
+ // EditorView.as handler
|
|
|
|
|
+ HandleEndViewUpdate(eventType, eventData);
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
|
|
+void EditorMainHandleBeginViewRender(StringHash eventType, VariantMap& eventData)
|
|
|
|
|
+{
|
|
|
|
|
+ HandleBeginViewRender(eventType, eventData);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+void EditorMainHandleEndViewRender(StringHash eventType, VariantMap& eventData)
|
|
|
|
|
+{
|
|
|
|
|
+ HandleEndViewRender(eventType, eventData);
|
|
|
|
|
+}
|