You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nhmkdev edited this page Jan 15, 2014
·
4 revisions
Definition
Class on a data object is a setting for specifying the underlying code for processing a given action.
Data Format
In the sample below is a Dialog that uses the class objects.debugmenu to provide a simple debug menu. ig.global is prepended to the value to link the dialog and the given object up. A new object is not created in any case. The existing ig.global.? is used directly. The first option in the menu allows the player to increase their points by 100. This is achieved by using the ca and cav fields.
Dialogs.DebugMenu =
{
s:
{
base:dialogsBaseSettings,
c:'objects.debugmenu', // 'ig.global' is prepended to this
win:
[
Windows.dialogbg
]
},
sa:
[
{
n:'main',
t:'DEBUG MENU',
o:
[
{
t:'Add 100 points',
ca:'adjustpoints', // function to call on the class object
cav: { p:100 }, // input object to pass to the function
ns:'main'
},
]
}
]
};
In the actual debug menu code file the function being called is defined as follows: