abirduphigh

E2 EGP Example

Mar 26th, 2023
1,138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @inputs EGP:wirelink
  2. @trigger EGP
  3.  
  4. # Settings
  5. BorderColor = vec( 0, 255, 80 )
  6. BorderSize = 3
  7. TextColor = vec( 255, 0, 80 )
  8. TextSize = 60
  9. TextFont = "Coolvetica"
  10. TextString =
  11. "Wiremod
  12. is
  13. awesome"
  14.  
  15.  
  16. # Clear the EGP screen
  17. EGP:egpClear()
  18.  
  19. # Draw a box outline at EGP index 1
  20. EGP:egpBoxOutline( 1, vec2( 256 ), vec2( 512 ))
  21. # Change the color of the box outline
  22. EGP:egpColor( 1, BorderColor )
  23. # Change the thickness of the box outline
  24. EGP:egpSize( 1, BorderSize )
  25.  
  26. # Draw a text object at egp index 2
  27. EGP:egpTextLayout( 2, TextString, vec2( 0 ), vec2( 512 ))
  28. # Center the text
  29. EGP:egpAlign( 2, 1, 1 )
  30. # Change the color of the text object
  31. EGP:egpColor( 2, TextColor )
  32. # Change the font face and size
  33. EGP:egpFont( 2, TextFont, TextSize )
Advertisement
Add Comment
Please, Sign In to add comment