DI-Guy SDK Documentation  13.6
diguyInteractionMachine Class Reference

diguyInteractionMachine objects give DI-Guy Scenario users a way of providing interactive, UI-driven input to a scenario that can change the way a scenario progresses. More...

#include <diguyInteractionMachine.h>

Public Types

enum  {
  UI_APPEARANCE_CONVERSATION = 0, UI_APPEARANCE_INFO, UI_APPEARANCE_NOTIFICATION, UI_APPEARANCE_3,
  UI_APPEARANCE_4, UI_APPEARANCE_COUNT
}
 This enumeration lists the indices used for various UI appearance calls. More...
 

Public Member Functions

const char * get_name ()
 Returns the name of the object. More...
 
int begin_interaction (const char *initial_state=NULL, const char *initial_input=NULL)
 This function begins the interaction. More...
 
int end_interaction ()
 This function ends the interaction. More...
 
int get_interaction_is_active ()
 Returns: 1 if interaction is active and visible, 0 if not. More...
 
void set_pause_scenario_while_active (int pause_while_active)
 This function sets whether the scenario is paused while the interaction is active. More...
 
int get_pause_scenario_while_active ()
 Returns: 1 if playback mode will be paused, 0 if not. More...
 
void reinitialize ()
 This function resets the interaction to a clean state. More...
 
void reset ()
 This function resets the interaction to a reset state. More...
 
void set_interaction_subject (diguyCharacter *interaction_subject)
 This function stores a pointer to the passed character in the interaction machine. More...
 
diguyCharacterget_interaction_subject ()
 Returns: value set by set_interaction_subject() More...
 
int update_ui ()
 This function updates the visible interaction UI in DI-Guy Scenario. More...
 
int set_initial_ui_appearance (int initial_ui_appearance)
 This function sets the UI appearance that will be used after a begin_interaction() or reset() call. More...
 
int get_initial_ui_appearance ()
 Returns: initial UI appearance as set by set_initial_ui_appearance() More...
 
int set_ui_appearance (int ui_appearance)
 This function sets the current UI appearance that should be used for the interaction. More...
 
int get_ui_appearance ()
 Returns: current UI appearance; default is value returned by get_initial_ui_appearance() More...
 
Heading Functions
void set_initial_heading (const char *initial_heading)
 This function sets the heading text that will be shown after after a begin_interaction() or reset() call. More...
 
const char * get_initial_heading ()
 Returns: initial heading text as set by set_initial_heading() More...
 
void set_heading (const char *heading)
 This function sets the current heading text that will be shown. More...
 
const char * get_heading ()
 Returns: current heading text as set by set_heading() More...
 
void set_heading_visible (int heading_visible)
 This function sets whether the heading will be visible. More...
 
int get_heading_visible ()
 Returns: whether heading is visible. More...
 
void set_heading_color_bg (int ui_appearance, float r, float g, float b, float a=1.0f)
 This function sets the background color of the heading. More...
 
void set_heading_color_fg (int ui_appearance, float r, float g, float b, float a=1.0f)
 This function sets the foreground/font color of the heading. More...
 
void set_heading_font (int ui_appearance, const char *font_family, int font_point_size, int font_is_bold=0, int font_is_italic=0)
 This function sets the font characteristics of the heading. More...
 
Info Functions
void set_initial_info (const char *initial_info)
 Similar to set_initial_heading(), but for info instead. More...
 
const char * get_initial_info ()
 Similar to get_initial_heading(), but for info instead. More...
 
void set_info (const char *info)
 Similar to set_heading(), but for info instead. More...
 
const char * get_info ()
 Similar to get_heading(), but for info instead. More...
 
void set_info_visible (int info_visible)
 Similar to set_heading_visible(), but for info instead. More...
 
int get_info_visible ()
 Similar to get_heading_visible(), but for info instead. More...
 
void set_info_color_bg (int ui_appearance, float r, float g, float b, float a=1.0f)
 Similar to get_heading_visible(), but for info instead. More...
 
void set_info_color_fg (int ui_appearance, float r, float g, float b, float a=1.0f)
 Similar to set_heading_color_fg(), but for info instead. More...
 
void set_info_font (int ui_appearance, const char *font_family, int font_point_size, int font_is_bold=0, int font_is_italic=0)
 Similar to set_heading_font(), but for info instead. More...
 
State Functions

States in an interaction machine represent the various states the machine can be in.

The current state is typically changed by the user selecting inputs via the UI, but can also be changed by calling set_current_state().

New interaction machines always have the required "begin" and "end" states.

int get_num_states ()
 Returns: number of states in the interaction machine. More...
 
const char * get_state_id_at_index (int index)
 Returns: string id of state with given index; the returned pointer will never be NULL. More...
 
void clear_states ()
 This function removes all existing states from the interaction machine. More...
 
int add_state (const char *state_id, const char *entry_script)
 This function adds a new state to the interaction machine. More...
 
int remove_state (const char *state_id)
 This function removes the specified state from the interaction machine. More...
 
int rename_state (const char *old_state_id, const char *new_state_id)
 This function renames the specified state. More...
 
int set_state_entry_script (const char *state_id, const char *entry_script)
 This function sets the entry script of this state. More...
 
int set_begin_state_entry_script (const char *entry_script)
 This function sets the entry script of the required "begin" state. More...
 
const char * get_current_state ()
 This function returns the current state the interaction machine is in. More...
 
void set_current_state (const char *new_current_state, int run_entry_script=1)
 This function sets the current state of the interaction machine. More...
 
Input Functions
void clear_inputs ()
 This function removes all inputs from the interaction machine. More...
 
int add_input (const char *input_id, const char *input_string, const char *resulting_state="", int int_param_0=0)
 This function adds a new input to the interaction machine. More...
 
int remove_input (const char *input_id)
 This function removes the specified input. More...
 
int get_num_inputs ()
 Returns: how many inputs there are. More...
 
const char * get_input_id (int index)
 Returns: input id of the input at the specified index; see add_input() More...
 
const char * get_input_string (const char *input_id)
 Returns: input string of the specified input; see add_input() More...
 
const char * get_input_resulting_state (const char *input_id)
 Returns: resulting state of the specified input; see add_input() More...
 
int get_input_int_param_0 (const char *input_id)
 Returns: integer parameter 0 of the specified input; see add_input() More...
 
int select_input (const char *input_id)
 This function "manually" selects the specified input. More...
 
const char * get_last_selected_input ()
 Returns: input id of the last selected input; state entry scripts can use this information to make decisions based on how the state was entered. More...
 
void set_last_input_variable (const char *last_input_variable)
 This function sets the name of the scenario-level variable in which the name of the last selected input will be recorded. More...
 
const char * get_last_input_variable ()
 Returns: name of last input variable; empty string ("") if there is none. More...
 
void set_inputs_visible (int visible)
 This function sets whether the inputs section of the UI will be visible. More...
 
int get_inputs_visible ()
 Returns: whether the inputs section of the UI will be visible. More...
 
void set_input_shortcuts_visible (int visible)
 This function sets whether a "shortcut" for each input will be visible in the UI, before the input text. More...
 
int get_input_shortcuts_visible ()
 Returns: whether the input shortcuts will be visible in the UI. More...
 
void set_inputs_font (int ui_appearance, const char *font_family, int font_point_size, int font_is_bold=0, int font_is_italic=0)
 Similar to set_heading_font(), but for inputs instead. More...
 
void set_inputs_color_bg (int ui_appearance, float r, float g, float b, float a=1.0f)
 Similar to set_heading_color_bg(), but for inputs instead. More...
 
void set_inputs_color_fg (int ui_appearance, float r, float g, float b, float a=1.0f)
 Similar to set_heading_color_fg(), but for inputs instead. More...
 
Deprecated Functions

The following functions are deprecated.

As these functions will disappear in a future version of DI-Guy.

