Difference between revisions of "NCScriptsDynamicWindows"

From Legends of Aria Admin and Modding Wiki
Jump to: navigation, search
Line 11: Line 11:
 
   --@ param: player - this is the player object you wish to display the dynamic window too
 
   --@ param: player - this is the player object you wish to display the dynamic window too
 
   function DisplayDynamicWindow(player)
 
   function DisplayDynamicWindow(player)
 +
      -- create the dynamic window object
 
       local dynamicWindow = DynamicWindow("UniqueWindowHandler","Custom Window Title",200,500,-100,-250,"Default","Center")
 
       local dynamicWindow = DynamicWindow("UniqueWindowHandler","Custom Window Title",200,500,-100,-250,"Default","Center")
       --REMINDER: A dynamic window wont display unless you have at least one child element such as AddLabel
+
       -- REMINDER: A dynamic window wont display unless you have at least one child element such as AddLabel
 +
      -- display the dynamic window to the player
 
       player:OpenDynamicWindow(dynamicWindow)
 
       player:OpenDynamicWindow(dynamicWindow)
 
   end
 
   end

Revision as of 17:54, 10 November 2019

DynamicWindow Object

DynamicWindow(...)

This is the main dynamic window object creator, you can use many of its child functions to create your dynamic window.

Example of creating a DynamicWindow object

 --- DisplayDynamicWindow- this function will display a dynamic window to a player
 --@ param: player - this is the player object you wish to display the dynamic window too
 function DisplayDynamicWindow(player)
     -- create the dynamic window object
     local dynamicWindow = DynamicWindow("UniqueWindowHandler","Custom Window Title",200,500,-100,-250,"Default","Center")
     -- REMINDER: A dynamic window wont display unless you have at least one child element such as AddLabel
     -- display the dynamic window to the player
     player:OpenDynamicWindow(dynamicWindow)
 end

DynamicWindow Child Functions

DynamicWindow:AddLabel(...)

This child function of the DynamicWindow object allows you to add a label at x,y on the dynamic window.

Example of adding a Label to your DynamicWindow

 CODE BLOCK
 CODE BLOCK
 CODE BLOCK