hi again,
i wonder if we can make a text, a DirectButton…
am i right to write this following code to make a text (like “New game, Load game, ect:.”) a direct button?
import direct.directbase.DirectStart
from panda3d.core import NodePath,TextNode
from direct.gui.OnscreenText import OnscreenText
from direct.showbase.DirectObject import DirectObject
from direct.interval.SoundInterval import SoundInterval
from direct.gui.DirectSlider import DirectSlider
from direct.gui.DirectButton import DirectButton
import sys
title = OnscreenText(text="Game Title",
style=1,fg(1,1,1,1), pos=(50.63, 40.54)
scale=.07)
command_list = [New Game, Load Game, Option, Quit]
def text_is_a_button (self):
self.command_list = DirectButton(pos=(.345, 5.45)
scale=.07, rolloverSound = None, ClickSound = ("sound/gui/guiClick"))
self.command_list.sort
so… possible ?
thanks in advence for any help
greetings,