C4 Engine Terathon Software C4 Engine API Documentation

• Interface Manager

API Links
Developer Links

class FloatSetting

Defined in:  C4Configuration.h
The FloatSetting class is used for a floating-point setting represented by a slider.
Definition

class FloatSetting : public Setting

Member Functions
FloatSetting::GetFloatValue Returns the floating-point value stored in the setting.
Constructor

FloatSetting(Type identifier, float value, const char *title, float min, float max, float step);

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.
step The smallest increment allowed between the minimum and maximum values.
Description
The FloatSetting class represents a setting that displays a slider and has an floating-point 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 an integer 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 to the nearest valid value.
Base Classes
Setting A FloatSetting is a specific type of Setting.