Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Progress Bar
Index -> Programming, Turing -> Turing Help
Goto page Previous  1, 2
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
AzureFire




PostPosted: Wed Nov 30, 2005 5:56 pm   Post subject: (No subject)

Crap..edit button's not there Sad , I wanted to add that they just finished the Draw.Oval command and multiple IF structures.
Sponsor
Sponsor
Sponsor
sponsor
DIIST




PostPosted: Tue Dec 06, 2005 7:36 pm   Post subject: (No subject)

Well you could try this usefull procedure, i made this for one of my old animations!
code:
procedure loadbar (locx, locy, lenght,current,maxvalue : int)
    var pointx:int:=floor(((current / maxvalue)* (lenght-24))+ (locx - (lenght div 2)+12))
   
       
    %The Outside Box
    drawfillbox (locx - (lenght div 2) + 10, locy - 10, locx + (lenght div 2) - 10, locy + 10, 8)
    drawfillbox (locx - (lenght div 2) + 12, locy - 10 + 2, locx + (lenght div 2) - 12, locy + 10 - 2, 7)
   
    %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)
   
    %Cover Slips
    drawfillarc (locx - (lenght div 2) + 12, locy, 5, 8,90,270,7)
    drawfillarc (locx + (lenght div 2) - 12, locy, 5, 8,270,90,7)


    drawfillarc (locx - (lenght div 2) + 10, locy, 10, 10,90,270,8)
    drawfillarc(locx + (lenght div 2) - 10, locy, 10, 10,270,90,8)
    drawarc (locx - (lenght div 2) + 10, locy, 10, 10,90,270,29)
    drawarc(locx + (lenght div 2) - 10, locy, 10, 10,270,90,27)
   
    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




PostPosted: 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 Wink

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 Smile

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

http://www.compsci.ca/v2/viewtopic.php?t=10434


The ability to merge topics would be nice. Smile
AzureFire




PostPosted: Mon Feb 13, 2006 8:27 pm   Post subject: (No subject)

Thanks for cleaning that up..always nice to have non-idle moderators Smile
Mr. T




PostPosted: 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




PostPosted: Mon Feb 13, 2006 10:40 pm   Post subject: (No subject)

Cervantes wrote:

The ability to merge topics would be nice. Smile


As i have side b4 this ablity will be introduced in v3. Wink

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 Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Mr. T




PostPosted: 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. Confused
Cervantes




PostPosted: 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. Confused

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.
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 2 of 2  [ 23 Posts ]
Goto page Previous  1, 2
Jump to:   


Style:  
Search: