Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Author Topic: Hide main cursor when an inventory item is selected  (Read 4047 times)

0 Members and 1 Guest are viewing this topic.

anarchist

  • Regular poster
  • ***
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 212
    • View Profile
Hide main cursor when an inventory item is selected
« on: May 28, 2015, 08:38:53 PM »

I have several inventory items for which I have created cursor sprites. When I select an inventory item I want to hide the main cursor and only show the item cursor. Some item cursors are smaller than the main cursor which results in both cursors being visible.

I have tried adding the following code in game.script:

Code: WME Script
  1. // clicking an inventory item
  2. else if(ActObj.Type == "item" && Item == null)
  3. {
  4.         Game.SelectedItem = ActObj;
  5.         Game.RemoveCursor();
  6. }
  7.  

This removes the main cursor when the mouse is not over a scene entity or actor. But when the cursor hovers over a scene entity or actor, the entity specific cursor appears together with the item's cursor.

A solution would be to make all item cursor sprites larger than the scene entity cursor sprites. But I wonder if there is an easy way through script.
Logged

Dan Peach

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 100
    • View Profile
    • Viperante - Game Development
Re: Hide main cursor when an inventory item is selected
« Reply #1 on: May 30, 2015, 02:17:42 PM »

Can't you just set the item cursor in the item definition file?

eborr

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 196
    • View Profile
Re: Hide main cursor when an inventory item is selected
« Reply #2 on: June 01, 2015, 09:28:18 AM »

there is an attribute CursorCombined try setting it to False
Logged

anarchist

  • Regular poster
  • ***
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 212
    • View Profile
Re: Hide main cursor when an inventory item is selected
« Reply #3 on: June 01, 2015, 06:24:04 PM »

That worked, thanks a lot eborr!
Logged
 

Page created in 0.021 seconds with 22 queries.