Round Bars! Very customizable: size,color or texture, gap, thickness, precision.
Very easy to implement and doesnt require any extra objects or initilization scripts.
Performance tested and diffrent "prototypes" tried, ones with blendmodes and draw_vertex_color but those all didn't work as well as this one.
explanation for every argument:
x,y- obvious, x and y coordinates. defines the left upper corner, not the middle
radius- how big the circle has to be. A radius of 50 means 100 pixels in total width.
opening- if you want to leave out a part of the circle at the bottom(for aesthetic reasons). goes from 0 to 180 where 0 is a full circle and 180 is practicly nothing.
percent- how much the bar should be filled with a texture or color. goes from 0 to 1. not from 0 to 100. will give an error outside that range.
thickness- how thick the bar should be. expands to the middle. A higher thickness than the radius can give weird results.
precision- Kind of works like draw_set_circle_precision. how many segments the bar exists of. A higher opening value will not affect a circles quality. A to high value can lead to game maker refusing to draw parts of it.(max amount of draw_vertex calls).
texture- Needs to be a sprite, any size is oke. background on image 0 and foreground/bar on image 1. not every part or your sprite may be rendered, especially in the corners.
backcolor- color of the background.
barcolor- color of the bar.
I hope this is usefull to you!
Version 1.0.0. Published November 8, 2015
Created with GameMaker: Studio v1.4.1657
This asset hasn't received enough reviews yet.
You can only review assets you've bought.
Works great and easy to use.
This opens up so many GUI opportunities that you can't get without this. I wrapped a stamina bar around my player character so you can see how much juice you have left without taking your eyes off the action. I made it only pop up when it is being used to fit with the minimalist GUI I have with the rest of the game and it fits perfectly.
It's great to see this being usefull to someone. What kind of colors/textures did you use? let me know!
Total size 13.7 KB