Hi, Im trying to put an interface on top of some games, which are now
playable, but only with asci interface. I have made all the graphics for the
games, but I have some problems. Now, when the program want the user to
interact, it asks for the user to type in some coords, or some digits - I
want to change this so that at the same time as the user should enter the
digits, he should now click on the board - for desired "move". I have build
interfaces for my games, which work just fine - until the integration with
the game.
I have defined
(clim:define-presentation-action print-game-brick
(clim:blank-area nil othello :gesture :select)
(x y)
(print-brick clim:*application-frame* x y "black"))
which is called when I click on the board...
How can I make the program wait for mouse input so that the code over can be
used to set the value of coord-list, which know get its valus when enter is
push after the coord are pushed in ?
(format t "~%Please, enter your coordinates (X Y Z): ")
(setf coord-list (read)) ????
Is this the right way to solve this problem, or is there an another and better
way ?
thanks for your time,
�yvind
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
In article <············@nnrp1.dejanews.com>,
·······@ifi.ntnu.no writes:
> I have defined
> (clim:define-presentation-action print-game-brick
> (clim:blank-area nil othello :gesture :select)
> (x y)
> (print-brick clim:*application-frame* x y "black"))
>
> which is called when I click on the board...
> How can I make the program wait for mouse input so that the code over can be
> used to set the value of coord-list, which know get its valus when enter is
> push after the coord are pushed in ?
>
> (format t "~%Please, enter your coordinates (X Y Z): ")
> (setf coord-list (read)) ????
>
> Is this the right way to solve this problem, or is there an another and better
> way ?
Instead of using READ, you want to use ACCEPT. It'll either read in typed
coordinates or let the use click on any presented coords. (You'll probably
need a converter from brcks to coordinates.)
Mike McDonald
·······@mikemac.com