From 9f6edbd46f0bc07667333450297e6d4e760298c0 Mon Sep 17 00:00:00 2001
From: Nicolas Pope <nwpope@utu.fi>
Date: Fri, 28 Jun 2019 13:06:53 +0300
Subject: [PATCH] Add record button

---
 applications/gui/src/media_panel.cpp | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/applications/gui/src/media_panel.cpp b/applications/gui/src/media_panel.cpp
index 757259aef..83bad8511 100644
--- a/applications/gui/src/media_panel.cpp
+++ b/applications/gui/src/media_panel.cpp
@@ -35,6 +35,7 @@ MediaPanel::MediaPanel(ftl::gui::Screen *screen) : nanogui::Window(screen, ""),
 	mediatheme->mButtonGradientTopFocused = nanogui::Color(80,230);
 	mediatheme->mButtonGradientBotFocused = nanogui::Color(80,230);
 	mediatheme->mIconColor = nanogui::Color(255,255);
+    mediatheme->mTextColor = nanogui::Color(1.0f,1.0f,1.0f,1.0f);
 	mediatheme->mBorderDark = nanogui::Color(0,0);
 	mediatheme->mBorderMedium = nanogui::Color(0,0);
 	mediatheme->mBorderLight = nanogui::Color(0,0);
@@ -50,6 +51,15 @@ MediaPanel::MediaPanel(ftl::gui::Screen *screen) : nanogui::Window(screen, ""),
         if (cam) cam->showPoseWindow();
     });
 
+    button = new Button(this, "", ENTYPO_ICON_CONTROLLER_RECORD);
+    button->setFlags(Button::ToggleButton);
+    button->setChangeCallback([this,button](bool state) {
+        if (state) button->setTextColor(nanogui::Color(1.0f,0.1f,0.1f,1.0f));
+        else button->setTextColor(nanogui::Color(1.0f,1.0f,1.0f,1.0f));
+        //if (state) ... start
+        //else ... stop
+    });
+
 	button = new Button(this, "", ENTYPO_ICON_CONTROLLER_STOP);
     button->setCallback([this]() {
         screen_->setActiveCamera(nullptr);
-- 
GitLab