Advertisement
Guest User

Untitled

a guest
Sep 24th, 2016
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. ///drawing the text box
  2. texture_set_interpolation(false);
  3.  
  4. //setting drawings in surface
  5. surface_set_target(area_surface)
  6.  
  7. //drawing rectangle
  8. draw_set_color(area_color)
  9. draw_set_alpha(0.3);
  10. draw_rectangle(0, 0, area_width, area_height, false)
  11. draw_set_alpha (1);
  12.  
  13. //drawing text
  14. draw_set_color(text_color)
  15. draw_set_font(fnt_textbox);
  16. draw_text_ext(10, 10+round(-scroll_pos * scroll_scale), text, -2, text_width)
  17.  
  18. //resetting the drawing target
  19. surface_reset_target()
  20.  
  21. //drawing the surface
  22. draw_surface(area_surface, area_x, area_y)
  23.  
  24. //drawing border and scroll-bar
  25. draw_set_color (c_black);
  26. draw_rectangle(area_x - 1, area_y - 1, area_x + area_width, area_y + area_height, true)
  27. draw_sprite(spr_scroll, 0, area_x + area_width, area_y + area_height * scroll_pos);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement