Beginner's GUI Tutorial: Difference between revisions

>Camoy
(Added "See also".)
>Emess
Line 15: Line 15:
Roblox's GUI includes GUI Elements that draw certain items on the screen. They are:  
Roblox's GUI includes GUI Elements that draw certain items on the screen. They are:  


[[RBX.lua.Frame (Object)|Frame]] - Creates a Box with a Background Color and Border Color.  
*[[RBX.lua.BillboardGui (Object)|BillboardGui]] - objects that can stick onto 3D parts
*[[RBX.lua.Frame (Object)|Frame]] - Creates a Box with a Background Color and Border Color.
*[[RBX.lua.TextLabel (Object)|TextLabel]] - Simply a Frame with a Text property and a TextColor property.
*[[RBX.lua.TextButton (Object)|TextButton]] - The same as a TextLabel, however it has events with it that recieve user input in mouse-type formats.
*[[RBX.lua.ImageLabel (Object)|ImageLabel]] - Simply an Image with a Texture that it draws on the screen. It can be scaled to any size, and also have a background.
*[[RBX.lua.ImageButton (Object)|ImageButton]] - An ImageLabel with events with it that recieve user input in mouse-type formats.
*[[RBX.lua.SelectionBox (Object)|SelectionBox]] - An Element that has a property called "Adornee" that must be set to a brick. It then renders a Selection box in a desired color.
*[[RBX.lua.Handles (Object)|Handles]] - An Element that has a property called "Adornee" that must be set to a brick. It then renders either the Drag on Axis handles or the Resize tool handles. You can change what faces get handles (eg, only top and bottom), and you can also use the events with it that detect mouse input (dragging, clicking, mouseover).  


[[RBX.lua.Frame (Object)|TextLabel]] - Simply a Frame with a Text property and a TextColor property.
In order to prevent confusion with drawing the images on the screen, all Elements must be placed in a new type of Instance called the "ScreenGui". If an element is not a child of the ScreenGui, it will not display. ScreenGuis are commonly placed in the StarterGui, players' PlayerGuis and the Workspace. If the ScreenGui is in a PlayerGui, it will only display to that one player. If it is in the Workspace, it will display to all players.
 
[[RBX.lua.Frame (Object)|TextButton]] - The same as a TextLabel, however it has events with it that recieve user input in mouse-type formats.
 
[[RBX.lua.Frame (Object)|ImageLabel]] - Simply an Image with a Texture that it draws on the screen. It can be scaled to any size, and also have a background.
 
[[RBX.lua.Frame (Object)|ImageButton]] - An ImageLabel with events with it that recieve user input in mouse-type formats.
 
[[RBX.lua.Frame (Object)|SelectionBox]] - An Element that has a property called "Adornee" that must be set to a brick. It then renders a Selection box in a desired color.
 
[[RBX.lua.Frame (Object)|Handles]] - An Element that has a property called "Adornee" that must be set to a brick. It then renders either the Drag on Axis handles or the Resize tool handles. You can change what faces get handles (eg, only top and bottom), and you can also use the events with it that detect mouse input (dragging, clicking, mouseover).
 
In order to prevent confusion with drawing the images on the screen, all Elements must be placed in a new type of Instance called the "ScreenGui". If an element is not a child of the ScreenGui, it will not display. ScreenGuis are commonly placed in the StarterGui, players' PlayerGuis and the Workspace. If the ScreenGui is in a PlayerGui, it will only display to that one player. If it is in the Workspace, it will display to all players.  


== GUI Scripting - Documentation ==
== GUI Scripting - Documentation ==
Anonymous user