GUI parts for DISCO-F746NG. GuiBase, Button, ButtonGroup, Label, BlinkLabel, NumericLabel, SeekBar, SeekbarGroup
Dependents: F746_SD_GraphicEqualizer_ren0620
Fork of F746_GUI by
Revision 13:9ae055fac9cf, committed 2016-05-30
- Comitter:
- MikamiUitOpen
- Date:
- Mon May 30 14:34:44 2016 +0000
- Parent:
- 12:687ec6183385
- Commit message:
- 14
Changed in this revision
| SeekBar.hpp | Show annotated file Show diff for this revision Revisions of this file |
| SeekbarGroup.hpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/SeekBar.hpp Sat Apr 30 06:33:32 2016 +0000
+++ b/SeekBar.hpp Mon May 30 14:34:44 2016 +0000
@@ -1,7 +1,7 @@
//-----------------------------------------------------------
// SeekBar class -- Header
//
-// 2016/04/30, Copyright (c) 2016 MIKAMI, Naoki
+// 2016/05/30, Copyright (c) 2016 MIKAMI, Naoki
//-----------------------------------------------------------
#ifndef F746_SEEKBAR_HPP
@@ -67,8 +67,6 @@
void SetSlided(bool tf) { slided_ = tf; }
bool GetSlided() { return slided_; }
- int Round(float x) { return x + 0.5f - (x < 0); } // Round up on 5
-
private:
const uint16_t L_, W_;
const uint16_t SIZE_; // Size of thumb
@@ -82,6 +80,7 @@
bool slided_;
bool active_;
+ int Round(float x) { return x + 0.5f - (x < 0); }
Point ToPoint(float value);
float Saturate(float value);
@@ -91,3 +90,4 @@
};
}
#endif // F746_SEEKBAR_HPP
+
--- a/SeekbarGroup.hpp Sat Apr 30 06:33:32 2016 +0000
+++ b/SeekbarGroup.hpp Mon May 30 14:34:44 2016 +0000
@@ -1,7 +1,7 @@
//-----------------------------------------------------------
// SeekbarGroup class -- Header
//
-// 2016/04/30, Copyright (c) 2016 MIKAMI, Naoki
+// 2016/05/30, Copyright (c) 2016 MIKAMI, Naoki
//-----------------------------------------------------------
#ifndef F746_SEEKBAR_GROUP_HPP
@@ -28,7 +28,7 @@
bool Slide(int num) { return seekBars_[num]->Slide(); }
float GetValue(int num) { return seekBars_[num]->GetValue(); }
- int GetIntValue(int num) { return seekBars_[num]->Round(seekBars_[num]->GetIntValue()); }
+ int GetIntValue(int num) { return seekBars_[num]->GetIntValue(); }
// Get slided number
bool GetSlidedNumber(int &num);
