I made a calculator too! Yet it CAN have up to 15 digits :) AddZero, If you script it so you type digits, you should be able to get more than 1 digit:)
AddZero, may I use this in Fab OS? I am making a second version and I need some apps for it, and this would make a GREAT calculator. I will, of course, give you credit.
There's not an easy way to do it.
You could make it draw the menu, stop the program there, capture the back ground, cut out the menu, and have that pop up, but it's even a bit more complicated than that. you're welcome to try.
Thanks for your suggestions on Sailing Course Challenge. At the moment, I am trying a different approach which is to skip the whole tiling issue and simply treat the islands as moving sprites in the scrolling universe. Seems to work very well, only the backround has to be very untextured for the illusion to work. Anyway, that's what I'm playing with now, but I appreciate your assistance and may need more if I switch back to tiling.
coolkid17657: Yeah, this is not the most useful calculator. I just wanted to show the 'combo boxes' I made in action. That's hopefully the cooler part of this project. You can use these selectors in your own projects, they have many uses- change the number of players, the difficulty level, the color of the pen... they're not just for calculators.
Sakani, yeah that part is kind of trick, you'll notice the first thing is does is that that when it's clicked, it checks to see if the costume is the blue highlight. If it is, then it knows the combo box is open and the user just made a selection. then it uses the current position as the selection. Sorry it's kind of confusing... there's probably a better way to do that.
I have not figured out how to make a down arrow yet, without making another set of costumes- one with the down arrow, or have all of them with down arrow, and just overwrite all of them when the menu is drawn... but that would slow it more. Perhaps I'm missing something, but I think the best option now, is to make it look like a button. put the embossed edge on the background? You're welcome to try.
I was thinking of making one of these for my perpetually unfinished Scratch GUI system. I got stuck with these because I didn't know how to keep the current selection displayed in the closed combobox. Great job, I'm deifintely going to find uses for this!
This project does math based on selections in the combo boxes.
Just click them to change the values.
Combo boxes are selectors you often see in website forms and applications. They make it easy to select information.
I made this combo box for a tutorial system and other projects I'm working on. I wanted it to be all-in-one so it's easy to drop into projects.
It's pretty easy to modify, just change the costumes. If you change the number of choices or location, change the values above the script then double-click to run it.
-----Feel free to use this in your projects. Please let me know if you improve it
HOW IT WORKS: Everything is in one sprite. There are costumes for each of the options, There's also a check-mark and a blue selection highlight costume.
When clicked, it stamps so that the current option stays at the bottom, then it moves up, changes costumes and stamps for each of the options. So that it draws all of the options. then moves to and stamps a check mark at the current selection.
The sprite then changes to the blue highlight, and turns on the ghost effect so it's partially transparent. While the cursor is still over the menu, it moves at 16px increments up and down. so that it highlights an option.
If the blue selection costume is clicked, it changes the "value" variable of the combo box to the current selection and broadcasts "changed"
When the combo box is done, it clears the screen.
For the calculator: There's a script waiting for the "changed" broadcast. When it receives that, it does the math based on the values in the combo boxes.
KNOWN ISSUES: If you move your mouse far after clicking, it can break or select the wrong thing. It's hard coded to 16 pixels tall. Because it stamps the menu, it will be behind objects in the way. Some of the code is hackish, I don't know the cleanest/best way to do it. I've never done this before! I'm open to suggestions!
Comments
You need to be logged in to post comments
Add a Comment
Legal!!! (Nice)
I made a calculator too! Yet it CAN have up to 15 digits :) AddZero, If you script it so you type digits, you should be able to get more than 1 digit:)
Click here to view my calculator: (link to project)">(link to project) - Please comment!
very nice. nice combo boxes
sweat
AddZero, may I use this in Fab OS? I am making a second version and I need some apps for it, and this would make a GREAT calculator. I will, of course, give you credit.
I think there are better calculators you can use: http://scratch.mit.edu/tags/view/calculator">http://scratch.mit.edu/tags/view/calculator
There's not an easy way to do it. You could make it draw the menu, stop the program there, capture the back ground, cut out the menu, and have that pop up, but it's even a bit more complicated than that. you're welcome to try.
(view all replies)It is kind of limited, because it uses stamp to draw the menu- so any abjects will cover it up.
(view all replies)Sure, no problem!
I love it but you can't do double digits:(
cool
Great now I can do my maths homework!
COOL!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Nice one. I like the way you reduced its graphic resources to minimal.
very cool!
Thanks for your suggestions on Sailing Course Challenge. At the moment, I am trying a different approach which is to skip the whole tiling issue and simply treat the islands as moving sprites in the scrolling universe. Seems to work very well, only the backround has to be very untextured for the illusion to work. Anyway, that's what I'm playing with now, but I appreciate your assistance and may need more if I switch back to tiling.
well i'll do this tomarrow, right now i'm working on a shape/grid/math/HARD!!!! project (and it's hard!)
dude i hope u don't mind but i'm going to try to make this support th formula's (or something like that)
(link to project)">(link to project)
cooooooooooool check out my projects
Thanks! The costumes really are 16 pixels tall, I'm not sure why it says 20px.
I love it! I see why its in top loved!
6 divided by 7 equals 0.857143
I have a question. Why does it move 16 pixels when acoording to the costumes, their 20 pixels tall?
cool! check out my calculator.
did you check out my new circle guy game?
Sweet add from wadler1:(link to project)">(link to project)
nice UI design!
if I needed to add i would use a calcualtor that went higher but this is good enough.
coolkid17657: Yeah, this is not the most useful calculator. I just wanted to show the 'combo boxes' I made in action. That's hopefully the cooler part of this project. You can use these selectors in your own projects, they have many uses- change the number of players, the difficulty level, the color of the pen... they're not just for calculators.
It's one of the wurst calculators i ever has seen! Search at coolkid17657 and you will find a much better one! (my browser)
cool
Cool beans. Just 5/5 and it works very nicely, well done.
Great project!
cool
This is really nice! Very clean, I love it!
impressive and well kept. it's a very neat design, no flashy distractions, just to the point. also very efficiant.
IT'S BEAUTIFUL!
(link to project)">(link to project)
a very good project. Thanks addZero.
wierd, the sound works online for me...
NICE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! P.S. THBBBBBBBBBBBBBBBBBBT!!!!!
sweet!
COOL!
(link to project)">(link to project) The first ever Scratch Newspaper.
awesome calculator! way better than mine... :(
why is it called 'gui' combo box calculater?
Graphic User Interface
nerdy
ditto (what jens said)
Excellent user-interface study, neatly scripted, too! I added this project to my "Eureka!" gallery, hope you don't mind...
wow good for home work
Great job! Sound didn't work for me after I downloaded it. Graphics are great and I'm sure others will use this in their projects.
AWSOME!
Sakani, yeah that part is kind of trick, you'll notice the first thing is does is that that when it's clicked, it checks to see if the costume is the blue highlight. If it is, then it knows the combo box is open and the user just made a selection. then it uses the current position as the selection. Sorry it's kind of confusing... there's probably a better way to do that.
I have not figured out how to make a down arrow yet, without making another set of costumes- one with the down arrow, or have all of them with down arrow, and just overwrite all of them when the menu is drawn... but that would slow it more. Perhaps I'm missing something, but I think the best option now, is to make it look like a button. put the embossed edge on the background? You're welcome to try.
what i just dont get is how u click it and it becomes what u select. I just dont get the notes on that part. Could u help me out with that
One suggestion: I would make the closed box have a little downward facing arrow so people recognize it as a combobox.
I was thinking of making one of these for my perpetually unfinished Scratch GUI system. I got stuck with these because I didn't know how to keep the current selection displayed in the closed combobox. Great job, I'm deifintely going to find uses for this!
i could make this but it's such a unique idea!
WHOA!!! great idea!
Thanks! Sure! You can use it for whatever you like.
Good idea, indeed! I love it.
Can i use this in my os Spaces?
Nice.