Geplant ist das ich durch einem Knopf an der taskbar zu einem Board komme(der Knopf öffnet nur ein Board), im Board ist noch ein Knopf der bisher keine Funktion hat--> Soweit wollte ich das machen, klappt nur leider nicht.
UiRageinterface :
PHP Code:
import uiScriptLocale
ROOT = "d:/ymir work/ui/game/"
window = {
"name" : "UiRageinterface",
"x" : SCREEN_WIDTH/2,## position des Board's
"y" : SCREEN_HEIGHT/2,
"style" : ("movable", "float",),## Beweglich
"width" : 100, ## 100 breit
"height": 100, ## 100 hoch
"children" :
(
{
## Board
"name" : "Board",
"type" : "board",
"style" : ("attach",),
"x": 0,
"y": 0,
"width" : 100, ## 100 breit
"height": 100, ## 100 hoch
"children":
(
{## Titelbar
"name": "TitleBar",
"type": "titlebar",
"style": ("attach",),
"x" : 8,
"y" : 8,
"width" : 100-15,
"children":
(
{## TitelBarName
"name": "TitelName",
"type": "text",
"x" : 0,
"y" : 3,
"text": 'Rage - Skillbaum',
"horizontal_align" : "center",
"text_horizontal_align":"center",
},
),
},
{
"name": "Skill_1",
"type": "button",
"text": "SkillBaum",
"x" : 110,
"y" : 292,
#"tooltip_text": "Hier findest du den Skillbaum des Rage-Systems",
"default_image" : ROOT + "TaskBar/System_Button_01.sub",
"over_image" : ROOT + "TaskBar/System_Button_02.sub",
"down_image" : ROOT + "TaskBar/System_Button_03.sub",
},
),
},
),
}
taskbar.py [Unter SystemButton]
PHP Code:
{
"name" : "RageButton",
"type" : "button",
"x" : SCREEN_WIDTH - 178,
"y" : 3 + Y_ADD_POSITION,
"tooltip_text" : "Rage Gui",
"default_image" : ROOT + "TaskBar/System_Button_01.sub",
"over_image" : ROOT + "TaskBar/System_Button_02.sub",
"down_image" : ROOT + "TaskBar/System_Button_03.sub",
},
interfacemodul.py
PHP Code:
self.wndTaskBar.SetToggleButtonEvent(uiTaskBar.TaskBar.BUTTON_RAGE, ui.__mem_func__(self.rage))
def rage(self):
import uirage
GOD = uirage.RageWindow()
GOD.Show()
uirage.py
PHP Code:
import ui
import net
import locale
import uiToolTip
import constInfo
class RageWindow(ui.ScriptWindow):
def __init__(self):
ui.ScriptWindow.__init__(self)
self.isLoaded = 0
def __del__(self):
ui.ScriptWindow.__del__(self)
def Show(self):
self.__loadWindow()
ui.ScriptWindow.Show(self)
def __LoadScript(self, fileName):
pyScrLoader = ui.PythonScriptLoader()
pyScrLoader.LoadScriptFile(self, fileName)
def __LoadWindow(self):
if self.isLoaded == 1:
return
self.isLoaded = 1
try:
if locale.IsARABIC() or locale.IsVIETNAM():
self.__LoadScript(uiScriptLocale.LOCALE_UISCRIPT_PATH + "uirageinterface.py")
else:
self.__LoadScript("UIScript/uirageinterface.py")
except:
import exception
exception.Abort("UiRageinterface.__LoadWindow")
def Destroy(self):
self.ClearDictionary()
def Close(self):
self.Hide()