Settings

Since a larg portion of betrays functionality may come in the from of plugins, Plugins needs a way to comunicate with applications to expose settings. Betray therfor has a settings api where an a pplication can query the settings, build an interface for the user, and then let theuser modify the settings. Since a plugging may be added after the release of a betray apoplication, it is important that this API is supported correctly so that the application can manage even future plugins. Seduce has dedicated functionality.

betray_settings_count

uint betray_settings_count();

Description: Returns the number of settings available (This number will be static once betray_innit has been called)

betray_settings_type

BSettingType betray_settings_type(uint id);

Description: Returns the BSettingType of a specific setting

Types:

Enum:

BSettingType

BETRAY_ST_TRIGGER

Description: Creates a trigger event for a plugi. Useful for things like screen captiure.

BETRAY_ST_TOGGLE

Description: A simpla boolean to turn on or off functionality.

BETRAY_ST_SELECT

Description: A Selector where the application can chose form one of a number of named optrions.

BETRAY_ST_NUMBER_FLOAT

Description: A floating point value.

BETRAY_ST_NUMBER_INT

Description: A integer value.

BETRAY_ST_SLIDER

Description: A Floating point value ranging from zero to one.

BETRAY_ST_2D

Description: A two dimational value ranged form, minus one to plus one.

BETRAY_ST_3D

Description: A three dimational value ranged form, minus one to plus one.

BETRAY_ST_COLOR

Description: A Color

BETRAY_ST_4X4_MATRIX

Description: A 4x4 trnasfomration matrix

betray_settings_name

char *betray_settings_name(uint id);

Description: Rewturns the name of a specific setting

betray_settings_trigger

boolean betray_settings_trigger(uint id);

Description: Triggers a setting with the type BETRAY_ST_TOGGLE.

betray_settings_toggle_get

boolean betray_settings_toggle_get(uint id);

Description: Reads out the current state of a setting with the type BETRAY_ST_TOGGLE.

betray_settings_toggle_set

void betray_settings_toggle_set(uint id, boolean toggle);

Description: Sets the state of a setting with the type BETRAY_ST_TOGGLE.

betray_settings_select_get

uint betray_settings_select_get(uint id);

Description: Reads out the current state of a setting with the type BETRAY_ST_SELECT.

betray_settings_select_set

void betray_settings_select_set(uint id, uint select);

Description: Sets the state of a setting with the type BETRAY_ST_SELECT.

betray_settings_select_count_get

uint betray_settings_select_count_get(uint id);

Description: returns the number of options available for selection.

betray_settings_select_name_get

char *betray_settings_select_name_get(uint id, uint option);

Description: Returns the names of each individual option available.

betray_settings_number_float_get

float betray_settings_number_float_get(uint id);

Description: Reads out the current state of a setting with the type BETRAY_ST_NUMBER_FLOAT.

betray_settings_number_float_set

void betray_settings_number_float_set(uint id, float number);

Description: Sets the state of a setting with the type BETRAY_ST_NUMBER_FLOAT.

betray_settings_number_int_get

int betray_settings_number_int_get(uint id);

Description: Reads out the current state of a setting with the type BETRAY_ST_NUMBER_INT.

betray_settings_number_int_set

void betray_settings_number_int_set(uint id, int number);

Description: Sets the state of a setting with the type BETRAY_ST_NUMBER_INT.

betray_settings_slider_get

float betray_settings_slider_get(uint id);

Description: Reads out the current state of a setting with the type BETRAY_ST_SLIDER.

betray_settings_slider_set

void betray_settings_slider_set(uint id, float slider);

Description: Sets the state of a setting with the type BETRAY_ST_SLIDER.

betray_settings_2d_get

void betray_settings_2d_get(uint id, float *x, float *y);

Description: Reads out the current state of a setting with the type BETRAY_ST_2D.

betray_settings_2d_set

void betray_settings_2d_set(uint id, float x, float y);

Description: Sets the state of a setting with the type BETRAY_ST_2D.

betray_settings_3d_get

void betray_settings_3d_get(uint id, float *x, float *y, float *z);

Description: Reads out the current state of a setting with the type BETRAY_ST_3D.

betray_settings_3d_set

void betray_settings_3d_set(uint id, float x, float y, float z);

Description: Sets the state of a setting with the type BETRAY_ST_3D.

betray_settings_color_get

void betray_settings_color_get(uint id, float *red, float *green, float *blue);

Description: Reads out the current state of a setting with the type BETRAY_ST_COLOR.

betray_settings_color_set

void betray_settings_color_set(uint id, float red, float green, float blue);

Description: Sets the state of a setting with the type BETRAY_ST_COLOR.

betray_settings_4x4_matrix_get

void betray_settings_4x4_matrix_get(uint id, float *matrix);

Description: Reads out the current state of a setting with the type BETRAY_ST_4X4_MATRIX.

betray_settings_4x4_matrix_set

void betray_settings_4x4_matrix_set(uint id, float *matrix);

Description: Sets the state of a setting with the type BETRAY_ST_4X4_MATRIX.