What I am trying to accomplish is the creation of a button that contains an image and a piece of text. When either is in a hovered state, the button should show the hovered version of the image. A visual representation is below:
The triangle represents the button's idle and hover images while the text is obviously the text. As mentioned, hovering the button or the text should show the image's hovered state.
Taking examples and trying to work backwards has been fruitless, so I tried to start small.
Code: Select all
screen mybutton():
button:
action NullAction()
add "images/2_idle_right.png" xpos 910 ypos 450
text "The text of the button" xpos 1140 ypos 615
Code: Select all
button:
action NullAction()
add "images/2_idle_right.png" xpos 910 ypos 450
text "The text of the button" xpos 1140 ypos 615
button:
add "images/2_idle_left.png" xpos 700 ypos 445
text "Left text dklfjakolsdfjlkajslkdjf;alskjf" xpos 710 ypos 615 xalign 1.0
action NullAction()
So, this is the problem. To go further, I need to understand how to create two buttons, each with separate text, that have hover and idle images. It will look similar to:
As I said, I'm a rookie and clearly missing a fundamental piece of the button pie here. Any help would be greatly appreciated.