Jump to content

Boder Panel?


Yue
 Share

Recommended Posts

image.png.1ba48daed8718c5f22c0985edc46ab78.png

 

Trying to understand the Leadwerks GUI.

The edge should be that way? I would expect it to be with the corners a little rounded.

This is what I have written.

 

local gui = nil 
local base = nil

local context = nil 
function Script:Start()
	hudPlayer = Texture:Load("Hud/PawnHud.tex")
	hudSad    = Texture:Load("Hud/Sad.tex")
	font = Font:Load("Fonts/space age.ttf", 12)
	
	context = Context:GetCurrent()
	context:SetFont(font)
	
	

	gui = GUI:Create(context)
	base = gui:GetBase()
	
	panel  = Widget:Panel(gui:GetBase():GetClientSize().x/2-150,gui:GetBase():GetClientSize().y/2+150,300,100,gui:GetBase())
	panel:SetAlignment(0,0,0,0)
	panel:SetFloat("radius",30)
	panel:SetBool("border",true)
	Widget:Label("Do you want to",panel:GetClientSize().x/2-100,20,300,20,panel)
	Widget:Label("try again?",panel:GetClientSize().x/2-65,40,300,200,panel)
	
	
	btnYes = Widget:Button("OK",panel:GetClientSize().x/2-2-110,panel:GetClientSize().y-26-4,100,26,panel)
	btnNo  = Widget:Button("Cancel",panel:GetClientSize().x/2+18,panel:GetClientSize().y-26-4,100,26,panel)
	btnYes:SetStyle(BUTTON_OK)	
	btnNo:SetStyle(BUTTON_CANCEL)	
	gui:Hide()
end

 

Mars.jpg.89ab63a64eebc1f5ada0ab82b66a1f8c.jpg

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...