mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-16 12:49:59 +01:00
Add Recording incidation icon on main window
This commit is contained in:
@@ -17,9 +17,13 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
#include "OutputPreviewWindow.h"
|
||||||
|
#include "RenderView.h"
|
||||||
|
#include "RenderingManager.h"
|
||||||
#define PLOT_ARRAY_SIZE 180
|
#define PLOT_ARRAY_SIZE 180
|
||||||
#define WINDOW_TOOLBOX_ALPHA 0.35f
|
#define WINDOW_TOOLBOX_ALPHA 0.35f
|
||||||
#define WINDOW_TOOLBOX_DIST_TO_BORDER 10.f
|
#define WINDOW_TOOLBOX_DIST_TO_BORDER 10.f
|
||||||
|
#define RECORDER_INDICATION_SIZE 30.f
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
@@ -1035,6 +1039,14 @@ void UserInterface::Render()
|
|||||||
//
|
//
|
||||||
RenderPreview();
|
RenderPreview();
|
||||||
|
|
||||||
|
// render Recording indication overlay
|
||||||
|
if (isRecording()) {
|
||||||
|
ImGuiIO& io = ImGui::GetIO();
|
||||||
|
ImVec2 center = ImVec2(io.DisplaySize.x - RECORDER_INDICATION_SIZE * 1.5f, io.DisplaySize.y - RECORDER_INDICATION_SIZE * 1.5f);
|
||||||
|
int a = 150 + (int) ( 50.f * sin( (float) Runtime() / 100000000.f ));
|
||||||
|
ImGui::GetForegroundDrawList()->AddCircleFilled(center, RECORDER_INDICATION_SIZE, IM_COL32(255, 10, 10, a), 0);
|
||||||
|
}
|
||||||
|
|
||||||
// handle keyboard input after all IMGUI widgets have potentially captured keyboard
|
// handle keyboard input after all IMGUI widgets have potentially captured keyboard
|
||||||
handleKeyboard();
|
handleKeyboard();
|
||||||
|
|
||||||
|
|||||||
@@ -168,6 +168,7 @@ public:
|
|||||||
inline bool ctrlModifier() const { return ctrl_modifier_active; }
|
inline bool ctrlModifier() const { return ctrl_modifier_active; }
|
||||||
inline bool altModifier() const { return alt_modifier_active; }
|
inline bool altModifier() const { return alt_modifier_active; }
|
||||||
inline bool shiftModifier() const { return shift_modifier_active; }
|
inline bool shiftModifier() const { return shift_modifier_active; }
|
||||||
|
inline bool isRecording() const { return outputcontrol.isRecording(); }
|
||||||
|
|
||||||
void showPannel(int id = -1);
|
void showPannel(int id = -1);
|
||||||
void setSourceInPanel(int index);
|
void setSourceInPanel(int index);
|
||||||
|
|||||||
Reference in New Issue
Block a user