int set_current_settings_index (int current_settings_index)
 
void set_input_response_script (const char *script)
 

Private Functions

The functions and variables past this point are for internal use only.

No external access to them is expected or necessary.

bdiScenarioInteractionMachinem_scripted_object
 A pointer to internal data. More...
 
class bdiScenarioInteractionMachine
 
bdiScenarioInteractionMachineget_scripted_object ()
 
 diguyInteractionMachine (bdiScenarioInteractionMachine *scripted_object)
 A private constructor. More...
 
virtual ~diguyInteractionMachine ()
 A private destructor. More...
 

Detailed Description

diguyInteractionMachine objects give DI-Guy Scenario users a way of providing interactive, UI-driven input to a scenario that can change the way a scenario progresses.

Interaction machines in DI-Guy Scenario are good for presenting users with simple yes-or-no questions, and also "dialog tree" type conversations with characters in a scenario.

It is called a "machine" because it is implemented as a straight-forward state machine. A state machine has some number of "states" it can be in. Each state responds to some number of inputs, which can advance the machine to a new state or end the interaction.

Graphically, interaction machines are represented as dialog boxes in DI-Guy Scenario. There are three areas to the dialog: the top, called the header, which provides a one-line title for the machine; the middle, which shows informational text of the current state; and the bottom, which presents the user with options they can click to proceed to a new state.

Example:

As an example, suppose that there is an interaction machine called "converse_with_victim". It has four states:

  • "begin_conversation"
  • "asked_about_injury"
  • "goodbye"
  • "angry_goodbye"

    This example doesn't describe all info and inputs that this machine needs, but does give an example of some of them.

    When the interaction starts the machine is in the state "begin_conversation". The user is presented with a dialog that has the header "Talking with victim". The info portion of the dialog is set to: "An accident victim is standing in front of you, looking disoriented." The inputs presented are:

1. "Are you injured?"

2. "I'm sorry, there are other people that need to be rescued."

 If the user selects input 1, the machine proceeds to the state
 "asked_about_injury", where new info is presented telling the user
 about any injuries the victim may have, and new inputs that present
 further questions the user can ask of the victim or actions the
 user can take.  (Note that not all inputs need to be conversation or
 questions; inputs can also describe actions that the user may take.)

 If the user selects input 2, the machine proceeds to the state
 "angry_goodbye", where new info tells that user that the victim
 is angry at being ignored.  There is one input, "Ok", that ends
 the interaction and closes the interaction machine.

Member Enumeration Documentation

anonymous enum

This enumeration lists the indices used for various UI appearance calls.

These indices should be used when calling:

Callable From:

  • C++
  • Script
Enumerator
UI_APPEARANCE_CONVERSATION 
UI_APPEARANCE_INFO 
UI_APPEARANCE_NOTIFICATION 
UI_APPEARANCE_3 
UI_APPEARANCE_4 
UI_APPEARANCE_COUNT 

Constructor & Destructor Documentation

diguyInteractionMachine::diguyInteractionMachine ( bdiScenarioInteractionMachine scripted_object)
private

A private constructor.

virtual diguyInteractionMachine::~diguyInteractionMachine ( )
privatevirtual

A private destructor.

Member Function Documentation

const char* diguyInteractionMachine::get_name ( )

Returns the name of the object.

This pointer will never be NULL.

Returns:

name of the object

Callable From:

  • C++
  • Script
int diguyInteractionMachine::begin_interaction ( const char *  initial_state = NULL,
const char *  initial_input = NULL 
)

This function begins the interaction.

The interaction UI will appear in DI-Guy Scenario.

The interaction can be ended by calling end_interaction(), or by the current state being changed to "end" through an input selection or a call to set_current_state().

Parameters
initial_stateinitial state that interaction will be in
initial_inputinitial input that will be returned by get_last_selected_input() in the first state

By default, initial state will be "begin". By default, initial input will be "begin".

Returns:

0 on success, -1 on failure

Callable From:

  • C++
  • Script
