%Actual Bar
drawfillbox((locx - (lenght div 2)+12),locy-7,pointx,locy+7,50)
drawline((locx - (lenght div 2)+12),locy+7,pointx,locy+7,11)
drawline((locx - (lenght div 2)+12),locy-7,pointx,locy-7,1)
drawline(locx- (lenght div 2) + 10,locy+10,locx + (lenght div 2) - 10,locy+10,30)
drawline(locx- (lenght div 2) + 10,locy-10,locx + (lenght div 2) - 10,locy-10,25)
end loadbar
I did this so you can use it again and again. Bassically you pass into the procedure the center x,y coordinates, and the width of the bar. You then enter the current value and the maxvalue. It will draw it depending on those values!
Cervantes
Posted: Sat Feb 11, 2006 10:23 am Post subject: (No subject)
AzureFire wrote:
I'm just updating here. I figured out a nice little code that may help some nubbers
code:
var temp:int
var pic:array 0..100 of int %<--Can be 1..100 but if you want an empty bar you need the 0
temp:=Pic.FileNew("healthBar.jpg")
Pic.Draw(temp,0,0,0)
for a:0..upper(pic) %<--Can be 1..100 but if you want an empty bar you need the 0
Pic.Draw(temp,0,0,0)
pic(a):=Pic.New(0,0,a,30) %<--30 is the height of the image i used, use your own number
end for
***You will need to change the name of the pic in the code, as well as the sizing***
This is how I tested this code after
code:
setscreen("graphics:200;200")
cls
for b:1..100
Pic.Draw(pic(b),0,0,0)
delay(50)
cls
end for
for decreasing c: 100..1
Pic.Draw(pic(c),0,0,0)
delay(50)
cls
end for
Just add that to the end of the first code and you can see how it works. Very simple AND has transparency just like I wanted
Hope this helps someone else as much as it helped me.
AzureFire wrote:
oops..meant to reply to an old topic...here's the link back
Posted: Mon Feb 13, 2006 8:27 pm Post subject: (No subject)
Thanks for cleaning that up..always nice to have non-idle moderators
Mr. T
Posted: Mon Feb 13, 2006 9:25 pm Post subject: Alex's Opinion
[mod:a263d8b7d7="Cervantes"]
Non-idle moderators, indeed. Cut the spam, Pwned.
[/mod:a263d8b7d7]
Dan
Posted: Mon Feb 13, 2006 10:40 pm Post subject: (No subject)
Cervantes wrote:
The ability to merge topics would be nice.
As i have side b4 this ablity will be introduced in v3.
Also if u have any probelms with the way we mod the forums or think there is a topic that need to been seen please pm or e-mail a staff member. Unfrontly we are not able to view every post on this site but in v3 there will be a better system for user reporting posts that need addtion.
Computer Science CanadaHelp with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Mr. T
Posted: Thu Feb 16, 2006 6:44 pm Post subject: Alex's Opinion
Why was my post modded? All i did was submit a very basic progress bar.
Cervantes
Posted: Thu Feb 16, 2006 7:39 pm Post subject: (No subject)
Pwned wrote:
Why was my post modded? All i did was submit a very basic progress bar.
Because it was not a progress bar. It was a rotating line. It was not helpful. It showed you did not read the thread. It was spam.