I'm currently making an achievement gallery for my game, and I could use a bit of a hand with the buttons if anybody can aid me.
This is my first button and everything works in it, it displays the Achievement Icon, the Achievement Name, and when you hover over it, it displays the unlocked reward image that you can click and view full screen.
Code: Select all
button:
sensitive achievement.has("Day1Complete")
style "achievementbutton"
add "images/v22/menu/ItsOnlyMonday.jpg" xalign 0.5 yalign 0.3
text "On the First Day":
style "achievementbuttontext"
hover_foreground "images/v22/menu/secret1.jpg"
action SetVariable("achimg", 1), Show("ShowAch")
Essentially I want button 1 to switch to button 2 on hover
Code: Select all
1. button:
style "achievementlockedbutton"
add "images/v22/menu/ItsOnlyMondayLocked.jpg" xalign 0.5 yalign 0.3
text "On the First Day":
style "achievementlockedbuttontext"
action NullAction()
2. button:
style "achievementlockedbutton"
text "Complete the first day.":
style "achievementlockedguidetext"
action NullAction*()
Code: Select all
style achievementbuttontext:
color "#ffffff"
size 30
xalign 0.5
yalign 0.9
style achievementbutton:
xsize 362
ysize 201
idle_background "images/v22/menu/achievementbackground.jpg"
style achievementlockedbutton:
xsize 362
ysize 201
idle_background "images/v22/menu/achievementlockedbackground.jpg"
style achievementlockedbuttontext:
color="#C0C0C0"
size 30
xalign 0.5
yalign 0.9
style achievementlockedguidetext:
color="#C0C0C0"
size 20
xalign 0.5
Code: Select all
if achievement.has("Day1Complete"):
Code: Select all
else:
Code: Select all
sensitive achievement.has("Day1Complete")
Each Achievement Button will have it's own Icon and Name, and when hovered either the Guide Text or the Unlocked Image, and the background colour also needs to change, this is why I'm not using an imagebutton or a textbutton.
Thanks in advance if there is any way of solving this, I'm a self-taught coder so this has gone beyond my skillset a bit, and I can't find a good tutorial on just buttons on Youtube or anywhere, everybody is using text or image buttons there which I understand.
Thanks,
WP