From King Arthur's Gold Wiki
Jump to: navigation, search

Returns a reference to the CControls object.

CControls@ getControls()

Example from Entities/Workshops/Scripts/

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 );