class IntegerSetting
Defined in:
The C4Configuration.h
IntegerSetting
class is used for an integer setting represented by a slider.
Definition
class IntegerSetting : public Setting
Member Functions
IntegerSetting::GetIntegerValue |
Returns the integer value stored in the setting. |
Constructor
IntegerSetting(Type identifier, const char *title, int32 value, int32 min, int32 max, int32 step,
const char *minLabel = nullptr, const char *maxLabel = nullptr);
Parameters
identifier |
The setting's unique identifier. |
title |
The title of the setting. |
value |
The initial value of the setting. |
min |
The minimum value allowed for the setting. |
max |
The maximum value allowed for the setting. |
step |
The smallest increment allowed between the minimum and maximum values. |
minLabel |
An optional label to display in place of the actual value when the setting's value is equal to the minimum value. |
maxLabel |
An optional label to display in place of the actual value when the setting's value is equal to the maximum value. |
Description
The IntegerSetting
class represents a setting that displays a slider and has an integer value restricted to a given range. A text box is also displayed, allowing the user to enter a value directly. The value of the setting is always equal to the minimum value specified by the min
parameter plus a multiple of the step
parameter, but is never greater than the maaximum value specified by the max
parameter. If the user enters a number in the text box, then it is rounded down to the nearest valid value.If either the
minLabel
or maxLabel
parameters is not nullptr
, then they specify strings that are displayed instead of the integer value of the setting whenever the setting's value is equal to the minimum or maximum allowable value.
Base Classes
Setting |
An IntegerSetting is a specific type of setting.
|