Difference between revisions of "Dynamic Windows Tutorial Part 4"

From Legends of Aria Admin and Modding Wiki
Jump to: navigation, search
(Created page with "back to Project_Phoenix#Dynamic_Windows<br><br> ===Video=== <youtube></youtube> next video Dynamic_Windows_Tutorial_Part_5")
 
Line 3: Line 3:
 
<youtube></youtube>
 
<youtube></youtube>
 
next video [[Dynamic_Windows_Tutorial_Part_5]]
 
next video [[Dynamic_Windows_Tutorial_Part_5]]
 +
 +
===TestTool.lua===
 +
*here are the changes to the testtool.lua
 +
*you can copy and paste this over the ShowTestWindow() function or pause the video and type along.
 +
 +
function ShowTestWindow(user,controlobject)
 +
    local dynamicWindow = DynamicWindow("DynamicWindowHandler","",300,300,-150,-150,"TransparentDraggable","Center")
 +
    --Create Background
 +
    dynamicWindow:AddImage(1,1,"HueSwatch",300,300,"Simple","150000")
 +
    --Create Header Background
 +
    dynamicWindow:AddImage(1,1,"HueSwatch",300,34,"Simple","250000")
 +
    DrawCloseButton(272,5,dynamicWindow)
 +
    dynamicWindow:AddImage(-2,-2,"CraftingItemsFrame",306,40,"Sliced","FF0000")
 +
    dynamicWindow:AddLabel(150,10,"[AA0000]Test Window",300,20,20,"center")
 +
    --Create Body Background
 +
    dynamicWindow:AddImage(-2,30,"CraftingItemsFrame",306,274,"Sliced","FF0000")
 +
    --Open the dynamicWindow for the player and allowing the test tool
 +
    --to handle all the events and clicks from the window.
 +
    user:OpenDynamicWindow(dynamicWindow,controlobject)
 +
end

Revision as of 05:07, 13 March 2019

back to Project_Phoenix#Dynamic_Windows

Video

EmbedVideo is missing a required parameter.

next video Dynamic_Windows_Tutorial_Part_5

TestTool.lua

  • here are the changes to the testtool.lua
  • you can copy and paste this over the ShowTestWindow() function or pause the video and type along.
function ShowTestWindow(user,controlobject)
   local dynamicWindow = DynamicWindow("DynamicWindowHandler","",300,300,-150,-150,"TransparentDraggable","Center")
   --Create Background
   dynamicWindow:AddImage(1,1,"HueSwatch",300,300,"Simple","150000")
   --Create Header Background
   dynamicWindow:AddImage(1,1,"HueSwatch",300,34,"Simple","250000")
   DrawCloseButton(272,5,dynamicWindow)
   dynamicWindow:AddImage(-2,-2,"CraftingItemsFrame",306,40,"Sliced","FF0000")
   dynamicWindow:AddLabel(150,10,"[AA0000]Test Window",300,20,20,"center")
   --Create Body Background
   dynamicWindow:AddImage(-2,30,"CraftingItemsFrame",306,274,"Sliced","FF0000")
   --Open the dynamicWindow for the player and allowing the test tool
   --to handle all the events and clicks from the window.
   user:OpenDynamicWindow(dynamicWindow,controlobject)
end