AbsoluteMouse is a white box in StandardGame

I expect the solution to this to be painfully simple, but I haven't been able to crack it after several hours. What I have going is a simple test using StandardGame which enters into 'MenuState' which extends from GameState. I have cut and pasted absolute mouse code from different tests (including TestAbsoluteMouse) and other sources but I can't get the mouse to show a texture. All I'm getting is a white box where the cursor should be.



Note: the white box is the correct size for the texture and the mouse functions as expected.



I've tried putting the code through the GameTaskQueueManager update and still no change. I've tried lights, I've tried everything I know (granted, not much on this).



The TestAbsoluteMouse works fine, but not my test!!

Can you post the relevent code here and perhaps we can figure it out?

Sure, it be up in about 30 minutes.

Here it is.



Main class

   public static StandardGame Game;

   public Main() {

      super();

      Game = new StandardGame("Game");
      Game.setBackgroundColor(new ColorRGBA(0.3f, 0.3f, 0.35f, 1.0f));
      Game.start();

      MenuState menu = new MenuState("MenuState");
      GameStateManager.getInstance().attachChild(menu);
      menu.activate();
   }



MenuState class:


   protected InputHandler input;

   protected AbsoluteMouse mouse;

   /**
    * Creates a new BasicGameState with a given name.
    *
    * @param name
    *

I don't know much about cursor textures, but have you verified the texture isn't null?  Also, have you tried putting the entire creation of MenuState in the update loop? That's the only thing I can think of unless it has a problem with the cursor texture being changed after startup, but I wouldn't expect that would be a problem.

Perhaps the fact that the TextureState is disabled?  :slight_smile:


cursor.setEnabled(false);

hehe…nice work renanse.  XD

Hahaha…thats awesome! It works now.


Perhaps the fact that the TextureState is disabled?


Oh the wasted time...

What would I do without you guys?