If you just use sum(6,X,Y by itself, you should have no problems, because that is dependent on none of the other pieces of the GUI. Basically just:


Code:
draw stuff here
sum(6,45,32
interpret Ans and do more stuff here
"interpret answer" being detect which button you clicked on, correct? Which leads me to my next question, if you have a 5px by 5px box located in the top left hand corner that you can click on, is there a more simple way of detecting it besides:

Code:

:if x<6 and y=1 or y=2 or y=3 or y=4 or y=5
:then
:goto XX

x being your X coordinate on click and y being your Y coordinate on click (wherever you would find those: ans(1) ans(2)??)?
easier:

Code:
:if x<6 and max(y={1,2,3,4,5
:goto xx

the one you did wouldn't even work, i think, because you'll have to make brackets around these y= things. Smile
If you're using the SimpleGUIMouse, all you have to go on are coordinates. The GUI system has no idea what you have on the screen, so it's up to you to do detection. If you eventually switch to using OpenGUIStack, PushGUIStack, GUIMouse, CloseGUIStack, you will get a number that indicates which item in the GUI was clicked.
hmmm... I'll research that, Kerm.

Sorunome: Woops! yup, sorry! forgot those. Very Happy

are the X and Y coordinates for the click literally stored under the variables X and Y?
^^I would do that, if I would like to program with the GUI mouse, coz you just have to think a bit once, but after that EVERYTHING is much easier. I just don't use GUI, coz I prefer the standart menues (up - down - Enter). Smile
Even better than that:
Code:
:if x<6 and y>0 Aand y<=5
goto xx
Assuming y is an integer.
The cooardinates are stored a 3-Element list with {X-coordinate, y-coordinate, click}
what is that list called? Or can I just say

Code:

:if {1}>0 and ({2}>0 and {2}<6)
:then
/blah-blah-blah

Which doesn't look right to me.
Sum(6 will return a list in Ans. You can access the individual elements by doing Ans(1)=X Ans(2)=Y Ans(3)=Click. Or, you could take sum(6 and directly store it to a list, such as:
Code:
Sum(6,10,10->L1
And then work with that list as normal.
hmm... interesting thought. I take it that sum(6 doesn't clear the screen?
and another thing, how could I get sum(6 to interact with sum(13 (a menu) or would that be likely to cause lots of problems, including the fact that I won't be able to select anything because sum(6 and sum(13 would be trying to use the arrow keys?

or on the other hand, do they ineract perfectly with each other? I came up with this because I noticed the little "X" at the top of the menu for sum(13. Is that clickable? If so, what does it do? Stop the program? Goto another label? Question Question Question
If you use something like this:

Code:
:sum(6 blah
:sum(13 blah

The GUI mouse will appear and after you press 2nd the GUI menu will appear.

EDIT: The "X" is just design, I think.
I know that. I was thinking about using both at the same time. As in clicking the option in the menu with the mouse as opposed to using the arrow keys to select it.

EDIT: Darn. I guess that is a pretty clear sign then that the mouse doesn't interact with the menu. Sad
You can't do bouth at the same time. If you do

Code:
:sum(6 blah:sum13( blah

it is the same as

Code:
:sum(6 blah
:sum13( blah
If you want some interaction, then you'll need the GUI stack, wich is awesome and quite simple once you get it.
Then I'd guess I'd better see about learning it!

*NOTE: Don't let Kerm see you double posted! He might get mad... Shock *
Ok, good luck with it! If you have any problems then feel free to ask! Smile
Question! Very Happy
Got any good sources on GUI?
Yep! http://dcs.cemetech.net/index.php?title=DCSB_Libs
look at the things sum(7 till sum(12 Smile

WTF?!?!?!?! It was blank till I edited the post!
You could take a look at the source of some of my demo programs if you'd like:

DCSQuad Solver v1.0: http://www.ticalc.org/archives/files/fileinfo/429/42996.html
Lights Out DE: http://www.cemetech.net/forum/viewtopic.php?p=131651
DCSBL Race: http://www.cemetech.net/forum/viewtopic.php?p=101713
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 2 of 4
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement