C4 Engine Terathon Software C4 Engine API Documentation

• Interface Manager

API Links
Developer Links

class PowerTwoSetting

Defined in:  C4Configuration.h
The PowerTwoSetting class is used for a power-of-two setting represented by a slider.
Definition

class PowerTwoSetting : public Setting

Member Functions
PowerTwoSetting::GetIntegerValue Returns the integer value stored in the setting.
Constructor

PowerTwoSetting(Type identifier, long value, const char *title, long min, long max);

Parameters
identifier The setting's unique identifier.
value The initial value of the setting.
title The title of the setting.
min The minimum value allowed for the setting.
max The maximum value allowed for the setting.
Description
The PowerTwoSetting class represents a setting that displays a slider and has an integer value restricted to a power of two within 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 a power of two between the minimum value specified by the min parameter and 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.
Base Classes
Setting A PowerTwoSetting is a specific type of Setting.