Search
Latest topics
Scripting GUI
2 posters
Page 1 of 1
Scripting GUI
Hello This Is Tutorial How To Scripting Simply GUI.
For First You Can Download GUIEditor On MTA Community, If You Not, You Go On Hard Things!
So You Can Use This Command
Example:
function createLoginWindow()
local X = 0.375
local Y = 0.375
local Width = 0.25
local Height = 0.25
wdwLogin = guiCreateWindow(X, Y, Width, Height, "Please Log In", true)
-- define new X and Y positions for the first label
X = 0.0825
Y = 0.2
-- define new Width and Height values for the first label
Width = 0.25
Height = 0.25
-- create the first label, note the final argument passed is 'wdwLogin' meaning the window
-- we created above is the parent of this label (so all the position and size values are now relative to the position of that window)
guiCreateLabel(X, Y, Width, Height, "Username", true, wdwLogin)
-- alter the Y value, so the second label is slightly below the first
Y = 0.5
guiCreateLabel(X, Y, Width, Height, "Password", true, wdwLogin)
X = 0.415
Y = 0.2
Width = 0.5
Height = 0.15
edtUser = guiCreateEdit(X, Y, Width, Height, "", true, wdwLogin)
Y = 0.5
edtPass = guiCreateEdit(X, Y, Width, Height, "", true, wdwLogin)
-- set the maximum character length for the username and password fields to 50
guiEditSetMaxLength(edtUser, 50)
guiEditSetMaxLength(edtPass, 50)
X = 0.415
Y = 0.7
Width = 0.25
Height = 0.2
btnLogin = guiCreateButton(X, Y, Width, Height, "Log In", true, wdwLogin)
-- make the window invisible
guiSetVisible(wdwLogin, false)
end
This Is For Create Login/Register GUI So Its Not Simply If You Do That!
If You Have Problem With Scripting Report To Me!
If You Good Scripter You Can Really Do Like This:
http://wiki.multitheftauto.com/images/thumb/2/2f/AdminGUI.png/750px-AdminGUI.png
Syntax: element guiCreateWindow ( float x, float y, float width, float height, string titleBarText, bool relative )
You Can Be Good Scripter!
For First You Can Download GUIEditor On MTA Community, If You Not, You Go On Hard Things!
So You Can Use This Command
Example:
function createLoginWindow()
local X = 0.375
local Y = 0.375
local Width = 0.25
local Height = 0.25
wdwLogin = guiCreateWindow(X, Y, Width, Height, "Please Log In", true)
-- define new X and Y positions for the first label
X = 0.0825
Y = 0.2
-- define new Width and Height values for the first label
Width = 0.25
Height = 0.25
-- create the first label, note the final argument passed is 'wdwLogin' meaning the window
-- we created above is the parent of this label (so all the position and size values are now relative to the position of that window)
guiCreateLabel(X, Y, Width, Height, "Username", true, wdwLogin)
-- alter the Y value, so the second label is slightly below the first
Y = 0.5
guiCreateLabel(X, Y, Width, Height, "Password", true, wdwLogin)
X = 0.415
Y = 0.2
Width = 0.5
Height = 0.15
edtUser = guiCreateEdit(X, Y, Width, Height, "", true, wdwLogin)
Y = 0.5
edtPass = guiCreateEdit(X, Y, Width, Height, "", true, wdwLogin)
-- set the maximum character length for the username and password fields to 50
guiEditSetMaxLength(edtUser, 50)
guiEditSetMaxLength(edtPass, 50)
X = 0.415
Y = 0.7
Width = 0.25
Height = 0.2
btnLogin = guiCreateButton(X, Y, Width, Height, "Log In", true, wdwLogin)
-- make the window invisible
guiSetVisible(wdwLogin, false)
end
This Is For Create Login/Register GUI So Its Not Simply If You Do That!
If You Have Problem With Scripting Report To Me!
If You Good Scripter You Can Really Do Like This:
http://wiki.multitheftauto.com/images/thumb/2/2f/AdminGUI.png/750px-AdminGUI.png
Syntax: element guiCreateWindow ( float x, float y, float width, float height, string titleBarText, bool relative )
You Can Be Good Scripter!
Wrong
This is the wrong part to post in.
(Moving)
(Moving)
Bossie Bosnac- Admin
- Posts : 11
Join date : 2010-08-24
Age : 29
Location : Sweden, Skåne
Re: Scripting GUI
Timic wrote:Why ? Where I Have To Post
You have to post in Scripting -> Tutorials, You did post in Scripting -> Help/Questions (That section is only for ppl who need help, not for tutorials as you´rs). Thats why I moved it.
Bossie Bosnac- Admin
- Posts : 11
Join date : 2010-08-24
Age : 29
Location : Sweden, Skåne
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
Mon Nov 28, 2011 4:57 pm by Villr
» Err, Hello
Tue Aug 02, 2011 3:33 pm by EpicBuNgLeR
» Los Santos Civilian Defence Force [ LSCDF ]
Sun Jul 03, 2011 4:09 pm by [DK]Apocalypse
» When server is back
Mon Jun 27, 2011 10:11 pm by Villr
» Applications - Open
Mon Jun 20, 2011 6:07 pm by mannen191
» 18 june
Tue Jun 07, 2011 4:41 pm by [DK]Apocalypse
» Applying for being Important Member :)
Thu Jun 02, 2011 1:46 pm by Elvir
» Dmer,spammer,breack in base,insult (andy)
Tue May 31, 2011 12:59 pm by Villr
» 2 Days left then im quitting.
Wed May 25, 2011 8:55 pm by Skoggy