[NEW] Inventario

Topic created · 3 Mensajes · 1467 Visitas
  • **Bueno las imagenes no son mias pero los archivos tenian muchos errores que arregle y archivos que faltaban y me tome la molestia de dejarlo todo OK **

    Busca en ui.py

    def SetCloseEvent(self, event):
    self.btnClose.SetEvent(event)

    Agregar :
    [php]class TitleBar2(Window):

    BLOCK_WIDTH = 32
    BLOCK_HEIGHT = 23

    def __init__(self):
    Window.__init__(self)
    self.AddFlag("attach")

    def __del__(self):
    Window.__del__(self)

    def MakeTitleBar(self, width, color):

    ## ÇöŔç Color´Â »çżëÇĎ°í ŔÖÁö ľĘŔ˝

    width = max(64, width)

    imgLeft = ImageBox()
    imgCenter = ExpandedImageBox()
    imgRight = ImageBox()
    imgLeft.AddFlag("not_pick")
    imgCenter.AddFlag("not_pick")
    imgRight.AddFlag("not_pick")
    imgLeft.SetParent(self)
    imgCenter.SetParent(self)
    imgRight.SetParent(self)

    if locale.IsARABIC():
    imgLeft.LoadImage("locale/ae/ui/pattern/titlebar_left.tga")
    imgCenter.LoadImage("locale/ae/ui/pattern/titlebar_center.tga")
    imgRight.LoadImage("locale/ae/ui/pattern/titlebar_right.tga")
    else:
    imgLeft.LoadImage("locale/yang.tga")
    imgCenter.LoadImage("locale/yang.tga")
    imgRight.LoadImage("locale/yang.tga")

    imgLeft.Show()
    imgCenter.Show()
    imgRight.Show()

    btnClose = Button()
    btnClose.SetParent(self)
    btnClose.SetUpVisual("locale/1close.tga")
    btnClose.SetOverVisual("locale/2close.tga")
    btnClose.SetDownVisual("locale/1close.tga")
    btnClose.SetToolTipText(locale.UI_CLOSE, 0, -23)
    btnClose.Show()

    self.imgLeft = imgLeft
    self.imgCenter = imgCenter
    self.imgRight = imgRight
    self.btnClose = btnClose

    self.SetWidth(width)[/php]

    Despues buscar elif Type == "titlebar"
    Agregar :
    [php]elif Type == "titlebar2":
    parent.Children[Index] = TitleBar2()
    parent.Children[Index].SetParent(parent)
    self.LoadElementTitleBar(parent.Children[Index], ElementValue, parent)[/php]

    Luego buscar def LoadElementTitleBar(self, window, value, parentWindow): y agregar :

    [php]def LoadElementTitleBar2(self, window, value, parentWindow):

    if FALSE == self.CheckKeyList(value["name"], value, self.TITLE_BAR_KEY_LIST):
    return FALSE

    window.MakeTitleBar(int(value["width"]), value.get("color", "red"))
    self.LoadDefaultData(window, value, parentWindow)

    return TRUE[/php]

    Descarga : https://www.mediafire.com/?l5z6919qmm16git

    El .rar contiene lo siguiente
    -Locale
    -Root
    -Un diff para el Game

    Agradecer no cuesta nada

  • Lo probe y quedo genial , ahi ta tu
    +1

  • lo provare muy lindo si funciona te dejo +1