Game Development Community

Passing an Enum into the GUI

by Mike Wigand · in Torque Game Engine · 02/25/2002 (11:03 pm) · 2 replies

Im trying to send an Enum to be used by my own guiTextBoxes. Does anyone know how to use this function? Its located in console types.

static void setDataTypeEnum(void *dptr, S32 argc, const char **argv, EnumTable *tbl, BitSet32)

Thanks

Mike Wigand
MuffinMan Productions
"Do you know the Muffin Man?

#1
03/11/2002 (1:00 pm)
setDataTypeEnum and getDataTypeEnum are automatically invoked to pass data back and forth between the scripting and the engine code for a field marked as TypeEnum. You don't call them explicitly in your code.

To see examples of TypeEnum fields being created, in the engine code look for addField invocations that have TypeEnum as the second argument. The last argument is a pointer to an EnumTable object that specifies the mapping between the enums used in the engine code and strings used by the scripting.
#2
03/15/2002 (7:44 am)
thnx