41 lines
735 B
C++
41 lines
735 B
C++
#include "intensity.h"
|
|
#include "config.h"
|
|
#include "state.h"
|
|
#include "display.h"
|
|
#include "buzzer.h"
|
|
|
|
|
|
const char* IntensityMenuItem::getTitle()
|
|
{
|
|
return UniqueString("Intensity");
|
|
}
|
|
|
|
|
|
const char* IntensityMenuItem::getValue()
|
|
{
|
|
return FormatPercentageFixedWidth(GetExposureIntensity());
|
|
}
|
|
|
|
|
|
bool IntensityMenuItem::canIncrement()
|
|
{
|
|
return GetExposureIntensity() < 100;
|
|
}
|
|
|
|
|
|
bool IntensityMenuItem::canDecrement()
|
|
{
|
|
return GetExposureIntensity() > IntensityStep;
|
|
}
|
|
|
|
|
|
void IntensityMenuItem::incrementValue()
|
|
{
|
|
SetExposureIntensity(GetExposureIntensity() + IntensityStep);
|
|
}
|
|
|
|
|
|
void IntensityMenuItem::decrementValue()
|
|
{
|
|
SetExposureIntensity(GetExposureIntensity() - IntensityStep);
|
|
} |