Calculator

Non-platform specific questions.

Re: Calculator

Postby Kalladdolf » Wed Dec 19, 2007 8:19 am

yeah, this is just very simple.
you could also add some variables and make them recieve the first two textNumbers.
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score

Re: Calculator

Postby Troodon » Wed Dec 19, 2007 9:18 pm

Fuzzy wrote:
==Kalladdolf== wrote:
Code: Select all
txb3.textNumber = txb1.textNumber + txb2.textNumber;


Although it certainly works, for a serious application I would not suggest using textNumber for things like this. Use properly named global variables.


Unless you use it just for temporary calculations. But if you want to modify/edit/save/load or anything like that you should use the variables like Pete said. Hey, I spotted your sig! :lol: It's just so difficult to call you Fuzzy when you have the same avatar. (You also used to have another avatar before your current one 8) ) Imagine if I would change my name to "Duke of Wellington" or if Makslane would become "MC Megabyte". :lol:
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Re: Calculator

Postby Sgt. Sparky » Wed Dec 26, 2007 6:15 pm

Bee-Ant wrote:Yeah...basic calculator is so easy...but, how about scientific calculator???Which use :
sin, cos, tan, inv, hyp, rand, etc...

I will make a calculator right now, I should have it done soon. (It will have all the basics and maybe more.)
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Re: Calculator

Postby Sgt. Sparky » Thu Dec 27, 2007 12:13 am

Here is a simple calculator.
Here is how you use it:
Use the number keys above the letters to type out the numbers, period is a decimal place.
Use this just like you would a normal calculator.
:D
If anybody wants I can post the source.

Note: No sprites involved.
The background is canvas rendered.

:D :D :D
Attachments
Calculator1.zip
Here is the calculator. =)
(762.36 KiB) Downloaded 121 times
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Re: Calculator

Postby Kalladdolf » Thu Dec 27, 2007 5:21 pm

Cool, I tell ya :D
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score

Re: Calculator

Postby Bee-Ant » Fri Dec 28, 2007 8:24 am

...
cool
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: Calculator

Postby pyrometal » Sat Dec 29, 2007 3:21 am

Just to let you know, I'll be building a scientific calculator and I will post it here soon!

-- Pyro
SPRITE WARRIOR:
Free, open-source & crossplatform pixel art editor (currently under construction).
User avatar
pyrometal
 
Posts: 706
Joined: Wed Nov 28, 2007 4:07 am
Location: Kingston, ON, Canada
Score: 86 Give a positive score

Re: Calculator

Postby Bee-Ant » Sat Dec 29, 2007 3:40 am

OK...I'll wait
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: Calculator

Postby Zehper48 » Sat Dec 29, 2007 2:09 pm

thanks for the demo Sgt. Sparky!
it helped me!
ohhh, ill be impressed if sombody makes a scientific calculator!
I like score
User avatar
Zehper48
 
Posts: 241
Joined: Sun Jun 11, 2006 1:34 am
Location: Advanced Noob
Score: 4 Give a positive score

Re: Calculator

Postby Sgt. Sparky » Sat Dec 29, 2007 9:55 pm

Zehper48 wrote:thanks for the demo Sgt. Sparky!
it helped me!
ohhh, ill be impressed if sombody makes a scientific calculator!

Somebody could just use my calculator as a base and add extra buttons for scientific functions. (Ge has a few scientific functions.)
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Re: Calculator

Postby pyrometal » Mon Dec 31, 2007 12:47 am

Well here's the basis file with most functions for scientific calculators. I got really bored of this project so I didn't do the most thorough job, but you can still appreciate it I guess. Feel free to build on this base file as you please.

Just to let you know, there are 8 inputs, A to H, but only A and B are in use. The intent was to have them for more complex functions such as scalar and vector products of vectors among other things... But I really don't feel like it, I have to keep working on my other projects.

GE Calculator.zip
Feel free to expand and modify.
(43.63 KiB) Downloaded 106 times
SPRITE WARRIOR:
Free, open-source & crossplatform pixel art editor (currently under construction).
User avatar
pyrometal
 
Posts: 706
Joined: Wed Nov 28, 2007 4:07 am
Location: Kingston, ON, Canada
Score: 86 Give a positive score

Re: Calculator

Postby pyrometal » Sat Jan 05, 2008 1:35 am

Well, it looks like this calculator of mine received no attention at all... Sorry for bumping but I though it was justified given that I don't like to work for no reason! lol
SPRITE WARRIOR:
Free, open-source & crossplatform pixel art editor (currently under construction).
User avatar
pyrometal
 
Posts: 706
Joined: Wed Nov 28, 2007 4:07 am
Location: Kingston, ON, Canada
Score: 86 Give a positive score

Re: Calculator

Postby Bee-Ant » Sat Jan 05, 2008 8:41 am

Nice job!pyro :D
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: Calculator

Postby pyrometal » Sun Jan 06, 2008 4:23 am

Thanks! Always glad to help out!
SPRITE WARRIOR:
Free, open-source & crossplatform pixel art editor (currently under construction).
User avatar
pyrometal
 
Posts: 706
Joined: Wed Nov 28, 2007 4:07 am
Location: Kingston, ON, Canada
Score: 86 Give a positive score

Previous

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron