Advertisement
Qugurun

Text Gradient&Shadow

Jun 19th, 2021
1,362
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.79 KB | None | 0 0
  1. local box = display.newRect(config.width/2, config.height/2, 250, 250)
  2. local box_paint = {
  3.     type = "gradient",
  4.     color1 = { 125/255,219/255,47/255 },
  5.     color2 = { 0,116/255,48/255 },
  6.     direction = "down"
  7. }
  8.     box.fill = box_paint
  9.  
  10. --------------------------------------------------------------
  11. local offset = 2  
  12. local myTextShadow = display.newText( "Game", config.width/2, config.height/2+offset, native.systemFontBold, 40 )
  13. myTextShadow.fill = {0,98/225,22/255,0.3}
  14.  
  15. --------------------------------------------------------------
  16. local myText = display.newText( "Game", config.width/2, config.height/2, native.systemFontBold, 40 )
  17. local paint = {
  18.     type = "gradient",
  19.     color1 = { 237/255, 1, 192/255 },
  20.     color2 = { 140/255, 243/255, 174/255 },
  21.     direction = "down"
  22. }
  23. myText.fill = paint
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement