Hi all! So now I making button for my own game and I have really strange problem.
Currently my button load three images, as you can see:
buttonIdle = new Image("res/images/buttons/" + buttonSize + "IdleButton.png", false, Image.FILTER_NEAREST);
buttonDisabled = new Image("res/images/buttons/" + buttonSize + "DisabledButton.png", false, Image.FILTER_NEAREST);
buttonHighLight = new Image("res/images/buttons/" + buttonSize + "HighLightButton.png", false, Image.FILTER_NEAREST);
My problem is with disabled button image. If disabled button image ‘buttonDisabled’ loads before button highlight image it working correctly, but if disabled button image loads after button highlight image, as you can see here:
buttonIdle = new Image("res/images/buttons/" + buttonSize + "IdleButton.png", false, Image.FILTER_NEAREST);
buttonHighLight = new Image("res/images/buttons/" + buttonSize + "HighLightButton.png", false, Image.FILTER_NEAREST);
buttonDisabled = new Image("res/images/buttons/" + buttonSize + "DisabledButton.png", false, Image.FILTER_NEAREST);
Then if button is disabled I getting white rectangle instead disabled button image. I don’t know why this happening ??? I tried some things to fix that(like make format of image to 24bit and etc.) but it not helped at all! >:(
Maybe someone can help me?
Note: I using Slick2D game library.