Advertisement
Guest User

Untitled

a guest
Jul 20th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. __NOTOC__
  2. {{Client function}}
  3. This function set size of Custom Widget on screen.
  4.  
  5. == Syntax ==
  6. <syntaxhighlight lang="lua">
  7. bool CustomWidget:setSize(float Width, float Height, [bool Relative])
  8. </syntaxhighlight>
  9.  
  10. === Required Arguments ===
  11. *'''Width''' - New width of widget
  12. *'''Height''' - New height of widget
  13.  
  14. === Other Arguments ===
  15. *'''Relative''' - Relative of size (if false, size will be absolute). Default - ''false''.
  16.  
  17. === Returns ===
  18. Returns bool value - is size changed.
  19.  
  20. == Example ==
  21. This example creating window, and set it's size to quarter part of screen:
  22.  
  23. <syntaxhighlight lang="lua">
  24. local Width, Height = guiGetScreenSize()
  25.  
  26. local Window = CustomWindow.create(0, 0, 100, 100, "Example", false)
  27. Window:setSize(Width/2, Height/2)
  28. </syntaxhighlight>
  29.  
  30. == See Also ==
  31. {{CWSFUNCS}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement