Re: mouse

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hello Ferdinand,

It seems you had your x and y coordinants mixed up.
Also in mode 19 the x coordinant needs to be divided
by 2 or it will be twice as far right as it should
be.

later,
Lewis Townsend

--- Revised code ---
-- I hope hotmail doesn't mess up my pretty indentation :)
include mouse.e
include graphics.e

object mode,event

procedure tile()
  pixel (repeat( 1,11 ), event[2..3]) -- was{event[3],event[2]}
end procedure

mode = graphics_mode(19)
mouse_pointer(1)
while 1 do
  event = get_mouse()
  if get_key()=27 then
    exit
  end if
  if sequence(event) then
    if and_bits(event[1],LEFT_DOWN) then
      event [2] /= 2            -- divide x coord by 2 in mode 19
      tile()
    end if
  end if
end while
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at
http://profiles.msn.com.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu