Difference between revisions of "GetControls"
From King Arthur's Gold Wiki
Shadlington (Talk | contribs) (Created page with "<onlyinclude> Returns a reference to the CControls object. </onlyinclude> <syntaxhighlight lang="cpp"> CControls@ getControls() </syntaxhighlight> Example from Entities/Work...") |
(No difference)
|
Latest revision as of 19:22, 22 August 2012
Returns a reference to the CControls object.
CControls@ getControls()
Example from Entities/Workshops/Scripts/WorkshopTasks.as:
if( cmd == WshpTasks::show_tasks) { CBlob@ caller = getBlobByNetworkId( params.read_u16() ); if (caller !is null) { int width = this.getProperties().get_u8("menu_width"); int height = this.getProperties().get_u8("menu_height"); string title = this.getProperties().get_string("menu_title"); CGridMenu@ menu = CreateGridMenu( getControls().getMouseScreenPos(), this, dimension2di(width, height), title); if (menu !is null) { AddWorkshopTasksButtons( this, caller, menu ); } } }