GUI parts for DISCO-F469I a fork of DISCO-F746NG. GuiBase, Button, ButtonGroup, ResetButton, Label, BlinkLabel, NumericLabel, SeekBar, SeekbarGroup

Dependents:   DISCO-F469NI_LCDTS_GUI_demo DISCO-F469NI_LCDTS_GUI_demo projekt_PSW_v1 DISCO-F469NI_LCDTS_GUI_demoaaaaaaaaaxxxx ... more

Fork of F746_GUI by 不韋 呂

Revision:
14:b977160de2f3
Parent:
3:fe6ff954824a
--- a/ButtonGroup.cpp	Mon May 30 14:34:44 2016 +0000
+++ b/ButtonGroup.cpp	Sun Jul 03 02:07:07 2016 +0000
@@ -1,7 +1,7 @@
 //-----------------------------------------------------------
 //  ButtonGroup class
 //
-//  2016/04/07, Copyright (c) 2016 MIKAMI, Naoki
+//  2016/07/03, Copyright (c) 2016 MIKAMI, Naoki
 //-----------------------------------------------------------
 
 #include "ButtonGroup.hpp"
@@ -22,7 +22,7 @@
         : GuiBase(x0, y0, fonts, textColor, backColor,
                   createdColor, touchedColor,
                   inactiveColor, inactiveTextColor),
-          numberOfButtons_(number), prevNum_(touched)
+          number_(number), prevNum_(touched)
     {
         buttons_ = new Button *[number];
         for (int n=0; n<number; n++)
@@ -43,8 +43,8 @@
     // Destructor
     ButtonGroup::~ButtonGroup()
     {
-        for (int n=0; n<numberOfButtons_; n++) delete buttons_[n];
-        delete[] *buttons_;   
+        for (int n=0; n<number_; n++) delete buttons_[n];
+        delete[] buttons_;   
     }
 
     // Draw button
@@ -87,7 +87,7 @@
         bool rtn = false;
         if (PanelTouched())
         {
-            for (int n=0; n<numberOfButtons_; n++)
+            for (int n=0; n<number_; n++)
                 if (buttons_[n]->IsOnButton() &&
                     buttons_[n]->IsActive())
                 {
@@ -107,7 +107,7 @@
         return true;
     }
 
-    // Activate and inactivate
+    // Activate and inactivate button(s)
     bool ButtonGroup::Activate(int num)
     {
         if (!Range(num)) return false;