diff --git a/src/game/editor/component.cpp b/src/game/editor/component.cpp index b752bbd0b78..d540c87051a 100644 --- a/src/game/editor/component.cpp +++ b/src/game/editor/component.cpp @@ -18,7 +18,14 @@ void CEditorComponent::Init(CEditor *pEditor) m_pRenderTools = pEditor->RenderTools(); } -void CEditorComponent::OnRender() {} +void CEditorComponent::OnUpdate(CUIRect View) +{ + OnInput(); + OnRender(View); +} + +void CEditorComponent::OnInput() {} +void CEditorComponent::OnRender(CUIRect View) {} CEditor *CEditorComponent::Editor() { return m_pEditor; } IInput *CEditorComponent::Input() { return m_pInput; } diff --git a/src/game/editor/component.h b/src/game/editor/component.h index 69d231c0adb..3526c9174a2 100644 --- a/src/game/editor/component.h +++ b/src/game/editor/component.h @@ -1,6 +1,8 @@ #ifndef GAME_EDITOR_COMPONENT_H #define GAME_EDITOR_COMPONENT_H +#include + class CEditor; class IInput; class IClient; @@ -11,7 +13,6 @@ class IGraphics; class ISound; class ITextRender; class IStorage; -class CUI; class CRenderTools; class CEditorComponent @@ -20,7 +21,10 @@ class CEditorComponent virtual ~CEditorComponent() = default; virtual void Init(CEditor *pEditor); - virtual void OnRender(); + + void OnUpdate(CUIRect View); + virtual void OnInput(); + virtual void OnRender(CUIRect View); CEditor *Editor(); IInput *Input(); diff --git a/src/game/editor/map_view.cpp b/src/game/editor/map_view.cpp index ee4be9521ef..6f9bed64770 100644 --- a/src/game/editor/map_view.cpp +++ b/src/game/editor/map_view.cpp @@ -19,7 +19,7 @@ void CMapView::ResetZoom() float CMapView::ScaleLength(float Value) { - return m_Zoom.GetValue() * Value; + return m_WorldZoom * Value; } void CMapView::ZoomMouseTarget(float ZoomFactor)