From 92d58b8e0834df480b91d31d2558897a4e2a8b0e Mon Sep 17 00:00:00 2001 From: turanszkij Date: Mon, 14 Oct 2019 19:29:42 +0100 Subject: [PATCH] editor: selection outline fluctuation --- Editor/Editor.cpp | 3 +++ Editor/Editor.h | 1 + 2 files changed, 4 insertions(+) diff --git a/Editor/Editor.cpp b/Editor/Editor.cpp index a6f0887a4..be035a901 100644 --- a/Editor/Editor.cpp +++ b/Editor/Editor.cpp @@ -715,6 +715,8 @@ void EditorComponent::Update(float dt) animWnd->Update(); + selectionOutlineTimer += dt; + // Exit cinema mode: if (wiInputManager::down(VK_ESCAPE)) { @@ -1617,6 +1619,7 @@ void EditorComponent::Compose(CommandList cmd) const { wiImageParams fx; fx.enableFullScreen(); + fx.opacity = wiMath::Lerp(0.4f, 1.0f, std::sinf(selectionOutlineTimer * XM_2PI * 0.8f) * 0.5f + 0.5f);; wiImage::Draw(&rt_selectionOutline[1], fx, cmd); } diff --git a/Editor/Editor.h b/Editor/Editor.h index 916bf91f1..65d60a3f2 100644 --- a/Editor/Editor.h +++ b/Editor/Editor.h @@ -87,6 +87,7 @@ public: EDITORSTENCILREF_LAST = 0x0F, }; wiGraphics::Texture2D rt_selectionOutline[2]; + float selectionOutlineTimer = 0; Translator translator; std::list selected;