First you will need the slider class:
Here Link to Crash's Thread
Full credits to him for the Classes and how to use.
The Video:
The code:
I know this can be done other ways that are easier and smarter.
I chose to do it this way because it is very very very easy to understand.
There are also a lot of things you can do with this and the slider class so be creative
Of course if you change the minimum Value and maximum Value you must change the width on here so it corresponds to your slider.Code:if(curVal > -1) { DrawBox(50,400,100,20,White,White,pDevice); DrawString(50,400,Black,"0%"); } if(curVal > 20){ DrawBox(50,400,20,20,Green,White,pDevice); DrawString(50,400,Black,"20%"); } if(curVal > 40){ DrawBox(50,400,40,20,Green,White,pDevice); DrawString(50,400,Black,"40%"); } if(curVal > 60){ DrawBox(50,400,60,20,Green,White,pDevice); DrawString(50,400,Black,"60%"); } if(curVal > 80){ DrawBox(50,400,80,20,Green,White,pDevice); DrawString(50,400,Black,"80%"); } if(curVal > 99){ DrawBox(50,400,100,20,Green,White,pDevice); DrawString(50,400,Black,"100%"); }
I did curVal > -1 Because that will just draw initial box when the Value of the slider is greater than -1.
No questions unless it is necessary?
LOL
Credits: Crash, Functions in his thread(Draw box, etc...) Whoever?
KTHXBAII!
Last edited by Nubzgetkillz; 01-18-2011 at 06:15 PM.
Member since September 25, 2010
Current Objectives:
- Graduate college with a degree in Computer Science
- Find a decent job in the Computer Science Field
- Learn more programming languages
Looking for Elo Boosting Job - League of Legends
Looking for Bronze -> Gold Jobs
Skype: whatthedream
looks nice
but there are a lot of other ways to make the progress bar to fill exactly with slider value
edit why don't you make it an else if or case?
cause with the > you are drawing 5 boxes when you reach 100%
I know like I said easy for noobs like me to understand and everyone else.. even pros can use this: )
I KNOW IT IS!
https://www.mpgh.net/forum/207-combat...ml#post3336482
https://www.mpgh.net/forum/207-combat...ml#post3336482
https://www.mpgh.net/forum/207-combat...ml#post3336482
https://www.mpgh.net/forum/207-combat...ml#post3336482
https://www.mpgh.net/forum/207-combat...ml#post3336482
https://www.mpgh.net/forum/207-combat...ml#post3336482
https://www.mpgh.net/forum/207-combat...ml#post3336482
https://www.mpgh.net/forum/207-combat...ml#post3336482
Last edited by Nubzgetkillz; 01-18-2011 at 06:24 PM.
Member since September 25, 2010
Current Objectives:
- Graduate college with a degree in Computer Science
- Find a decent job in the Computer Science Field
- Learn more programming languages
Looking for Elo Boosting Job - League of Legends
Looking for Bronze -> Gold Jobs
Skype: whatthedream
Your code in 1/5th the size
Code:string str = atoi(curVal,buf,10); str += "%" DrawBox(50,400,curVal,20,Green,White,pDevice); DrawString(50,400,Black,str.c_str());
Last edited by why06; 01-18-2011 at 06:39 PM.
"Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."- Dwight D. Eisenhower
Isn't the point of a progress bar to show progress in something like loader resources ?
"Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."- Dwight D. Eisenhower
"Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."- Dwight D. Eisenhower
hehe like i said.. be creative.
that is small and easy to understand.
well for me.
Yeah you can load hacks, text, menus, such
No. not really
Thanks
In his school -.- what kind of dumb question is that coming from a smart person
Member since September 25, 2010
Current Objectives:
- Graduate college with a degree in Computer Science
- Find a decent job in the Computer Science Field
- Learn more programming languages
Looking for Elo Boosting Job - League of Legends
Looking for Bronze -> Gold Jobs
Skype: whatthedream
I see those recently and like 5 other DPrint threads
WHER DAT SECRET SECTION.
"Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."- Dwight D. Eisenhower
Member since September 25, 2010
Current Objectives:
- Graduate college with a degree in Computer Science
- Find a decent job in the Computer Science Field
- Learn more programming languages
Looking for Elo Boosting Job - League of Legends
Looking for Bronze -> Gold Jobs
Skype: whatthedream