int diguyInteractionMachine::end_interaction ( )

This function ends the interaction.

The interaction UI will be hidden in DI-Guy Scenario.

Note that this call does not run the entry script of the "end" state. Call set_current_state("end") to end the interaction and run the entry script of the "end" state when doing so.

Returns:

0 on success, -1 on failure

Callable From:

  • C++
  • Script
int diguyInteractionMachine::get_interaction_is_active ( )

Returns: 1 if interaction is active and visible, 0 if not.

Callable From:

  • C++
  • Script
void diguyInteractionMachine::set_pause_scenario_while_active ( int  pause_while_active)

This function sets whether the scenario is paused while the interaction is active.

If the scenario is to be paused, the current playback mode will be saved when the interaction begins, the playback mode will be changed to DIGUY_SCENARIO_PLAYBACK_MODE_STOP, and the original playback mode will be restored when the interaction ends.

If the scenario is not to be paused, beginning and ending the interaction will have no effect on the playback mode.

The default is to not pause the scenario.

Parameters
pause_while_activepass 1 to pause scenario when interaction is active, 0 to not change playback mode

Callable From:

  • C++
  • Script
int diguyInteractionMachine::get_pause_scenario_while_active ( )

Returns: 1 if playback mode will be paused, 0 if not.

Callable From:

  • C++
  • Script
void diguyInteractionMachine::reinitialize ( )

This function resets the interaction to a clean state.

It will:

  • set the initial heading to ""
  • set the initial info text to ""
  • remove all inputs
  • reset ui appearances
  • set all other parameters to default values

    It will also do an implicit reset() call.

Callable From:

  • C++
  • Script
void diguyInteractionMachine::reset ( )

This function resets the interaction to a reset state.

It will:

  • set the UI appearance text to initial_ui_appearance
  • set the heading to be initial_heading
  • set the info text to initial_info
  • set the current state to "begin"

Callable From:

  • C++
  • Script
void diguyInteractionMachine::set_interaction_subject ( diguyCharacter interaction_subject)

This function stores a pointer to the passed character in the interaction machine.

Access to the character is then possible in state scripts by calling get_interaction_subject().

Parameters
interaction_subjectpointer to character that is to by the interaction's primary subject

Callable From:

  • C++
  • Script
diguyCharacter* diguyInteractionMachine::get_interaction_subject ( )

Returns: value set by set_interaction_subject()

Callable From:

  • C++
  • Script
int diguyInteractionMachine::update_ui ( )

This function updates the visible interaction UI in DI-Guy Scenario.

May calls that change visible settings of the UI will not take effect until this function is called.

Callable From:

  • C++
  • Script
int diguyInteractionMachine::set_initial_ui_appearance ( int  initial_ui_appearance)

This function sets the UI appearance that will be used after a begin_interaction() or reset() call.

The default is UI_APPEARANCE_CONVERSATION.

Parameters
initial_ui_appearanceinitial UI appearance

Callable From:

  • C++
  • Script
int diguyInteractionMachine::get_initial_ui_appearance ( )

Returns: initial UI appearance as set by set_initial_ui_appearance()

Callable From:

  • C++
  • Script
int diguyInteractionMachine::set_ui_appearance ( int  ui_appearance)

This function sets the current UI appearance that should be used for the interaction.

The new setting will not take effect until the next call to update_ui().

Call update_ui() for new setting to take effect.

Parameters
ui_appearancenew current UI appearance

Callable From:

  • C++
  • Script
int diguyInteractionMachine::get_ui_appearance ( )

Returns: current UI appearance; default is value returned by get_initial_ui_appearance()

Callable From:

  • C++
  • Script
void diguyInteractionMachine::set_initial_heading ( const char *  initial_heading)

This function sets the heading text that will be shown after after a begin_interaction() or reset() call.

The default is "", or show nothing.

Parameters
initial_headinginitial heading text

Callable From:

  • C++
  • Script
const char* diguyInteractionMachine::get_initial_heading ( )

Returns: initial heading text as set by set_initial_heading()

