Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- __NOTOC__
- {{Client function}}
- This function set size of Custom Widget on screen.
- == Syntax ==
- <syntaxhighlight lang="lua">
- bool CustomWidget:setSize(float Width, float Height, [bool Relative])
- </syntaxhighlight>
- === Required Arguments ===
- *'''Width''' - New width of widget
- *'''Height''' - New height of widget
- === Other Arguments ===
- *'''Relative''' - Relative of size (if false, size will be absolute). Default - ''false''.
- === Returns ===
- Returns bool value - is size changed.
- == Example ==
- This example creating window, and set it's size to quarter part of screen:
- <syntaxhighlight lang="lua">
- local Width, Height = guiGetScreenSize()
- local Window = CustomWindow.create(0, 0, 100, 100, "Example", false)
- Window:setSize(Width/2, Height/2)
- </syntaxhighlight>
- == See Also ==
- {{CWSFUNCS}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement