Want to spice up your game's GUI a bit? Looking for a different way to present values than a simple rectangle?
This script package will let you do that, using circular and arc-shaped bars and meters.
Some uses include:
...And anything else you can think of!
The package includes scripts for drawing bars and meters in a circular fashion. With these scripts, you can adjust bar width, radius, angle, orientation and colour. You can even fill the bar with a gradient or apply textures!
The following functions are included:
draw_bar_circular(x,y,fill_percentage,bar_col,bar_alpha,bar_radius,bar_width,start_angle,clockwise,back_col,back_alpha)
draw_bar_circular_simple(x,y,fill_percentage,bar_radius,bar_width,start_angle,clockwise)
draw_bar_circular_texture(x,y,fill_percentage,bar_tex,bar_radius,bar_width,start_angle,clockwise,back_col,back_alpha,tex_tiled)
draw_bar_circular_gradient_w(x,y,fill_percentage,bar_col_inner,bar_col_outer,bar_alpha_inner,bar_alpha_outer,bar_radius,bar_width,start_angle,clockwise,back_col,back_alpha)
draw_bar_circular_gradient_l(x,y,fill_percentage,bar_col_start,bar_col_end,bar_alpha_start,bar_alpha_end,bar_radius,bar_width,start_angle,clockwise,back_col,back_alpha)
draw_bar_arc(x,y,fill_percentage,bar_col,bar_alpha,bar_radius,bar_width,start_angle,end_angle,clockwise,back_col,back_alpha)
draw_bar_arc_simple(x,y,fill_percentage,bar_radius,bar_width,start_angle,end_angle,clockwise)
draw_bar_arc_texture(x,y,fill_percentage,bar_tex,bar_radius,bar_width,start_angle,end_angle,clockwise,back_col,back_alpha,tex_tiled)
draw_bar_arc_gradient_w(x,y,fill_percentage,bar_col_inner,bar_col_outer,bar_alpha_inner,bar_col_outer,bar_radius,bar_width,start_angle,end_angle,clockwise,back_col,back_alpha)
draw_bar_arc_gradient_l(x,y,fill_percentage,bar_col_start,bar_col_end,bar_alpha_start,bar_col_end,bar_radius,bar_width,start_angle,end_angle,clockwise,back_col,back_alpha)
In addition, this asset pack includes a demo to help you better understand these functions. The scripts are headed with helpful instructions, informing you on how to properly use them.
Hope you like it!
End User Licence Agreement (EULA).
Revised version for use with GameMaker Studio 2.
Changes made for compatibility: * texture_set_interpolation() has been replaced with gpu_set_texfilter() * texture_set_repeat() has been replaced with gpu_set_texrepeat()