Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: SetCursor on MouseEntry/MouseLeave  (Read 4480 times)

0 Members and 1 Guest are viewing this topic.

The Man

  • Occasional poster
  • **
  • Karma: 1
  • Offline Offline
  • Posts: 67
    • View Profile
SetCursor on MouseEntry/MouseLeave
« on: December 13, 2013, 12:49:14 PM »

Hi everybody! I tried to search something specific about what I'm trying to do, but couldn't find it!
Simply, when the cursor enters a region of the scene it should change into another cursor. Then when the cursor exit the region it has to turn back to its original shape. I tried this code and I thought it would work:

Code: [Select]
on "MouseEntry"
{
Game.SetCursor("sprites\system\mouse.sprite");
}

on "MouseLeave"
{
Game.SetCursor("sprites\system\Cursore.sprite");
}

...but obviously, it does not work. So what am I doing wrong? Can anyone help me?!
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: SetCursor on MouseEntry/MouseLeave
« Reply #1 on: December 13, 2013, 02:30:20 PM »

Let me ask you why wouldn't you simply change the cursor image in the SceneEdit's node? It's much easier.

Regarding your code, you should change SetActiveCursor() not SetCursor() because it's active when you hover over the region.
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

The Man

  • Occasional poster
  • **
  • Karma: 1
  • Offline Offline
  • Posts: 67
    • View Profile
Re: SetCursor on MouseEntry/MouseLeave
« Reply #2 on: December 13, 2013, 02:47:14 PM »

Forgive me, but I don't see the option for changing the cursor image in a region!
What I wanted to do was the cursor to assume a certain image when inside a region without having to set the sprite for every node that's inside that region! Anyway, thank you!
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: SetCursor on MouseEntry/MouseLeave
« Reply #3 on: December 13, 2013, 04:18:56 PM »

If you click at your region in the SceneEdit, you will see on the left side a properties panel (Name, Caption, Sprite, Cursor, Font, Item).

Changing SPRITE will (I believe) do what you want. :)
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

The Man

  • Occasional poster
  • **
  • Karma: 1
  • Offline Offline
  • Posts: 67
    • View Profile
Re: SetCursor on MouseEntry/MouseLeave
« Reply #4 on: December 13, 2013, 04:56:43 PM »

If you click at your region in the SceneEdit, you will see on the left side a properties panel (Name, Caption, Sprite, Cursor, Font, Item).

Changing SPRITE will (I believe) do what you want. :)

I'm sorry, I understood what I was doing wrong. I was creating a Region and not a Region Entity! That is why I could not see those options!

Thank you very much, you're always a big help!
Logged
 

Page created in 0.038 seconds with 24 queries.