So I am attempting to make a pause screen and I have a help button and a play game button set up but they always are on top of each other help?
Oh and here is teh code:
import direct.directbase.DirectStart
from direct.gui.OnscreenText import OnscreenText
from direct.gui.DirectGui import *
from panda3d.core import TextNode
#bk_text
ttle= "Project Hero Studios Presents: Shadow of the Panda"
PG= "Play Game"
HP= ""
CR= "Credits"
HP1= ""#Collect all the crystals
HP2= ""#Up arrow moves forward
HP3= ""#Left and Right arrow Keys turn
HP4= ""#A and S keys rotate Camera
HP5= ""#P key pauses game
CR1= ""#Programmed by Michael Manahan
CR3= ""#Animations and Models by Panda3D
CR2= ""#Story by Michael Manahan
CR4= ""#Thank you for giving this game a shot!
Back=""#Back
#textObject
#Title
textttle = OnscreenText(text = ttle, pos = (0,.5),
scale = .1,fg=(1,1,1,1),align=TextNode.ACenter,mayChange=1)
#Play Game
textPG = OnscreenText(text = PG, pos = (0,.25),
scale = .1,fg=(1,1,1,1),align=TextNode.ACenter,mayChange=1)
#Help
textHP = OnscreenText(text = HP, pos = (0,-.75),
scale = .05,fg=(1,1,1,1),align=TextNode.ACenter,mayChange=1)
textHP1 = OnscreenText(text = HP1, pos = (0,-.15),
scale = .05,fg=(1,1,1,1),align=TextNode.ACenter,mayChange=1)
textHP2 = OnscreenText(text = HP2, pos = (0,-.30),
scale = .05,fg=(1,1,1,1),align=TextNode.ACenter,mayChange=1)
textHP3 = OnscreenText(text = HP3, pos = (0,-.45),
scale = .05,fg=(1,1,1,1),align=TextNode.ACenter,mayChange=1)
textHP4 = OnscreenText(text = HP4, pos = (0,-.60),
scale = .05,fg=(1,1,1,1),align=TextNode.ACenter,mayChange=1)
textHP5 = OnscreenText(text = HP5, pos = (0,-.75),
scale = .05,fg=(1,1,1,1),align=TextNode.ACenter,mayChange=1)
###Credits
##textCR = OnscreenText(text = CR, pos = (0,-.25),
## scale = .05,fg=(1,0.5,0.5,1),align=TextNode.ACenter,mayChange=1)
##textCR1 = OnscreenText(text = CR1, pos = (0,-.25),
## scale = .05,fg=(1,0.5,0.5,1),align=TextNode.ACenter,mayChange=1)
##textCR2 = OnscreenText(text = CR2, pos = (0,0),
## scale = .05,fg=(1,0.5,0.5,1),align=TextNode.ACenter,mayChange=1)
##textCR3 = OnscreenText(text = CR3, pos = (0,0),
## scale = .05,fg=(1,0.5,0.5,1),align=TextNode.ACenter,mayChange=1)
##textCR4 = OnscreenText(text = CR4, pos = (0,0),
## scale = .05,fg=(1,0.5,0.5,1),align=TextNode.ACenter,mayChange=1)
##
###Back
##textBack = OnscreenText(text = Back, pos = (0,0),
## scale = .05,fg=(1,0.5,0.5,1),align=TextNode.ACenter,mayChange=1)
##
def setText():
PG = ""
textPG.setText(PG)
HP = ""
textHP.setText(HP)
HP1= "Collect all the crystals"
textHP1.setText(HP1)
HP2= "Up arrow moves forward"
textHP2.setText(HP2)
HP3= "Left and Right arrow Keys turn"
textHP3.setText(HP3)
HP4= "A and S keys rotate Camera"
textHP4.setText(HP4)
HP5= "P key pauses game"
textHP5.setText(HP5)
## CR = ""
## textCR.setText(CR)
## CR1= "Programmed by Michael Manahan"
## textCR1.setText(CR1)
## CR2= "Story by Michael Manahan"
## textCR2.setText(CR2)
## CR3= "Animations and Models by Panda3D"
## textCR3.setText(CR3)
## CR4= "Thank you for giving this game a shot!"
## textCR4.setText(CR4)
## Back="Back"
## textBack.setText(Back)
# Add button
a= DirectButton(text = ("Play Game", "Play Game", "Play Game", "disabled"),scale=.1,
command=setText)
b = DirectButton(text = ("Help", "Help", "Help", "disabled"),scale=.1,
command=setText)
##c = DirectButton(text = ("Credits", "Credits", "Credits", "disabled"), pos = (0,-.5),scale=.1,
##command=setText)
run()