logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
WrittenLabyrinth  
#1 Posted : Tuesday, November 27, 2018 1:35:51 AM(UTC)
WrittenLabyrinth

Rank: Newbie

Groups: Registered
Joined: 11/27/2018(UTC)
Posts: 0
United States
Location: Oregon

I'm trying to change the mouse cursor to pointer/hand for button hover events.

Code:


    var userButton = me.GUI_Object.extend({
      init: function(image, x, y, z, goToState) {
        var settings = {};
        settings.image = image;
        this._super(me.GUI_Object, "init", [x, y, settings]);
        this.pos.z = z;
        this.goToState = goToState;
      },
      onClick: function(event) {
        me.state.change(this.goToState);
        // don't propagate the event
        return false;
      },
      onOver: function(event){
        document.body.style.cursor = "pointer";
      },
      onOut: function(event){
        document.body.style.cursor = "default";
      },
    });


The above code works but is very slow and inconsistent.

Is there a better method I should be using?

thanks
Dave


pripankaj  
#2 Posted : Monday, February 11, 2019 4:37:33 PM(UTC)
pripankaj

Rank: Newbie

Groups: Registered
Joined: 2/11/2019(UTC)
Posts: 0
India
Location: aurangabd

thanx for sharing.......
abhijit123  
#3 Posted : Wednesday, March 6, 2019 11:02:13 AM(UTC)
abhijit123

Rank: Newbie

Groups: Registered
Joined: 3/6/2019(UTC)
Posts: 0
India
Location: india

thanks for sharing
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.