How to make Powerbar?
Posted: Sun Apr 04, 2010 1:07 pm
Im trying to figure out a way to make Powerbar to a game.
Idea is, that when you press right mouse button down, that powerbar keeps increasing.
otherwise that powerbar is actually done alrady, but its not done graphically, since im not quite getting how to actually do it.
One way i can do it already, is that i make it single color rectangle and keep stretching/shrinkin it along the way.
However, i would like it to be so, that at bottom color would be for example blue, and higher the bar goes, more red the end of bar would be.
so how do i do this in practice?
Only way i can figure so far is to make rectangle with gradient coloring and make that gradient coloring everytime again.
In example.
Rectangle width being constant 100,, but then height would move from 1 - 100 and then that gradient coloring would move from 15 amount of blue to 1 - 15 amount of red, depending at what part of powerprogress its going.
Idea is, that when you press right mouse button down, that powerbar keeps increasing.
otherwise that powerbar is actually done alrady, but its not done graphically, since im not quite getting how to actually do it.
One way i can do it already, is that i make it single color rectangle and keep stretching/shrinkin it along the way.
However, i would like it to be so, that at bottom color would be for example blue, and higher the bar goes, more red the end of bar would be.
so how do i do this in practice?
Only way i can figure so far is to make rectangle with gradient coloring and make that gradient coloring everytime again.
In example.
Rectangle width being constant 100,, but then height would move from 1 - 100 and then that gradient coloring would move from 15 amount of blue to 1 - 15 amount of red, depending at what part of powerprogress its going.