Author Topic: Using mouse in SCI.  (Read 2718 times)

0 Members and 1 Guest are viewing this topic.

Offline Eigen

Using mouse in SCI.
« on: January 15, 2003, 12:02:27 PM »
In the beginning of Larry 3 there you can select right/wrong answers with you mouse cursor. How can I make that.  :P



-Eigen  


Artificial Intelligence Competition

Offline Tom

Re:Using mouse in SCI.
« Reply #1 on: January 15, 2003, 12:04:36 PM »
I belive you move the mouse over the answers and click them with the left button.

Offline Eigen

Re:Using mouse in SCI.
« Reply #2 on: January 15, 2003, 12:06:28 PM »
No I mean how can I make thing like that in my own game.




-Eigen
Artificial Intelligence Competition

Offline Lightfoot

Re:Using mouse in SCI.
« Reply #3 on: January 15, 2003, 02:44:49 PM »
Here is a rough copy of what I use...

Code: [Select]
(class Options of Dialog
          (properties
          Active FALSE
          bDialog 0
          )
          (method(draw)
                   (var hDialog, hIcon)
                   = hDialog (Dialog:new())
                   (send hDialog:
                               text("Options")
                   )
                   = hIcon (DIcon:new())
                   (send hIcon:
                             value(OPT_EXIT)
                   )
                   (send hDialog:add(hIcon) setSize() open(nwNORMAL 15)
                   = Active TRUE
                   = bDialog hDialog
          )
          (method(hide)
                  (send bDialog:dispose())
                  = Active FALSE
          )
          (method(handleEvent pEvent)
               (var temp0, temp1)
               = temp0 (send bDialog:first())
               (while(temp0)
                        = temp1 NodeValue(temp0)
                        (if( (<= (send pEvent:x) (send temp1:nsRight)) and (< (send temp1:nsLeft) (send pEvent:x)) and (<= (send pEvent:y) (send temp1:nsBottom)) and (< (send temp1:nsTop) (send pEvent:y)) )
                                    (self:doAction( (send temp1:value) )
                       )
                       = temp0 (send bDialog:next(temp0))
               )
          )
         (method(doAction action)
                   (switch(action)
                             (case OPT_EXIT
                                       (self:hide())
                             )
                   )
          )
)

Keep in mind this code I typed from my memory with no reference, so if it doesn't work exactly that's why. All of my game is at home where I have no internet connection, none of this code is available to me here, at work.
« Last Edit: January 15, 2003, 02:45:43 PM by Lightfoot »
Ich lerne deutsch


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.02 seconds with 17 queries.