How to update mouse cursor status in elegant way?

Post your help queries and engine programming questions here

How to update mouse cursor status in elegant way?

Postby Cipher » Thu May 14, 2015 5:07 am

Hi,

I check out API document and source code and I can't find any method to update mouse cursor status.
right now, I use a dummy way to fix the problem.

new IgeUiButton()
.applyStyle({
'width': 20,
'height': 20,
'top': 10,
'right': 10
})
.texture(ige.client.gameTextures.iconCross2)
.mount(self)
.mouseOver(function(event, control){
$('html,body').css('cursor','pointer');
})
.mouseOut(function(){
$('html,body').css('cursor','auto');
})
.mouseDown(function(event, control){
self.destroy();
});


have any elegant way to fix the problem?
any reply and guidance will be appreciate.
I bought a license, I should get better service and response.
Cipher
 
Posts: 11
Joined: Fri May 08, 2015 2:59 am
Location: Taiwan, Taipei

Re: How to update mouse cursor status in elegant way?

Postby rob » Tue Sep 29, 2015 4:36 pm

The mouse pointer/cursor is not controlled via the engine.

You can listen to an event and then modify the page body style via:

Code: Select all
document.body.style.cursor = 'pointer';


Then change it back when done:

Code: Select all
document.body.style.cursor = 'default';
CEO & Lead Developer
Irrelon Software Limited
http://www.isogenicengine.com
User avatar
rob
Site Admin
 
Posts: 316
Joined: Tue Oct 22, 2013 5:08 pm


Return to Help & Questions

Who is online

Users browsing this forum: No registered users and 1 guest