DI-Guy SDK Documentation  13.2
diguyInteractionMachine.h
Go to the documentation of this file.
1 
2 /*********************************************************************
3  ** Copyright (c) 1992-2016 VT MAK
4  ** All rights reserved.
5  *********************************************************************/
6 
7 
8 #ifndef __diguyInteractionMachine_H
9 #define __diguyInteractionMachine_H
10 
11 
12 #ifdef SWIG
14 #else
15 #define CPLUSPLUS_ONLY
16 #endif
17 
18 #ifdef CPLUSPLUS_ONLY
19 class bdiScenarioInteractionMachine;
20 class diguyCharacter;
21 #endif
22 
23 
24 #include <declspec_diguy.h>
25 
26 /*********************************************************************/
85 class BDI_DECLSPEC_diguy diguyInteractionMachine
86 {
87 
88 public:
89 
90 /*****************************************************************************
91  **
92  *2 General Functions
93  **
94  */
95 
96  /*l
97  *b Description:
98  **
99  ** Returns the name of the object. This pointer will
100  ** never be NULL.
101  **
102  *b Returns:
103  **
104  ** name of the object
105  **
106  *b Callable From:
107  **
108  *- - C++
109  *- - Script
110  */
111  const char* get_name();
112 
113  /*l
114  *b Description:
115  **
116  ** This function begins the interaction.
117  **
118  ** The interaction UI will appear in DI-Guy Scenario.
119  **
120  ** The interaction can be ended by calling end_interaction(), or by
121  ** the current state being changed to "end" through an input
122  ** selection or a call to set_current_state().
123  **
124  *b Arguments:
125  **
126  *a initial_state - initial state that interaction will
127  *a be in
128  *a initial_input - initial input that will be returned
129  *a by get_last_selected_input() in the
130  *a first state
131  **
132  ** By default, initial state will be "begin".
133  ** By default, initial input will be "begin".
134  **
135  *b Returns:
136  **
137  ** 0 on success, -1 on failure
138  **
139  *b Callable From:
140  **
141  *- - C++
142  *- - Script
143  */
144  int begin_interaction(const char* initial_state = NULL,
145  const char* initial_input = NULL);
146 
147  /*l
148  *b Description:
149  **
150  ** This function ends the interaction.
151  **
152  ** The interaction UI will be hidden in DI-Guy Scenario.
153  **
154  ** Note that this call does not run the entry script of the "end"
155  ** state. Call set_current_state("end") to end the interaction
156  ** and run the entry script of the "end" state when doing so.
157  **
158  *b Returns:
159  **
160  ** 0 on success, -1 on failure
161  **
162  *b Callable From:
163  **
164  *- - C++
165  *- - Script
166  */
167  int end_interaction();
168 
169  /*l
170  *b Returns:
171  **
172  ** 1 if interaction is active and visible, 0 if not
173  **
174  *b Callable From:
175  **
176  *- - C++
177  *- - Script
178  */
179  int get_interaction_is_active();
180 
181  /*l
182  *b Description:
183  **
184  ** This function sets whether the scenario is paused while the
185  ** interaction is active.
186  **
187  ** If the scenario is to be paused, the current playback mode
188  ** will be saved when the interaction begins, the playback
189  ** mode will be changed to DIGUY_SCENARIO_PLAYBACK_MODE_STOP,
190  ** and the original playback mode will be restored when the
191  ** interaction ends.
192  **
193  ** If the scenario is not to be paused, beginning and ending
194  ** the interaction will have no effect on the playback mode.
195  **
196  ** The default is to not pause the scenario.
197  **
198  *b Arguments:
199  **
200  *a pause_while_active - pass 1 to pause scenario when interaction
201  *a is active, 0 to not change playback mode
202  **
203  *b Callable From:
204  **
205  *- - C++
206  *- - Script
207  */
208  void set_pause_scenario_while_active(int pause_while_active);
209 
210  /*l
211  *b Returns:
212  **
213  ** 1 if playback mode will be paused, 0 if not
214  **
215  *b Callable From:
216  **
217  *- - C++
218  *- - Script
219  */
220  int get_pause_scenario_while_active();
221 
222  /*l
223  *b Description:
224  **
225  ** This function resets the interaction to a clean state.
226  ** It will:
227  **
228  *- - set the initial heading to ""
229  *- - set the initial info text to ""
230  *- - remove all inputs
231  *- - reset ui appearances
232  *- - set all other parameters to default values
233  *-
234  *- It will also do an implicit reset() call.
235  **
236  *b Callable From:
237  **
238  *- - C++
239  *- - Script
240  */
241  void reinitialize();
242 
243  /*l
244  *b Description:
245  **
246  ** This function resets the interaction to a reset state.
247  ** It will:
248  **
249  *- - set the UI appearance text to initial_ui_appearance
250  *- - set the heading to be initial_heading
251  *- - set the info text to initial_info
252  *- - set the current state to "begin"
253  **
254  *b Callable From:
255  **
256  *- - C++
257  *- - Script
258  */
259  void reset();
260 
261  /*l
262  *b Description:
263  **
264  ** This function stores a pointer to the passed character
265  ** in the interaction machine. Access to the character is
266  ** then possible in state scripts by calling
267  ** get_interaction_subject().
268  **
269  *b Arguments:
270  **
271  *a interaction_subject - pointer to character that is to
272  *a by the interaction's primary subject
273  **
274  *b Callable From:
275  **
276  *- - C++
277  *- - Script
278  */
279  void set_interaction_subject(diguyCharacter* interaction_subject);
280 
281  /*l
282  *b Returns:
283  **
284  ** value set by set_interaction_subject()
285  **
286  *b Callable From:
287  **
288  *- - C++
289  *- - Script
290  */
291  diguyCharacter* get_interaction_subject();
292 
293 
294 /*****************************************************************************
295  **
296  *2 UI Functions
297  **
298  */
299 
300  /*l
301  *b Description:
302  **
303  ** This function updates the visible interaction UI in
304  ** DI-Guy Scenario. May calls that change visible settings of
305  ** the UI will not take effect until this function is called.
306  **
307  *b Callable From:
308  **
309  *- - C++
310  *- - Script
311  */
312  int update_ui();
313 
314  /*l
315  *b Description:
316  **
317  ** This enumeration lists the indices used for
318  ** various UI appearance calls. These indices should
319  ** be used when calling:
320  **
321  *- - set_initial_ui_appearance()
322  *- - set_ui_appearance()
323  *- - set_heading_color_bg()
324  *- - set_heading_color_fg()
325  *- - set_heading_font()
326  **
327  ** and equivalent functions for info and inputs.
328  **
329  ** Each UI appearance can have different colors and font
330  ** settings, potentially giving the scenario user a
331  ** visual cue that the interaction is showing a conversation,
332  ** showing generation information, or providing an important
333  ** notification,
334  **
335  *b Callable From:
336  **
337  *- - C++
338  *- - Script
339  */
340  enum {
341  UI_APPEARANCE_CONVERSATION = 0,
342  UI_APPEARANCE_INFO,
343  UI_APPEARANCE_NOTIFICATION,
344  UI_APPEARANCE_3,
345  UI_APPEARANCE_4,
346 
347  UI_APPEARANCE_COUNT
348  };
349 
350  /*l
351  *b Description:
352  **
353  ** This function sets the UI appearance that will be used
354  ** after a begin_interaction() or reset() call.
355  **
356  ** The default is UI_APPEARANCE_CONVERSATION.
357  **
358  *b Arguments:
359  **
360  *a initial_ui_appearance - initial UI appearance
361  **
362  *b Callable From:
363  **
364  *- - C++
365  *- - Script
366  */
367  int set_initial_ui_appearance(int initial_ui_appearance);
368 
369  /*l
370  *b Returns:
371  **
372  ** initial UI appearance as set by set_initial_ui_appearance()
373  **
374  *b Callable From:
375  **
376  *- - C++
377  *- - Script
378  */
379  int get_initial_ui_appearance();
380 
381  /*l
382  *b Description:
383  **
384  ** This function sets the current UI appearance that should be
385  ** used for the interaction.
386  **
387  ** The new setting will not take effect until the next call
388  ** to update_ui().
389  **
390  ** Call update_ui() for new setting to take effect.
391  **
392  *b Arguments:
393  **
394  *a ui_appearance - new current UI appearance
395  **
396  *b Callable From:
397  **
398  *- - C++
399  *- - Script
400  */
401  int set_ui_appearance(int ui_appearance);
402 
403  /*l
404  *b Returns:
405  **
406  ** current UI appearance; default is value returned by
407  ** get_initial_ui_appearance()
408  **
409  *b Callable From:
410  **
411  *- - C++
412  *- - Script
413  */
414  int get_ui_appearance();
415 
416 
417 /*****************************************************************************/
423  /*l
424  *b Description:
425  **
426  ** This function sets the heading text that will be shown after
427  ** after a begin_interaction() or reset() call.
428  **
429  ** The default is "", or show nothing.
430  **
431  *b Arguments:
432  **
433  *a initial_heading - initial heading text
434  **
435  *b Callable From:
436  **
437  *- - C++
438  *- - Script
439  */
440  void set_initial_heading(const char* initial_heading);
441 
442  /*l
443  *b Returns:
444  **
445  ** initial heading text as set by set_initial_heading()
446  **
447  *b Callable From:
448  **
449  *- - C++
450  *- - Script
451  */
452  const char* get_initial_heading();
453 
454  /*l
455  *b Description:
456  **
457  ** This function sets the current heading text that will be
458  ** shown.
459  **
460  ** Call update_ui() for new setting to take effect.
461  **
462  *b Arguments:
463  **
464  *a heading - heading text to be shown
465  **
466  *b Callable From:
467  **
468  *- - C++
469  *- - Script
470  */
471  void set_heading(const char* heading);
472 
473  /*l
474  *b Returns:
475  **
476  ** current heading text as set by set_heading()
477  **
478  *b Callable From:
479  **
480  *- - C++
481  *- - Script
482  */
483  const char* get_heading();
484 
485  /*l
486  *b Description:
487  **
488  ** This function sets whether the heading will be visible.
489  **
490  ** Call update_ui() for new setting to take effect.
491  **
492  *b Arguments:
493  **
494  *a heading_visible - 1 for visible, 0 for invisible
495  **
496  *b Callable From:
497  **
498  *- - C++
499  *- - Script
500  */
501  void set_heading_visible(int heading_visible);
502 
503  /*l
504  *b Returns:
505  **
506  ** whether heading is visible
507  **
508  *b Callable From:
509  **
510  *- - C++
511  *- - Script
512  */
513  int get_heading_visible();
514 
515  /*l
516  *b Description:
517  **
518  ** This function sets the background color of the heading.
519  **
520  ** Call update_ui() for new setting to take effect.
521  **
522  *b Arguments:
523  **
524  *a ui_appearance - which UI appearance this changes
525  *a r, g, b, a - RGBA colors, from 0.0 to 1.0
526  **
527  *b Callable From:
528  **
529  *- - C++
530  *- - Script
531  */
532  void set_heading_color_bg(int ui_appearance,
533  float r,
534  float g,
535  float b,
536  float a = 1.0f);
537 
538  /*l
539  *b Description:
540  **
541  ** This function sets the foreground/font color of the heading.
542  **
543  ** Call update_ui() for new setting to take effect.
544  **
545  *b Arguments:
546  **
547  *a ui_appearance - which UI appearance this changes
548  *a r, g, b, a - RGBA colors, from 0.0 to 1.0
549  **
550  *b Callable From:
551  **
552  *- - C++
553  *- - Script
554  */
555  void set_heading_color_fg(int ui_appearance,
556  float r,
557  float g,
558  float b,
559  float a = 1.0f);
560 
561  /*l
562  *b Description:
563  **
564  ** This function sets the font characteristics of the heading.
565  **
566  ** Call update_ui() for new setting to take effect.
567  **
568  *b Arguments:
569  **
570  *a ui_appearance - which UI appearance this changes
571  *a font_family - font family
572  *a font_point_size - point size of font
573  *a font_is_bold - pass 1 for bold, 0 for normal
574  *a font_is_italic - pass 1 for italic, 0 for normal
575  **
576  ** On Windows, the default font family is ""MS Shell Dlg",
577  ** and the default point size is 10.
578  **
579  *b Callable From:
580  **
581  *- - C++
582  *- - Script
583  */
584  void set_heading_font(int ui_appearance,
585  const char* font_family,
586  int font_point_size,
587  int font_is_bold = 0,
588  int font_is_italic = 0);
589 
590 
591 /*****************************************************************************/
597  /*l
598  *b Description:
599  **
600  ** Similar to set_initial_heading(), but for info instead.
601  **
602  ** Note that the info text can use simple HTML-style tags. For
603  ** example:
604  *>
605  *- - for a paragraph break: <p>
606  *- - for bold text: <b>bold</b>
607  *- - for underlined text: <u>bold</u>
608  *- - for italicized text: <i>bold</i>
609  *<
610  **
611  ** The default is "", or show nothing.
612  */
613  void set_initial_info(const char* initial_info);
614 
615  /*l
616  *b Description:
617  **
618  ** Similar to get_initial_heading(), but for info instead.
619  */
620  const char* get_initial_info();
621 
622  /*l
623  *b Description:
624  **
625  ** Similar to set_heading(), but for info instead.
626  */
627  void set_info(const char* info);
628 
629  /*l
630  *b Description:
631  **
632  ** Similar to get_heading(), but for info instead.
633  */
634  const char* get_info();
635 
636  /*l
637  *b Description:
638  **
639  ** Similar to set_heading_visible(), but for info instead.
640  */
641  void set_info_visible(int info_visible);
642 
643  /*l
644  *b Description:
645  **
646  ** Similar to get_heading_visible(), but for info instead.
647  */
648  int get_info_visible();
649 
650  /*l
651  *b Description:
652  **
653  ** Similar to get_heading_visible(), but for info instead.
654  */
655  void set_info_color_bg(int ui_appearance,
656  float r,
657  float g,
658  float b,
659  float a = 1.0f);
660 
661  /*l
662  *b Description:
663  **
664  ** Similar to set_heading_color_fg(), but for info instead.
665  */
666  void set_info_color_fg(int ui_appearance,
667  float r,
668  float g,
669  float b,
670  float a = 1.0f);
671 
672  /*l
673  *b Description:
674  **
675  ** Similar to set_heading_font(), but for info instead.
676  */
677  void set_info_font(int ui_appearance,
678  const char* font_family,
679  int font_point_size,
680  int font_is_bold = 0,
681  int font_is_italic = 0);
682 
683 
684 /*****************************************************************************/
698  /*l
699  *b Returns:
700  **
701  ** number of states in the interaction machine
702  **
703  *b Callable From:
704  **
705  *- - C++
706  *- - Script
707  */
708  int get_num_states();
709 
710  /*l
711  *b Returns:
712  **
713  ** string id of state with given index; the returned pointer will
714  ** never be NULL
715  **
716  *b Callable From:
717  **
718  *- - C++
719  *- - Script
720  */
721  const char* get_state_id_at_index(int index);
722 
723  /*l
724  *b Description:
725  **
726  ** This function removes all existing states from the interaction
727  ** machine.
728  **
729  ** Default new states named "begin" and "end" are then automatically
730  ** added. These default states do not have an entry script, but one
731  ** can be added later with the set_state_entry_script() or
732  ** set_begin_state_entry_script() functions.
733  **
734  ** More new states can be added using the add_state() function.
735  **
736  *b Callable From:
737  **
738  *- - C++
739  *- - Script
740  */
741  void clear_states();
742 
743  /*l
744  *b Description:
745  **
746  ** This function adds a new state to the interaction machine. Each
747  ** state must have a unique state_id (name of the state).
748  **
749  *b Arguments:
750  **
751  *a state_id - name of the new state
752  *a entry_script - script text that will be run every time this
753  *a new state is entered
754  **
755  *b Returns:
756  **
757  ** 0 on success, -1 on failure
758  **
759  *b Callable From:
760  **
761  *- - C++
762  *- - Script
763  */
764  int add_state(const char* state_id,
765  const char* entry_script);
766 
767  /*l
768  *b Description:
769  **
770  ** This function removes the specified state from the interaction
771  ** machine.
772  **
773  ** The required "begin" and "end" states cannot be removed.
774  **
775  *b Arguments:
776  **
777  *a state_id - name of state to remove
778  **
779  *b Returns:
780  **
781  ** 0 on success, -1 on failure
782  **
783  *b Callable From:
784  **
785  *- - C++
786  *- - Script
787  */
788  int remove_state(const char* state_id);
789 
790  /*l
791  *b Description:
792  **
793  ** This function renames the specified state. Each state must
794  ** have a unique state_id (name of the state).
795  **
796  ** The required "begin" and "end" states cannot be renamed.
797  **
798  *b Arguments:
799  **
800  *a old_state_id - name of state to rename
801  *a new_state_id - new name of state
802  **
803  *b Returns:
804  **
805  ** 0 on success, -1 on failure
806  **
807  *b Callable From:
808  **
809  *- - C++
810  *- - Script
811  */
812  int rename_state(const char* old_state_id, const char* new_state_id);
813 
814  /*l
815  *b Description:
816  **
817  ** This function sets the entry script of this state. Each time
818  ** the specified state is entered, the entry script will be run.
819  **
820  *b Arguments:
821  **
822  *a state_id - name of state to modify
823  *a entry_script - new entry script
824  **
825  *b Returns:
826  **
827  ** 0 on success, -1 on failure
828  **
829  *b Callable From:
830  **
831  *- - C++
832  *- - Script
833  */
834  int set_state_entry_script(const char* state_id,
835  const char* entry_script);
836 
837  /*l
838  *b Description:
839  **
840  ** This function sets the entry script of the required "begin"
841  ** state.
842  **
843  *b Arguments:
844  **
845  *a entry_script - new entry script
846  **
847  *b Returns:
848  **
849  ** 0 on success, -1 on failure
850  **
851  *b Callable From:
852  **
853  *- - C++
854  *- - Script
855  */
856  int set_begin_state_entry_script(const char* entry_script);
857 
858  /*l
859  *b Description:
860  **
861  ** This function returns the current state the interaction machine
862  ** is in.
863  **
864  *b Returns:
865  **
866  ** name of current state; the returned should never be NULL
867  **
868  *b Callable From:
869  **
870  *- - C++
871  *- - Script
872  */
873  const char* get_current_state();
874 
875  /*l
876  *b Description:
877  **
878  ** This function sets the current state of the interaction machine.
879  ** The entry script of the new state will be run by default, but
880  ** can optionally be skipped.
881  **
882  ** If the new state is "end", the interaction will end, as
883  ** if the end_interaction() call is made, once the entry script of
884  ** the "end" state entry script is run.
885  **
886  *b Arguments:
887  **
888  *a new_current_state - new current state
889  *a run_entry_script - pass 1 to run the new state's entry script,
890  *a 0 to not
891  **
892  *b Returns:
893  **
894  ** 0 on success, -1 on failure
895  **
896  *b Callable From:
897  **
898  *- - C++
899  *- - Script
900  */
901  void set_current_state(const char* new_current_state,
902  int run_entry_script = 1);
903 
904 
905 /*****************************************************************************/
911  /*l
912  *b Description:
913  **
914  ** This function removes all inputs from the interaction machine.
915  ** New inputs can be added by calling add_input().
916  **
917  *b Callable From:
918  **
919  *- - C++
920  *- - Script
921  */
922  void clear_inputs();
923 
924  /*l
925  *b Description:
926  **
927  ** This function adds a new input to the interaction machine. Each
928  ** input must have a unique input_id (name of the input).
929  **
930  ** If the resulting state is "end", the interaction will end, as
931  ** if the end_interaction() call is made, once the entry script of
932  ** the "end" state entry script is run.
933  **
934  *b Arguments:
935  **
936  *a input_id - name of the new input
937  *a input_string - text that will be shown in the UI
938  *a resulting_state - state id of the state the interaction machine
939  *a will change to if this new input is selected
940  *a int_param_0 - an optional integer parameter that can be
941  *a interpreted in the new state's entry script
942  **
943  *b Returns:
944  **
945  ** 0 on success, -1 on failure
946  **
947  *b Callable From:
948  **
949  *- - C++
950  *- - Script
951  */
952  int add_input(const char* input_id,
953  const char* input_string,
954  const char* resulting_state = "",
955  int int_param_0 = 0);
956 
957  /*l
958  *b Description:
959  **
960  ** This function removes the specified input.
961  **
962  *b Arguments:
963  **
964  *a input_id - name of input to rename
965  **
966  *b Returns:
967  **
968  ** 0 on success, -1 on failure
969  **
970  *b Callable From:
971  **
972  *- - C++
973  *- - Script
974  */
975  int remove_input(const char* input_id);
976 
977  /*l
978  *b Returns:
979  **
980  ** how many inputs there are
981  **
982  *b Callable From:
983  **
984  *- - C++
985  *- - Script
986  */
987  int get_num_inputs();
988 
989  /*l
990  *b Returns:
991  **
992  ** input id of the input at the specified index; see
993  ** add_input()
994  **
995  *b Callable From:
996  **
997  *- - C++
998  *- - Script
999  */
1000  const char* get_input_id(int index);
1001 
1002  /*l
1003  *b Returns:
1004  **
1005  ** input string of the specified input; see add_input()
1006  **
1007  *b Callable From:
1008  **
1009  *- - C++
1010  *- - Script
1011  */
1012  const char* get_input_string(const char* input_id);
1013 
1014  /*l
1015  *b Returns:
1016  **
1017  ** resulting state of the specified input; see add_input()
1018  **
1019  *b Callable From:
1020  **
1021  *- - C++
1022  *- - Script
1023  */
1024  const char* get_input_resulting_state(const char* input_id);
1025 
1026  /*l
1027  *b Returns:
1028  **
1029  ** integer parameter 0 of the specified input; see add_input()
1030  **
1031  *b Callable From:
1032  **
1033  *- - C++
1034  *- - Script
1035  */
1036  int get_input_int_param_0(const char* input_id);
1037 
1038  /*l
1039  *b Description:
1040  **
1041  ** This function "manually" selects the specified input. Most of
1042  ** the time inputs are selected via the UI.
1043  **
1044  ** A side effect of selecting an input is almost always that the
1045  ** interaction machine will be put into a new state.
1046  **
1047  *b Arguments:
1048  **
1049  *a input_id - input id of input that should be selected
1050  **
1051  ** The passed input id must be a current available input of the
1052  ** interaction machine.
1053  **
1054  *b Returns:
1055  **
1056  ** 0 on success, -1 on failure
1057  **
1058  *b Callable From:
1059  **
1060  *- - C++
1061  *- - Script
1062  */
1063  int select_input(const char* input_id);
1064 
1065  /*l
1066  *b Returns:
1067  **
1068  ** input id of the last selected input; state entry scripts can
1069  ** use this information to make decisions based on how the state
1070  ** was entered
1071  **
1072  *b Callable From:
1073  **
1074  *- - C++
1075  *- - Script
1076  */
1077  const char* get_last_selected_input();
1078 
1079  /*l
1080  *b Description:
1081  **
1082  ** This function sets the name of the scenario-level variable in
1083  ** which the name of the last selected input will be recorded.
1084  ** State entry scripts can then read determine which input
1085  ** caused the interaction machine to entry the state.
1086  **
1087  *b Arguments:
1088  **
1089  *a last_input_variable - name of scenario-level variable
1090  **
1091  *b Returns:
1092  **
1093  ** 0 on success, -1 on failure
1094  **
1095  *b Callable From:
1096  **
1097  *- - C++
1098  *- - Script
1099  */
1100  void set_last_input_variable(const char* last_input_variable);
1101 
1102  /*l
1103  *b Returns:
1104  **
1105  ** name of last input variable; empty string ("") if there is
1106  ** none
1107  **
1108  *b Callable From:
1109  **
1110  *- - C++
1111  *- - Script
1112  */
1113  const char* get_last_input_variable();
1114 
1115  /*l
1116  *b Description:
1117  **
1118  ** This function sets whether the inputs section of the UI will
1119  ** be visible. The inputs will be visible by default.
1120  **
1121  *b Arguments:
1122  **
1123  *a visible - pass 1 to make inputs visible; 0 to not
1124  **
1125  *b Callable From:
1126  **
1127  *- - C++
1128  *- - Script
1129  */
1130  void set_inputs_visible(int visible);
1131 
1132  /*l
1133  *b Returns:
1134  **
1135  ** whether the inputs section of the UI will be visible
1136  **
1137  *b Callable From:
1138  **
1139  *- - C++
1140  *- - Script
1141  */
1142  int get_inputs_visible();
1143 
1144  /*l
1145  *b Description:
1146  **
1147  ** This function sets whether a "shortcut" for each input will be
1148  ** visible in the UI, before the input text.
1149  **
1150  ** Currently the shortcuts are limited to numbers; the first input
1151  ** will be prefixed by "1.", the second by "2.", etc.
1152  **
1153  ** Input shortcuts are visible by default.
1154  **
1155  *b Arguments:
1156  **
1157  *a visible - pass 1 to make shortcuts visible; 0 to not
1158  **
1159  *b Callable From:
1160  **
1161  *- - C++
1162  *- - Script
1163  */
1164  void set_input_shortcuts_visible(int visible);
1165 
1166  /*l
1167  *b Returns:
1168  **
1169  ** whether the input shortcuts will be visible in the UI
1170  **
1171  *b Callable From:
1172  **
1173  *- - C++
1174  *- - Script
1175  */
1176  int get_input_shortcuts_visible();
1177 
1178  /*l
1179  *b Description:
1180  **
1181  ** Similar to set_heading_font(), but for inputs instead.
1182  */
1183  void set_inputs_font(int ui_appearance,
1184  const char* font_family,
1185  int font_point_size,
1186  int font_is_bold = 0,
1187  int font_is_italic = 0);
1188 
1189  /*l
1190  *b Description:
1191  **
1192  ** Similar to set_heading_color_bg(), but for inputs instead.
1193  */
1194  void set_inputs_color_bg(int ui_appearance,
1195  float r,
1196  float g,
1197  float b,
1198  float a = 1.0f);
1199 
1200  /*l
1201  *b Description:
1202  **
1203  ** Similar to set_heading_color_fg(), but for inputs instead.
1204  */
1205  void set_inputs_color_fg(int ui_appearance,
1206  float r,
1207  float g,
1208  float b,
1209  float a = 1.0f);
1210 
1211 
1212 /****************************************************************************/
1213 /****************************************************************************/
1214 /****************************************************************************/
1223 /****************************************************************************/
1224 /****************************************************************************/
1225 /****************************************************************************/
1226 
1227  // use set_ui_appearance() instead
1228  int set_current_settings_index(int current_settings_index);
1229 
1230  // set set_begin_state_entry_script() instead
1231  void set_input_response_script(const char* script);
1232 
1237 #ifdef CPLUSPLUS_ONLY
1238 
1239  bdiScenarioInteractionMachine* get_scripted_object() {return m_scripted_object;}
1240 
1241 private:
1242 
1243  /*l
1244  ** A private constructor.
1245  */
1246  diguyInteractionMachine(bdiScenarioInteractionMachine* scripted_object);
1247 
1248  /*l
1249  ** A private destructor.
1250  */
1251  virtual ~diguyInteractionMachine();
1252 
1253  /*l
1254  ** A pointer to internal data.
1255  */
1256  bdiScenarioInteractionMachine* m_scripted_object;
1257 
1258  friend class bdiScenarioInteractionMachine;
1259 
1260 #endif
1261 
1262 };
1263 
1264 
1265 #endif /* __diguyInteractionMachine_H */
1266 
1267 
1268 /*********************************************************************
1269  ** Copyright (c) 1992-2016 VT MAK
1270  ** All rights reserved.
1271  *********************************************************************/
1272 
The class that represents a DI-Guy Entity in the world.
Definition: diguyCharacter.h:81
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.
Definition: diguyInteractionMachine.h:81