Community

SCI Programming => Mega Tokyo SCI Archive => Topic started by: Pikachu14 on March 20, 2003, 01:05:00 PM

Title: Useless point-and-click thingy I made
Post by: Pikachu14 on March 20, 2003, 01:05:00 PM
http://helmetedrodent.port5.com/pncint.sc (http://helmetedrodent.port5.com/pncint.sc)

That is a buttonbar-less implementation of what could have been SCI1 in EGA. I'm not gonna continue development of this for quite obvious reasons.

To add things that respond to being clicked, pretend to use RMBLOOK.SC.
First, add (use "pncint") to your room script, at the top like always.
Then, define your stuff like this:
Code: [Select]
(instance aKey of LookAtView
    (properties
        view 5
        x 50
        y 100
        parseName "Key" //At the time it seemed the most logical thing to do...
    )
)
Add a (use "pncint") to MAIN.SC and add "gCurrentVerb" to the big list of variables at the start.

Add the following instance to MAIN.SC:
Code: [Select]
(instance thePNC of PointAndClickHandler
    (properties
        modifiers   3
    )
)
Then, find the "handleEvent" method in MAIN.SC and add
Code: [Select]
(thePNC:handleEvent(pEvent))to it. It would then look like this:
Code: [Select]
(method (handleEvent pEvent)
   (super:handleEvent(pEvent))
   (thePNC:handleEvent(pEvent)) //Handle the Point And Click interface...
   (if((<> (send pEvent:type) evSAID) or (send pEvent:claimed))
       return(TRUE)
   )
Ofcourse, you'll need some cursors too. The walking cursor goes in CURSOR.000 and looking in 001 etc.