Callable From:

  • C++
  • Script
void diguyInteractionMachine::set_heading ( const char *  heading)

This function sets the current heading text that will be shown.

Call update_ui() for new setting to take effect.

Parameters
headingheading text to be shown

Callable From:

  • C++
  • Script
const char* diguyInteractionMachine::get_heading ( )

Returns: current heading text as set by set_heading()

Callable From:

  • C++
  • Script
void diguyInteractionMachine::set_heading_visible ( int  heading_visible)

This function sets whether the heading will be visible.

Call update_ui() for new setting to take effect.

Parameters
heading_visible1 for visible, 0 for invisible

Callable From:

  • C++
  • Script
int diguyInteractionMachine::get_heading_visible ( )

Returns: whether heading is visible.

Callable From:

  • C++
  • Script
void diguyInteractionMachine::set_heading_color_bg ( int  ui_appearance,
float  r,
float  g,
float  b,
float  a = 1.0f 
)

This function sets the background color of the heading.

Call update_ui() for new setting to take effect.

Parameters
ui_appearancewhich UI appearance this changes
r,g,b,aRGBA colors, from 0.0 to 1.0

Callable From:

  • C++
  • Script
void diguyInteractionMachine::set_heading_color_fg ( int  ui_appearance,
float  r,
float  g,
float  b,
float  a = 1.0f 
)

This function sets the foreground/font color of the heading.

Call update_ui() for new setting to take effect.

Parameters
ui_appearancewhich UI appearance this changes
r,g,b,aRGBA colors, from 0.0 to 1.0

Callable From:

  • C++
  • Script
void diguyInteractionMachine::set_heading_font ( int  ui_appearance,
const char *  font_family,
int  font_point_size,
int  font_is_bold = 0,
int  font_is_italic = 0 
)

This function sets the font characteristics of the heading.

Call update_ui() for new setting to take effect.

Parameters
ui_appearancewhich UI appearance this changes
font_familyfont family
font_point_sizepoint size of font
font_is_boldpass 1 for bold, 0 for normal
font_is_italicpass 1 for italic, 0 for normal

On Windows, the default font family is ""MS Shell Dlg", and the default point size is 10.

Callable From:

  • C++
  • Script
void diguyInteractionMachine::set_initial_info ( const char *  initial_info)

Similar to set_initial_heading(), but for info instead.

Note that the info text can use simple HTML-style tags. For example:

  • for a paragraph break:
  • for bold text: bold
  • for underlined text: <u>bold</u>
  • for italicized text: bold

The default is "", or show nothing.

const char* diguyInteractionMachine::get_initial_info ( )

Similar to get_initial_heading(), but for info instead.

void diguyInteractionMachine::set_info ( const char *  info)

Similar to set_heading(), but for info instead.

const char* diguyInteractionMachine::get_info ( )

Similar to get_heading(), but for info instead.

void diguyInteractionMachine::set_info_visible ( int  info_visible)

Similar to set_heading_visible(), but for info instead.

int diguyInteractionMachine::get_info_visible ( )

Similar to get_heading_visible(), but for info instead.

void diguyInteractionMachine::set_info_color_bg ( int  ui_appearance,
float  r,
float  g,
float  b,
float  a = 1.0f 
)

Similar to get_heading_visible(), but for info instead.

void diguyInteractionMachine::set_info_color_fg ( int  ui_appearance,
float  r,
float  g,
float  b,
float  a = 1.0f 
)

Similar to set_heading_color_fg(), but for info instead.

void diguyInteractionMachine::set_info_font ( int  ui_appearance,
const char *  font_family,
int  font_point_size,
int  font_is_bold = 0,
int  font_is_italic = 0 
)

Similar to set_heading_font(), but for info instead.

int diguyInteractionMachine::get_num_states ( )

Returns: number of states in the interaction machine.

Callable From:

  • C++
  • Script
const char* diguyInteractionMachine::get_state_id_at_index ( int  index)

Returns: string id of state with given index; the returned pointer will never be NULL.

Callable From:

  • C++
  • Script
void diguyInteractionMachine::clear_states ( )

This function removes all existing states from the interaction machine.

Default new states named "begin" and "end" are then automatically added. These default states do not have an entry script, but one can be added later with the set_state_entry_script() or set_begin_state_entry_script() functions.

More new states can be added using the add_state() function.

Callable From:

  • C++
  • Script
int diguyInteractionMachine::add_state ( const char *  state_id,
const char *  entry_script 
)

This function adds a new state to the interaction machine.

Each state must have a unique state_id (name of the state).

Parameters
state_idname of the new state
entry_scriptscript text that will be run every time this new state is entered

Returns:

0 on success, -1 on failure

Callable From:

  • C++
  • Script
int diguyInteractionMachine::remove_state ( const char *  state_id)

This function removes the specified state from the interaction machine.

The required "begin" and "end" states cannot be removed.

Parameters
state_idname of state to remove

Returns:

0 on success, -1 on failure

Callable From:

  • C++
  • Script
int diguyInteractionMachine::rename_state ( const char *  old_state_id,
const char *  new_state_id 
)

This function renames the specified state.

Each state must have a unique state_id (name of the state).

The required "begin" and "end" states cannot be renamed.

Parameters
old_state_idname of state to rename
new_state_idnew name of state

Returns:

0 on success, -1 on failure

Callable From:

  • C++
  • Script
int diguyInteractionMachine::set_state_entry_script ( const char *  state_id,
const char *  entry_script 
)

This function sets the entry script of this state.

Each time the specified state is entered, the entry script will be run.

Parameters
state_idname of state to modify
entry_scriptnew entry script

Returns:

0 on success, -1 on failure

Callable From:

  • C++
  • Script
int diguyInteractionMachine::set_begin_state_entry_script ( const char *  entry_script)

This function sets the entry script of the required "begin" state.

Parameters
entry_scriptnew entry script

Returns:

0 on success, -1 on failure

Callable From:

  • C++
  • Script
const char* diguyInteractionMachine::get_current_state ( )

This function returns the current state the interaction machine is in.

Returns:

name of current state; the returned should never be NULL

Callable From:

  • C++
  • Script
void diguyInteractionMachine::set_current_state ( const char *  new_current_state,
int  run_entry_script = 1 
)

This function sets the current state of the interaction machine.

The entry script of the new state will be run by default, but can optionally be skipped.

If the new state is "end", the interaction will end, as if the end_interaction() call is made, once the entry script of the "end" state entry script is run.

Parameters
new_current_statenew current state
run_entry_scriptpass 1 to run the new state's entry script, 0 to not

Returns:

0 on success, -1 on failure

Callable From:

  • C++
  • Script
void diguyInteractionMachine::clear_inputs ( )

This function removes all inputs from the interaction machine.

New inputs can be added by calling add_input().

Callable From:

  • C++
  • Script
int diguyInteractionMachine::add_input ( const char *  input_id,
const char *  input_string,
const char *  resulting_state = "",
int  int_param_0 = 0 
)

This function adds a new input to the interaction machine.

Each input must have a unique input_id (name of the input).

If the resulting state is "end", the interaction will end, as if the end_interaction() call is made, once the entry script of the "end" state entry script is run.

Parameters
input_idname of the new input
input_stringtext that will be shown in the UI
resulting_statestate id of the state the interaction machine will change to if this new input is selected
int_param_0an optional integer parameter that can be interpreted in the new state's entry script

Returns:

0 on success, -1 on failure

Callable From:

  • C++
  • Script
int diguyInteractionMachine::remove_input ( const char *  input_id)

This function removes the specified input.

Parameters
input_idname of input to rename

Returns:

0 on success, -1 on failure

Callable From:

  • C++
  • Script
int diguyInteractionMachine::get_num_inputs ( )

Returns: how many inputs there are.

Callable From:

  • C++
  • Script
const char* diguyInteractionMachine::get_input_id ( int  index)

Returns: input id of the input at the specified index; see add_input()

Callable From:

  • C++
  • Script
const char* diguyInteractionMachine::get_input_string ( const char *  input_id)

Returns: input string of the specified input; see add_input()

Callable From:

  • C++
  • Script
const char* diguyInteractionMachine::get_input_resulting_state ( const char *  input_id)

Returns: resulting state of the specified input; see add_input()

Callable From:

  • C++
  • Script
int diguyInteractionMachine::get_input_int_param_0 ( const char *  input_id)

Returns: integer parameter 0 of the specified input; see add_input()

Callable From:

  • C++
  • Script
int diguyInteractionMachine::select_input ( const char *  input_id)

This function "manually" selects the specified input.

Most of the time inputs are selected via the UI.

A side effect of selecting an input is almost always that the interaction machine will be put into a new state.

Parameters
input_idinput id of input that should be selected

The passed input id must be a current available input of the interaction machine.

Returns:

0 on success, -1 on failure

Callable From:

  • C++
  • Script
const char* diguyInteractionMachine::get_last_selected_input ( )

Returns: input id of the last selected input; state entry scripts can use this information to make decisions based on how the state was entered.

Callable From:

  • C++
  • Script
void diguyInteractionMachine::set_last_input_variable ( const char *  last_input_variable)

This function sets the name of the scenario-level variable in which the name of the last selected input will be recorded.

State entry scripts can then read determine which input caused the interaction machine to entry the state.

Parameters
last_input_variablename of scenario-level variable

Returns:

0 on success, -1 on failure

Callable From:

  • C++
  • Script
const char* diguyInteractionMachine::get_last_input_variable ( )

Returns: name of last input variable; empty string ("") if there is none.

Callable From:

  • C++
  • Script
void diguyInteractionMachine::set_inputs_visible ( int  visible)

This function sets whether the inputs section of the UI will be visible.

The inputs will be visible by default.

Parameters
visiblepass 1 to make inputs visible; 0 to not

Callable From:

  • C++
  • Script
int diguyInteractionMachine::get_inputs_visible ( )

Returns: whether the inputs section of the UI will be visible.

Callable From:

  • C++
  • Script
void diguyInteractionMachine::set_input_shortcuts_visible ( int  visible)

This function sets whether a "shortcut" for each input will be visible in the UI, before the input text.

Currently the shortcuts are limited to numbers; the first input will be prefixed by "1.", the second by "2.", etc.

Input shortcuts are visible by default.

Parameters
visiblepass 1 to make shortcuts visible; 0 to not

Callable From:

  • C++
  • Script
int diguyInteractionMachine::get_input_shortcuts_visible ( )

Returns: whether the input shortcuts will be visible in the UI.

Callable From:

  • C++
  • Script
void diguyInteractionMachine::set_inputs_font ( int  ui_appearance,
const char *  font_family,
int  font_point_size,
int  font_is_bold = 0,
int  font_is_italic = 0 
)

Similar to set_heading_font(), but for inputs instead.

void diguyInteractionMachine::set_inputs_color_bg ( int  ui_appearance,
float  r,
float  g,
float  b,
float  a = 1.0f 
)

Similar to set_heading_color_bg(), but for inputs instead.

void diguyInteractionMachine::set_inputs_color_fg ( int  ui_appearance,
float  r,
float  g,
float  b,
float  a = 1.0f 
)

Similar to set_heading_color_fg(), but for inputs instead.

int diguyInteractionMachine::set_current_settings_index ( int  current_settings_index)
void diguyInteractionMachine::set_input_response_script ( const char *  script)
bdiScenarioInteractionMachine* diguyInteractionMachine::get_scripted_object ( )
inline

Friends And Related Function Documentation

friend class bdiScenarioInteractionMachine
friend

Member Data Documentation

bdiScenarioInteractionMachine* diguyInteractionMachine::m_scripted_object
private

A pointer to internal data.


The documentation for this class was generated from the following file: