Hi,
Versuche das Tamashii Shining System zu implementieren und bekomme die folgende fehlermeldung wenn ich mein kostum fenster aufmache:
Code
- uiInventory.py(line:78) __LoadWindow
- ui.py(line:2917) GetChild
- CostumeWindow.LoadWindow.BindObject - <type 'exceptions.KeyError'>:'ShiningSlot'
- 0329 12:56:25281 :: ============================================================================================================
- 0329 12:56:25281 :: Abort!!!!
Meine uiInventory.py von line 62 -> line 82:
Code
- def __LoadWindow(self):
- if self.isLoaded == 1:
- return
- self.isLoaded = 1
- try:
- pyScrLoader = ui.PythonScriptLoader()
- pyScrLoader.LoadScriptFile(self, "UIScript/CostumeWindow.py")
- except:
- import exception
- exception.Abort("CostumeWindow.LoadWindow.LoadObject")
- try:
- wndEquip = self.GetChild("CostumeSlot")
- self.GetChild("TitleBar").SetCloseEvent(ui.__mem_func__(self.Close))
- wndShining = self.GetChild("ShiningSlot")
- changeButton = self.GetChild("ChangeButton")
- costumePage = self.GetChild("Costume_Page")
- shiningPage = self.GetChild("Shining_Page")
- board = self.GetChild("board")
Meine ui.py von line 2900 -> line 2920:
Python
- class ScriptWindow(Window):
- def __init__(self, layer = "UI"):
- Window.__init__(self, layer)
- self.Children = []
- self.ElementDictionary = {}
- def __del__(self):
- Window.__del__(self)
- def ClearDictionary(self):
- self.Children = []
- self.ElementDictionary = {}
- def InsertChild(self, name, child):
- self.ElementDictionary[name] = child
- def IsChild(self, name):
- return self.ElementDictionary.has_key(name)
- def GetChild(self, name):
- return self.ElementDictionary[name]
- def GetChild2(self, name):
- return self.ElementDictionary.get(name, None)
Meine uiscript customewindow.py:
Code
- import uiScriptLocale
- import item
- COSTUME_START_INDEX = item.COSTUME_SLOT_START
- SHINING_START_INDEX = item.SHINING_SLOT_START
- window = {
- "name" : "CostumeWindow",
- "x" : SCREEN_WIDTH - 175 - 225,
- "y" : SCREEN_HEIGHT - 95 - 620,
- "style" : ("movable", "float",),
- "width" : 146,
- "height" : 180 + 37,
- "children" :
- (
- {
- "name" : "board",
- "type" : "board_with_titlebar",
- "style" : ("attach",),
- "x" : 0,
- "y" : 0,
- "width" : 146,
- "height" : 180 + 37,
- "title" : uiScriptLocale.COSTUME_WINDOW_TITLE,
- "children" :
- (
- ## Equipment Slot
- {
- "name" : "Costume_Base",
- "type" : "image",
- "x" : 13,
- "y" : 38,
- "image" : uiScriptLocale.LOCALE_UISCRIPT_PATH + "costume/new_costume_bg.jpg",
- "children" :
- (
- {
- "name" : "Costume_Page",
- "type" : "window",
- "style" : ("attach",),
- "x" : 0,
- "y" : 0,
- "width" : 127,
- "height" : 175,
- "children" :
- (
- {
- "name" : "CostumeSlot",
- "type" : "slot",
- "x" : 0,
- "y" : 0,
- "width" : 127,
- "height" : 175,
- "slot" : (
- {"index":COSTUME_START_INDEX+0, "x":49, "y":40, "width":29, "height":64},
- {"index":COSTUME_START_INDEX+1, "x":49, "y":3, "width":29, "height":32},
- {"index":COSTUME_START_INDEX+2, "x":10, "y":15, "width":32, "height":96},
- {"index":COSTUME_START_INDEX+3, "x":79, "y":132, "width":32, "height":32},
- {"index":COSTUME_START_INDEX+4, "x":2, "y":132, "width":32, "height":32},
- ),
- },
- ),
- },
- {
- "name" : "Shining_Page",
- "type" : "window",
- "style" : ("attach",),
- "x" : 0,
- "y" : 0,
- "width" : 127,
- "height" : 175,
- "children" :
- (
- {
- "name" : "ShiningSlot",
- "type" : "slot",
- "x" : 0,
- "y" : 0,
- "width" : 127,
- "height" : 175,
- "slot" : (
- #Waffe
- {"index":SHINING_START_INDEX+0, "x":16, "y":79, "width":32, "height":32},
- {"index":SHINING_START_INDEX+1, "x":16, "y":47, "width":32, "height":32},
- {"index":SHINING_START_INDEX+2, "x":16, "y":15, "width":32, "height":32},
- #Armor
- {"index":SHINING_START_INDEX+3, "x":65, "y":79, "width":32, "height":32},
- {"index":SHINING_START_INDEX+4, "x":65, "y":47, "width":32, "height":32},
- #Special
- {"index":SHINING_START_INDEX+5, "x":65, "y":12, "width":32, "height":32},
- ),
- },
- ),
- },
- ),
- },
- {
- "name" : "ChangeButton",
- "type" : "button",
- "x" : 113,
- "y" : 38,
- "tooltip_text" : uiScriptLocale.CHANGE_SHINING,
- "default_image" : "uiscript/refresh/refresh_normal.tga",
- "over_image" : "uiscript/refresh/refresh_hover.tga",
- "down_image" : "uiscript/refresh/refresh_pressed.tga",
- },
- ),
- },
- ),
- }
Danke