This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
soccer16x's profile picture

[CC1.5]Simple Clickable Calculator 1.2

Started by soccer16x, 31 January 2013 - 04:38 PM
soccer16x #1
Posted 31 January 2013 - 05:38 PM
So what I have created is a simple clickable calculator for use on an advanced computer(and only an advanced computer). There's nothing special, its just a calculator, as of right now it currently does basic calculator functions.

Current Version: 1.2
Pastebin Link: http://pastebin.com/ZAkFvfbg
If you'd like to directly put this on your computer do: pastebin get ZAkFvfbg calculator(or whatever you want to call it)

What the calculator looks like:
Spoiler[attachment=986:Screen shot 2013-02-02 at 12.28.49 PM.png]

Code(Mainly based off of a Direwolf20 code, but fit to work with the computer and fit to function as a calculator.)
SpoilerLook here if you'd like to see the code: http://pastebin.com/ZAkFvfbg

Planned Features:
Adding a Help button -comp. ver 1.1
Adding more advanced functions (Depends on what you want, if you want a new calculator function request it.)
Add keyboard support
See what I can do about dropping .0 if the output ends in a 0 -comp. ver 1.1
Saving the color that you choose for future us -comp. ver 1.2

Current Bugs:
After completing an operation, you can not do anything to the output, and the output will stay displayed till you write over it.So currently just click hit C after every operation if that bothers you squashed in ver 1.1: thanks to remiX, now will just add to what was outputed, and also can do operations right to output, unlike before.

——————————————————————————————————————————————————

Changelog:

Version 1: Initial Release
Version 1.1: Added new button: F -replaces the current functions menu with new functions, the new functions are: ^ -exponents and rt - square roots number
Added new button: H -displays help, currently though doesn't say anything helpful :P/>/>
Added new button: c -goes to a new part that allows you to select colors
Added: Colors
Version 1.2: Added saving state of color, so quitting out won't reset the color
remiX #2
Posted 31 January 2013 - 07:10 PM
Nice work :P/>
theoriginalbit #3
Posted 31 January 2013 - 10:11 PM
nice. I like the simplicity of the gui.
Mailmanq! #4
Posted 01 February 2013 - 03:48 AM
Good job, but do you think you could add and exponent and root button?
Cranium #5
Posted 01 February 2013 - 03:54 AM
Wow, that's quite simple, and clean looking!
soccer16x #6
Posted 01 February 2013 - 05:53 AM
Yeah I can see what I can do about exponents, when I get a chance ill add it in, shouldn't be too hard.
remiX #7
Posted 01 February 2013 - 06:36 AM
Also change the colours or have an option to set the colours or what ever :P/> White is boring (imo)
soccer16x #8
Posted 01 February 2013 - 06:37 AM
Also change the colours or have an option to set the colours or what ever :P/>/> White is boring (imo)

Yeah was thinking about doing that already.
Chris54721 #9
Posted 01 February 2013 - 08:49 AM
Nice, I like the simple GUI.
soccer16x #10
Posted 03 February 2013 - 06:34 AM
Update to Version 1.1
——————————
Changelog:

Added new button: F -replaces the current functions menu exposes new functions: ^ -exponents and rt - square roots number
Added new button: H -displays help, currently though doesn't say anything helpful :P/>
Added new button: c -goes to a new part that allows you to select colors
Added: Colors

Also: Thanks to remiX for all the help on getting the functionality of the F and c buttons working and for squashing a bug. :)/>
Skullblade #11
Posted 03 February 2013 - 06:59 AM
Looks cool and is a good little program
soccer16x #12
Posted 08 February 2013 - 05:02 PM
Update to version 1.2
—————————
Changelog:

Added: saving state of color, so quitting out won't reset the color
figgycity50 #13
Posted 08 April 2013 - 07:34 AM
Can i use this in my OS linked here - http://www.computercraft.info/forums2/index.php?/topic/11935-wipospublic-alphacc-v152-keyos-alpha-01/page__hl__keyos__fromsearch__1
soccer16x #14
Posted 08 April 2013 - 06:13 PM
Yes, I give you permission to use it in your OS just make sure to give me appropriate credit for it and provide a link to this page somewhere.
figgycity50 #15
Posted 08 April 2013 - 10:59 PM
Yes, I give you permission to use it in your OS just make sure to give me appropriate credit for it and provide a link to this page somewhere.
Thanks. i'll add the credit in the about page.
NOTUSEDPLEASEDELETE #16
Posted 02 August 2013 - 09:14 PM
I can make it usable for a normal computer if you give me permission to edit your code. And great work on it!
soccer16x #17
Posted 03 August 2013 - 12:46 AM
I can make it usable for a normal computer if you give me permission to edit your code. And great work on it!

Go ahead, I've not done anything with this for awhile so go ahead, just credit my work and everything and thanks, oh and if you don't mind when you post yours would you mind linking it here?
lifewcody #18
Posted 03 August 2013 - 11:38 AM
Now i dont have to open windows calculator :D/>
Kristaps220 #19
Posted 03 August 2013 - 02:50 PM
Nice job, soccer16x! I really like your calculator! :)/> Sometimes I just need to calculate how much dirt I have ^_^/>