EDIT: When the game has been exported, the Button's background image is correctly viewed. The problem is only when previewing in Construct 3! Any ideas why it happens? Thank you in advance! :)
Hello,
I'm trying to customize the look of a Button using CSS. In particular, I want to replace the button image with a custom one. Here's what I am doing:
- Create a buttons.css file included in the project
- Write only this rule in buttons.css:
#button {
background: url(button.png) no-repeat;
}
- Import a button.png image as another included file
- Create an instance of a Button object with ID "button"
- At start of layout, use the Browser object's Load stylesheet from "buttons.css" action
- When I play the game, the button's image is not the default one anymore, but it is a white square image, instead of the provided button.png image.
Any advices? Other CSS rules, such as "background-color: red;" work correctly, so the problem only seems to be with background image. Also, I managed to make the buttons.css work outside of Construct 3, so it should be syntatically correct I think.
Thank you in advance for your help! :)
EDIT: When the game has been exported, the Button's background image is correctly viewed. The problem is only when previewing in Construct 3! Any ideas why it happens? Thank you in advance! :)