@element
An element object is a handle to the primary data in the ECS system. It only contains the id of the entity as a field. The rest of the interface is defined trough vvars, which in turn access the storage on the app object.
An element object is a handle to the primary data in the ECS system. It only contains the id of the entity as a field. The rest of the interface is defined trough vvars, which in turn access the storage on the app object.
var myElem: @element { id: 0 };
var sel: myElem.selectable;
print sel.typeId;
Type: vvar.@selectable
The @selectable data object this element points to.
var sel: theElem.selectable;
Type: vvar.ptr(any)|null
Returns the associated action pointer if it has one. Otherwise returns null.
if theElem.action => ptr(any) {
var callback: theElem.action => ptr(fn);
callback();
}
Type: var.i64
The unique identifier in the ECS system.
return app.selectables[@self.id];
Type: fn => @selectable
Value accessor for the selectable vvar.
var.@selectable sel: theElem.getSelectable();
Type: fn => ptr(@selectable)
Pointer accessor for the selectable vvar.
var.ptr(@selectable) sel: theElem.getSelectablePointer();
Type: fn => ptr(i8)
Returns the name.
var name: theElem.getName();
Type: fn => ptr(any)|null
Value accessor for the action vvar.
var action: theElem.getAction();
Type: fn(ptr(any))
Setter for the action vvar.
The pointer to the function to be called.
To gain a better understanding of this class, it is recommended to look at the source code of the following file: