- slide: formatting code

This commit is contained in:
vanhofen
2022-11-23 23:54:02 +01:00
committed by Thilo Graf
parent eb1ef27dc5
commit 01bf9bb996
2 changed files with 12 additions and 13 deletions

View File

@@ -143,7 +143,7 @@ bool COSDSlider::SlideDone()
{
bool ret = false;
if (slideOut) // disappear
if (slideOut) // disappear
{
slideValue += STEPSIZE;
@@ -156,7 +156,7 @@ bool COSDSlider::SlideDone()
else
setValue(slideValue);
}
else // appears
else // appear
{
slideValue -= STEPSIZE;
@@ -171,8 +171,5 @@ bool COSDSlider::SlideDone()
setValue(slideValue);
}
return ret;
}

View File

@@ -27,14 +27,14 @@
class COSDSlider
{
private:
uint32_t slideTimer;
int slideValue;
bool slideIn;
bool slideOut;
int proc_put(const char *path, char *value, int len);
void setValue(int val);
int slideMax;
int slideMode;
uint32_t slideTimer;
int slideValue;
bool slideIn;
bool slideOut;
int proc_put(const char *path, char *value, int len);
void setValue(int val);
int slideMax;
int slideMode;
public:
COSDSlider(int percent = 100, int mode = BOTTOM2TOP);
@@ -46,6 +46,7 @@ class COSDSlider
bool SlideDone();
bool SlideInDone() { return !slideIn && !slideOut; };
uint32_t GetSlideTimer() { return slideTimer; };
enum
{
BEFORE_SLIDEIN = 1,
@@ -53,6 +54,7 @@ class COSDSlider
BEFORE_SLIDEOUT = 3,
AFTER_SLIDEOUT = 4
};
enum
{
MID2SIDE,