Çözüldü Offical Bonus Tablosu Yardım!

Bu konu çözüme ulaştırılmıştır. Çözüm için konuya yazılan tüm yorumları okumayı unutmayın. Eğer konudaki yorumlar sorununuzu çözmediyse yeni bir konu açabilirsiniz.
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.

H4ZEJ

Üye
Üye
Mesaj
113
Çözümler
3
Beğeni
75
Puan
724
Sistemi doğru şekilde eklememe rağmen bu hatayı alıyorum yardımcı olursanız sevinirim..

Kod:
0924 13:27:17903 :: Traceback (most recent call last):

0924 13:27:17903 ::   File "ui.py", line 1370, in CallEvent

0924 13:27:17903 ::   File "ui.py", line 87, in __call__

0924 13:27:17903 ::   File "ui.py", line 69, in __call__

0924 13:27:17903 ::   File "uiCharacter.py", line 316, in __ClickExpandButton

0924 13:27:17904 ::   File "uiCharacterDetails.py", line 15, in __init__

0924 13:27:17904 ::   File "uiCharacterDetails.py", line 57, in __LoadScript

0924 13:27:17904 ::   File "ui.py", line 3104, in GetChild

0924 13:27:17904 :: KeyError
0924 13:27:17904 :: :
0924 13:27:17904 :: 'label0'
0924 13:27:17904 ::
 
Çözüm
Benim gibi aynı hatayı alanlar
Linkleri görebilmek için giriş yap veya kayıt ol.
bu linkteki işlemleri uygularsa çözüme ulaşır..

Python:
#
# ui.py
#

#Arat ve kod bloğunun altına ekle elif Type == "thinboard":

            elif Type == "thinboard_gold":
                parent.Children[Index] = ThinBoardGold()
                parent.Children[Index].SetParent(parent)
                self.LoadElementThinBoardGold(parent.Children[Index], ElementValue, parent)
            elif Type == "thinboard_circle":
                parent.Children[Index] = ThinBoardCircle()
                parent.Children[Index].SetParent(parent)
                self.LoadElementThinBoardCircle(parent.Children[Index], ElementValue, parent)

#Arat ve kod bloğunun altına ekle def LoadElementThinBoard(self...
grepWinle arattığımda characterdetailswindow bu dosyada label0 var
Python:
import localeInfo
import uiScriptLocale

LOCALE_PATH = uiScriptLocale.WINDOWS_PATH

MAINBOARD_WIDTH = 200
MAINBOARD_HEIGHT = 364#361

LABEL_START_X = 0-10
LABEL_START_Y = 39
LABEL_WIDTH = 50
LABEL_HEIGHT = 17
LABEL_GAP = LABEL_HEIGHT+7
LABEL_NAME_POS_X = 0-10
TITLE_BAR_POS_X = 10
TITLE_BAR_WIDTH = 163

window = {
    "name" : "CharacterDetailsWindow",
    "style" : ("float",),
    
    "x" : 274, #24+253-3,
    "y" : (SCREEN_HEIGHT - 398) / 2,

    "width" : MAINBOARD_WIDTH,
    "height" : MAINBOARD_HEIGHT,
    
    "children" :
    (
        ## MainBoard
        {
            "name" : "MainBoard",
            "type" : "board",
            "style" : ("attach","ltr"),
            
            ## CharacterWindow.py ¿µÇâ ¹ŞÀ½
            "x" : 0,
            "y" : 0,

            "width" : MAINBOARD_WIDTH,
            "height" : MAINBOARD_HEIGHT,
            
            "children" :
            (
                ## ŸÀÌƲ¹Ù
                {
                    "name" : "TitleBar",
                    "type" : "titlebar",
                    "style" : ("attach",),

                    "x" : 6,
                    "y" : 7,

                    "width" : MAINBOARD_WIDTH - 13,
                    
                    "children" :
                    (
                        { "name" : "TitleName", "type" : "text", "x" : 0, "y" : 0, "text": localeInfo.DETAILS_TITLE, "all_align":"center" },
                    ),
                },
                            
                ## ½ºÅ©·Ñ ¹Ù
                {
                    "name" : "ScrollBar",
                    "type" : "scrollbar",

                    "x" : 24,
                    "y" : 31,
                    "size" : MAINBOARD_HEIGHT - 40,
                    "horizontal_align" : "right",
                },
                
                ## È£¸®Áğ ¹Ù
                {
                    "name" : "horizontalbar0", "type":"horizontalbar", "x":TITLE_BAR_POS_X, "y":LABEL_START_Y+LABEL_GAP*0, "width":TITLE_BAR_WIDTH,
                    "children" : ( { "name" : "horizontalbarName0", "type" : "text", "x" : 0, "y" : 0, "text" : "", "all_align" : "center", }, ),
                },
                {
                    "name" : "horizontalbar1", "type":"horizontalbar", "x":TITLE_BAR_POS_X, "y":LABEL_START_Y+LABEL_GAP*1, "width":TITLE_BAR_WIDTH,
                    "children" : ( { "name" : "horizontalbarName1", "type" : "text", "x" : 0, "y" : 0, "text" : "", "all_align" : "center", }, ),
                },
                {
                    "name" : "horizontalbar2", "type":"horizontalbar", "x":TITLE_BAR_POS_X, "y":LABEL_START_Y+LABEL_GAP*2, "width":TITLE_BAR_WIDTH,
                    "children" : ( { "name" : "horizontalbarName2", "type" : "text", "x" : 0, "y" : 0, "text" : "", "all_align" : "center", }, ),
                },
                {
                    "name" : "horizontalbar3", "type":"horizontalbar", "x":TITLE_BAR_POS_X, "y":LABEL_START_Y+LABEL_GAP*3, "width":TITLE_BAR_WIDTH,
                    "children" : ( { "name" : "horizontalbarName3", "type" : "text", "x" : 0, "y" : 0, "text" : "", "all_align" : "center", }, ),
                },
                {
                    "name" : "horizontalbar4", "type":"horizontalbar", "x":TITLE_BAR_POS_X, "y":LABEL_START_Y+LABEL_GAP*4, "width":TITLE_BAR_WIDTH,
                    "children" : ( { "name" : "horizontalbarName4", "type" : "text", "x" : 0, "y" : 0, "text" : "", "all_align" : "center", }, ),
                },
                {
                    "name" : "horizontalbar5", "type":"horizontalbar", "x":TITLE_BAR_POS_X, "y":LABEL_START_Y+LABEL_GAP*5, "width":TITLE_BAR_WIDTH,
                    "children" : ( { "name" : "horizontalbarName5", "type" : "text", "x" : 0, "y" : 0, "text" : "", "all_align" : "center", }, ),
                },
                {
                    "name" : "horizontalbar6", "type":"horizontalbar", "x":TITLE_BAR_POS_X, "y":LABEL_START_Y+LABEL_GAP*6, "width":TITLE_BAR_WIDTH,
                    "children" : ( { "name" : "horizontalbarName6", "type" : "text", "x" : 0, "y" : 0, "text" : "", "all_align" : "center", }, ),
                },
                {
                    "name" : "horizontalbar7", "type":"horizontalbar", "x":TITLE_BAR_POS_X, "y":LABEL_START_Y+LABEL_GAP*7, "width":TITLE_BAR_WIDTH,
                    "children" : ( { "name" : "horizontalbarName7", "type" : "text", "x" : 0, "y" : 0, "text" : "", "all_align" : "center", }, ),
                },
                {
                    "name" : "horizontalbar8", "type":"horizontalbar", "x":TITLE_BAR_POS_X, "y":LABEL_START_Y+LABEL_GAP*8, "width":TITLE_BAR_WIDTH,
                    "children" : ( { "name" : "horizontalbarName8", "type" : "text", "x" : 0, "y" : 0, "text" : "", "all_align" : "center", }, ),
                },
                {
                    "name" : "horizontalbar9", "type":"horizontalbar", "x":TITLE_BAR_POS_X, "y":LABEL_START_Y+LABEL_GAP*9, "width":TITLE_BAR_WIDTH,
                    "children" : ( { "name" : "horizontalbarName9", "type" : "text", "x" : 0, "y" : 0, "text" : "", "all_align" : "center", }, ),
                },
                {
                    "name" : "horizontalbar10", "type":"horizontalbar", "x":TITLE_BAR_POS_X, "y":LABEL_START_Y+LABEL_GAP*10, "width":TITLE_BAR_WIDTH,
                    "children" : ( { "name" : "horizontalbarName10", "type" : "text", "x" : 0, "y" : 0, "text" : "", "all_align" : "center", }, ),
                },
                {
                    "name" : "horizontalbar11", "type":"horizontalbar", "x":TITLE_BAR_POS_X, "y":LABEL_START_Y+LABEL_GAP*11, "width":TITLE_BAR_WIDTH,
                    "children" : ( { "name" : "horizontalbarName11", "type" : "text", "x" : 0, "y" : 0, "text" : "", "all_align" : "center", }, ),
                },
                {
                    "name" : "horizontalbar12", "type":"horizontalbar", "x":TITLE_BAR_POS_X, "y":LABEL_START_Y+LABEL_GAP*12, "width":TITLE_BAR_WIDTH,
                    "children" : ( { "name" : "horizontalbarName12", "type" : "text", "x" : 0, "y" : 0, "text" : "", "all_align" : "center", }, ),
                }, ## È£¸®Áğ ¹Ù ³¡
                
                ## ¶óº§ ##
                {
                    "name" : "label0", "type" : "thinboard_circle", "x" : LABEL_START_X, "y" : LABEL_START_Y+LABEL_GAP*0, "width" : LABEL_WIDTH, "height" : LABEL_HEIGHT,
                    "horizontal_align" : "center",
                    "children" : (
                        { "name" : "labelvalue0", "type" : "text", "x" : 0, "y" : 0, "text" : "", "all_align" : "center", },
                    ),
                },
                {
                    "name" : "label1", "type" : "thinboard_circle", "x" : LABEL_START_X, "y" : LABEL_START_Y+LABEL_GAP*1, "width" : LABEL_WIDTH, "height" : LABEL_HEIGHT,
                    "horizontal_align" : "center",
                    "children" : (
                        { "name" : "labelvalue1", "type" : "text", "x" : 0, "y" : 0, "text" : "", "all_align" : "center", },
                    ),
                },
                {
                    "name" : "label2", "type" : "thinboard_circle", "x" : LABEL_START_X, "y" : LABEL_START_Y+LABEL_GAP*2, "width" : LABEL_WIDTH, "height" : LABEL_HEIGHT,
                    "horizontal_align" : "center",
                    "children" : (
                        { "name" : "labelvalue2", "type" : "text", "x" : 0, "y" : 0, "text" : "", "all_align" : "center", },
                    ),
                },
                {
                    "name" : "label3", "type" : "thinboard_circle", "x" : LABEL_START_X, "y" : LABEL_START_Y+LABEL_GAP*3, "width" : LABEL_WIDTH, "height" : LABEL_HEIGHT,
                    "horizontal_align" : "center",
                    "children" : (
                        { "name" : "labelvalue3", "type" : "text", "x" : 0, "y" : 0, "text" : "", "all_align" : "center", },
                    ),
                },
                {
                    "name" : "label4", "type" : "thinboard_circle", "x" : LABEL_START_X, "y" : LABEL_START_Y+LABEL_GAP*4, "width" : LABEL_WIDTH, "height" : LABEL_HEIGHT,
                    "horizontal_align" : "center",
                    "children" : (
                        { "name" : "labelvalue4", "type" : "text", "x" : 0, "y" : 0, "text" : "", "all_align" : "center", },
                    ),
                },
                {
                    "name" : "label5", "type" : "thinboard_circle", "x" : LABEL_START_X, "y" : LABEL_START_Y+LABEL_GAP*5, "width" : LABEL_WIDTH, "height" : LABEL_HEIGHT,
                    "horizontal_align" : "center",
                    "children" : (
                        { "name" : "labelvalue5", "type" : "text", "x" : 0, "y" : 0, "text" : "", "all_align" : "center", },
                    ),
                },
                {
                    "name" : "label6", "type" : "thinboard_circle", "x" : LABEL_START_X, "y" : LABEL_START_Y+LABEL_GAP*6, "width" : LABEL_WIDTH, "height" : LABEL_HEIGHT,
                    "horizontal_align" : "center",
                    "children" : (
                        { "name" : "labelvalue6", "type" : "text", "x" : 0, "y" : 0, "text" : "", "all_align" : "center", },
                    ),
                },
                {
                    "name" : "label7", "type" : "thinboard_circle", "x" : LABEL_START_X, "y" : LABEL_START_Y+LABEL_GAP*7, "width" : LABEL_WIDTH, "height" : LABEL_HEIGHT,
                    "horizontal_align" : "center",
                    "children" : (
                        { "name" : "labelvalue7", "type" : "text", "x" : 0, "y" : 0, "text" : "", "all_align" : "center", },
                    ),
                },
                {
                    "name" : "label8", "type" : "thinboard_circle", "x" : LABEL_START_X, "y" : LABEL_START_Y+LABEL_GAP*8, "width" : LABEL_WIDTH, "height" : LABEL_HEIGHT,
                    "horizontal_align" : "center",
                    "children" : (
                        { "name" : "labelvalue8", "type" : "text", "x" : 0, "y" : 0, "text" : "", "all_align" : "center", },
                    ),
                },
                {
                    "name" : "label9", "type" : "thinboard_circle", "x" : LABEL_START_X, "y" : LABEL_START_Y+LABEL_GAP*9, "width" : LABEL_WIDTH, "height" : LABEL_HEIGHT,
                    "horizontal_align" : "center",
                    "children" : (
                        { "name" : "labelvalue9", "type" : "text", "x" : 0, "y" : 0, "text" : "", "all_align" : "center", },
                    ),
                },
                {
                    "name" : "label10", "type" : "thinboard_circle", "x" : LABEL_START_X, "y" : LABEL_START_Y+LABEL_GAP*10, "width" : LABEL_WIDTH, "height" : LABEL_HEIGHT,
                    "horizontal_align" : "center",
                    "children" : (
                        { "name" : "labelvalue10", "type" : "text", "x" : 0, "y" : 0, "text" : "", "all_align" : "center", },
                    ),
                },
                {
                    "name" : "label11", "type" : "thinboard_circle", "x" : LABEL_START_X, "y" : LABEL_START_Y+LABEL_GAP*11, "width" : LABEL_WIDTH, "height" : LABEL_HEIGHT,
                    "horizontal_align" : "center",
                    "children" : (
                        { "name" : "labelvalue11", "type" : "text", "x" : 0, "y" : 0, "text" : "", "all_align" : "center", },
                    ),
                },
                {
                    "name" : "label12", "type" : "thinboard_circle", "x" : LABEL_START_X, "y" : LABEL_START_Y+LABEL_GAP*12, "width" : LABEL_WIDTH, "height" : LABEL_HEIGHT,
                    "horizontal_align" : "center",
                    "children" : (
                        { "name" : "labelvalue12", "type" : "text", "x" : 0, "y" : 0, "text" : "", "all_align" : "center", },
                    ),
                }, ## ¶óº§ ³¡
                
                ## ¹öÆ°
                {
                            "name" : "labelname0", "type" : "button",
                            "x" : LABEL_NAME_POS_X, "y" : LABEL_START_Y+LABEL_GAP*0,
                            
                            "text" : "",
                            "horizontal_align" : "center",
                            
                            "default_image" : LOCALE_PATH + "details.sub",
                            "over_image" : LOCALE_PATH + "details.sub",
                            "down_image" : LOCALE_PATH + "details.sub",
                },
                {
                            "name" : "labelname1", "type" : "button",
                            "x" : LABEL_NAME_POS_X, "y" : LABEL_START_Y+LABEL_GAP*1,
                            
                            "text" : "",
                            "horizontal_align" : "center",
                            
                            "default_image" : LOCALE_PATH + "details.sub",
                            "over_image" : LOCALE_PATH + "details.sub",
                            "down_image" : LOCALE_PATH + "details.sub",
                },
                {
                            "name" : "labelname2", "type" : "button",
                            "x" : LABEL_NAME_POS_X, "y" : LABEL_START_Y+LABEL_GAP*2,
                            
                            "text" : "",
                            "horizontal_align" : "center",
                            
                            "default_image" : LOCALE_PATH + "details.sub",
                            "over_image" : LOCALE_PATH + "details.sub",
                            "down_image" : LOCALE_PATH + "details.sub",
                },
                {
                            "name" : "labelname3", "type" : "button",
                            "x" : LABEL_NAME_POS_X, "y" : LABEL_START_Y+LABEL_GAP*3,
                            
                            "text" : "",
                            "horizontal_align" : "center",
                            
                            "default_image" : LOCALE_PATH + "details.sub",
                            "over_image" : LOCALE_PATH + "details.sub",
                            "down_image" : LOCALE_PATH + "details.sub",
                },   
                {
                            "name" : "labelname4", "type" : "button",
                            "x" : LABEL_NAME_POS_X, "y" : LABEL_START_Y+LABEL_GAP*4,
                            
                            "text" : "",
                            "horizontal_align" : "center",
                            
                            "default_image" : LOCALE_PATH + "details.sub",
                            "over_image" : LOCALE_PATH + "details.sub",
                            "down_image" : LOCALE_PATH + "details.sub",
                },   
                {
                            "name" : "labelname5", "type" : "button",
                            "x" : LABEL_NAME_POS_X, "y" : LABEL_START_Y+LABEL_GAP*5,
                            
                            "text" : "",
                            "horizontal_align" : "center",
                            
                            
                            "default_image" : LOCALE_PATH + "details.sub",
                            "over_image" : LOCALE_PATH + "details.sub",
                            "down_image" : LOCALE_PATH + "details.sub",
                },   
                {
                            "name" : "labelname6", "type" : "button",
                            "x" : LABEL_NAME_POS_X, "y" : LABEL_START_Y+LABEL_GAP*6,
                            
                            "text" : "",
                            "horizontal_align" : "center",
                            
                            "default_image" : LOCALE_PATH + "details.sub",
                            "over_image" : LOCALE_PATH + "details.sub",
                            "down_image" : LOCALE_PATH + "details.sub",
                },   
                {
                            "name" : "labelname7", "type" : "button",
                            "x" : LABEL_NAME_POS_X, "y" : LABEL_START_Y+LABEL_GAP*7,
                            
                            "text" : "",
                            "horizontal_align" : "center",
                            
                            "default_image" : LOCALE_PATH + "details.sub",
                            "over_image" : LOCALE_PATH + "details.sub",
                            "down_image" : LOCALE_PATH + "details.sub",
                },   
                {
                            "name" : "labelname8", "type" : "button",
                            "x" : LABEL_NAME_POS_X, "y" : LABEL_START_Y+LABEL_GAP*8,
                            
                            "text" : "",
                            "horizontal_align" : "center",
                            
                            "default_image" : LOCALE_PATH + "details.sub",
                            "over_image" : LOCALE_PATH + "details.sub",
                            "down_image" : LOCALE_PATH + "details.sub",
                },   
                {
                            "name" : "labelname9", "type" : "button",
                            "x" : LABEL_NAME_POS_X, "y" : LABEL_START_Y+LABEL_GAP*9,
                            
                            "text" : "",
                            "horizontal_align" : "center",
                            
                            "default_image" : LOCALE_PATH + "details.sub",
                            "over_image" : LOCALE_PATH + "details.sub",
                            "down_image" : LOCALE_PATH + "details.sub",
                },   
                {
                            "name" : "labelname10", "type" : "button",
                            "x" : LABEL_NAME_POS_X, "y" : LABEL_START_Y+LABEL_GAP*10,
                            
                            "text" : "",
                            "horizontal_align" : "center",
                            
                            "default_image" : LOCALE_PATH + "details.sub",
                            "over_image" : LOCALE_PATH + "details.sub",
                            "down_image" : LOCALE_PATH + "details.sub",
                },   
                {
                            "name" : "labelname11", "type" : "button",
                            "x" : LABEL_NAME_POS_X, "y" : LABEL_START_Y+LABEL_GAP*11,
                            
                            "text" : "",
                            "horizontal_align" : "center",
                            
                            "default_image" : LOCALE_PATH + "details.sub",
                            "over_image" : LOCALE_PATH + "details.sub",
                            "down_image" : LOCALE_PATH + "details.sub",
                },   
                {
                            "name" : "labelname12", "type" : "button",
                            "x" : LABEL_NAME_POS_X, "y" : LABEL_START_Y+LABEL_GAP*12,
                            
                            "text" : "",
                            "horizontal_align" : "center",
                            
                            "default_image" : LOCALE_PATH + "details.sub",
                            "over_image" : LOCALE_PATH + "details.sub",
                            "down_image" : LOCALE_PATH + "details.sub",
                }, ## ¹öÆ° ³¡
                
            ),
        }, ## MainBoard End
    ),
}
 
Benim gibi aynı hatayı alanlar
Linkleri görebilmek için giriş yap veya kayıt ol.
bu linkteki işlemleri uygularsa çözüme ulaşır..

Python:
#
# ui.py
#

#Arat ve kod bloğunun altına ekle elif Type == "thinboard":

            elif Type == "thinboard_gold":
                parent.Children[Index] = ThinBoardGold()
                parent.Children[Index].SetParent(parent)
                self.LoadElementThinBoardGold(parent.Children[Index], ElementValue, parent)
            elif Type == "thinboard_circle":
                parent.Children[Index] = ThinBoardCircle()
                parent.Children[Index].SetParent(parent)
                self.LoadElementThinBoardCircle(parent.Children[Index], ElementValue, parent)

#Arat ve kod bloğunun altına ekle def LoadElementThinBoard(self, window, value, parentWindow):

    def LoadElementThinBoardGold(self, window, value, parentWindow):
        if FALSE == self.CheckKeyList(value["name"], value, self.BOARD_KEY_LIST):
            return FALSE

        window.SetSize(int(value["width"]), int(value["height"]))
        self.LoadDefaultData(window, value, parentWindow)
        return TRUE

    def LoadElementThinBoardCircle(self, window, value, parentWindow):
        if FALSE == self.CheckKeyList(value["name"], value, self.BOARD_KEY_LIST):
            return FALSE

        window.SetSize(int(value["width"]), int(value["height"]))
        self.LoadDefaultData(window, value, parentWindow)
        return TRUE

# Arat ve kod bloğununn altıne ekle class ThinBoard(Window):

class ThinBoardGold(Window):
    CORNER_WIDTH = 16
    CORNER_HEIGHT = 16
    LINE_WIDTH = 16
    LINE_HEIGHT = 16
    BOARD_COLOR = grp.GenerateColor(0.0, 0.0, 0.0, 0.51)

    LT = 0
    LB = 1
    RT = 2
    RB = 3
    L = 0
    R = 1
    T = 2
    B = 3

    def __init__(self, layer = "UI"):
        Window.__init__(self, layer)
        CornerFileNames = [ "d:/ymir work/ui/pattern/thinboardgold/ThinBoard_Corner_"+dir+".tga" for dir in ["LeftTop_gold", "LeftBottom_gold","RightTop_gold", "RightBottom_gold"]]
        LineFileNames = [ "d:/ymir work/ui/pattern/thinboardgold/ThinBoard_Line_"+dir+".tga" for dir in ["Left_gold", "Right_gold", "Top_gold", "Bottom_gold"]]
      
        self.Corners = []
        for fileName in CornerFileNames:
            Corner = ExpandedImageBox()
            Corner.AddFlag("attach")
            Corner.AddFlag("not_pick")
            Corner.LoadImage(fileName)
            Corner.SetParent(self)
            Corner.SetPosition(0, 0)
            Corner.Show()
            self.Corners.append(Corner)

        self.Lines = []
        for fileName in LineFileNames:
            Line = ExpandedImageBox()
            Line.AddFlag("attach")
            Line.AddFlag("not_pick")
            Line.LoadImage(fileName)
            Line.SetParent(self)
            Line.SetPosition(0, 0)
            Line.Show()
            self.Lines.append(Line)

        Base = ExpandedImageBox()
        Base.SetParent(self)
        Base.AddFlag("attach")
        Base.AddFlag("not_pick")
        Base.LoadImage("d:/ymir work/ui/pattern/thinboardgold/thinboard_bg_gold.tga")
        Base.SetPosition(self.CORNER_WIDTH, self.CORNER_HEIGHT)
        Base.Show()
        self.Base = Base

        self.Lines[self.L].SetPosition(0, self.CORNER_HEIGHT)
        self.Lines[self.T].SetPosition(self.CORNER_WIDTH, 0)

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

    def SetSize(self, width, height):

        width = max(self.CORNER_WIDTH*2, width)
        height = max(self.CORNER_HEIGHT*2, height)
        Window.SetSize(self, width, height)

        self.Corners[self.LB].SetPosition(0, height - self.CORNER_HEIGHT)
        self.Corners[self.RT].SetPosition(width - self.CORNER_WIDTH, 0)
        self.Corners[self.RB].SetPosition(width - self.CORNER_WIDTH, height - self.CORNER_HEIGHT)
        self.Lines[self.R].SetPosition(width - self.CORNER_WIDTH, self.CORNER_HEIGHT)
        self.Lines[self.B].SetPosition(self.CORNER_HEIGHT, height - self.CORNER_HEIGHT)

        verticalShowingPercentage = float((height - self.CORNER_HEIGHT*2) - self.LINE_HEIGHT) / self.LINE_HEIGHT
        horizontalShowingPercentage = float((width - self.CORNER_WIDTH*2) - self.LINE_WIDTH) / self.LINE_WIDTH
        self.Lines[self.L].SetRenderingRect(0, 0, 0, verticalShowingPercentage)
        self.Lines[self.R].SetRenderingRect(0, 0, 0, verticalShowingPercentage)
        self.Lines[self.T].SetRenderingRect(0, 0, horizontalShowingPercentage, 0)
        self.Lines[self.B].SetRenderingRect(0, 0, horizontalShowingPercentage, 0)
        if self.Base:
            self.Base.SetRenderingRect(0, 0, horizontalShowingPercentage, verticalShowingPercentage)

    def ShowInternal(self):
        self.Base.Show()
        for wnd in self.Lines:
            wnd.Show()
        for wnd in self.Corners:
            wnd.Show()

    def HideInternal(self):
        self.Base.Hide()
        for wnd in self.Lines:
            wnd.Hide()
        for wnd in self.Corners:
            wnd.Hide()

class ThinBoardCircle(Window):
    CORNER_WIDTH = 4
    CORNER_HEIGHT = 4
    LINE_WIDTH = 4
    LINE_HEIGHT = 4
    BOARD_COLOR = grp.GenerateColor(255.0, 255.0, 255.0, 1.0)

    LT = 0
    LB = 1
    RT = 2
    RB = 3
    L = 0
    R = 1
    T = 2
    B = 3

    def __init__(self, layer = "UI"):
        Window.__init__(self, layer)

        CornerFileNames = [ "d:/ymir work/ui/pattern/thinboardcircle/ThinBoard_Corner_"+dir+".tga" for dir in ["LeftTop_circle","LeftBottom_circle","RightTop_circle","RightBottom_circle"] ]
        LineFileNames = [ "d:/ymir work/ui/pattern/thinboardcircle/ThinBoard_Line_"+dir+".tga" for dir in ["Left_circle","Right_circle","Top_circle","Bottom_circle"] ]

        self.Corners = []
        for fileName in CornerFileNames:
            Corner = ExpandedImageBox()
            Corner.AddFlag("attach")
            Corner.AddFlag("not_pick")
            Corner.LoadImage(fileName)
            Corner.SetParent(self)
            Corner.SetPosition(0, 0)
            Corner.Show()
            self.Corners.append(Corner)

        self.Lines = []
        for fileName in LineFileNames:
            Line = ExpandedImageBox()
            Line.AddFlag("attach")
            Line.AddFlag("not_pick")
            Line.LoadImage(fileName)
            Line.SetParent(self)
            Line.SetPosition(0, 0)
            Line.Show()
            self.Lines.append(Line)

        Base = Bar()
        Base.SetParent(self)
        Base.AddFlag("attach")
        Base.AddFlag("not_pick")
        Base.SetPosition(self.CORNER_WIDTH, self.CORNER_HEIGHT)
        Base.SetColor(self.BOARD_COLOR)
        Base.Show()
        self.Base = Base

        self.Lines[self.L].SetPosition(0, self.CORNER_HEIGHT)
        self.Lines[self.T].SetPosition(self.CORNER_WIDTH, 0)

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

    def SetSize(self, width, height):

        width = max(self.CORNER_WIDTH*2, width)
        height = max(self.CORNER_HEIGHT*2, height)
        Window.SetSize(self, width, height)

        self.Corners[self.LB].SetPosition(0, height - self.CORNER_HEIGHT)
        self.Corners[self.RT].SetPosition(width - self.CORNER_WIDTH, 0)
        self.Corners[self.RB].SetPosition(width - self.CORNER_WIDTH, height - self.CORNER_HEIGHT)
        self.Lines[self.R].SetPosition(width - self.CORNER_WIDTH, self.CORNER_HEIGHT)
        self.Lines[self.B].SetPosition(self.CORNER_HEIGHT, height - self.CORNER_HEIGHT)

        verticalShowingPercentage = float((height - self.CORNER_HEIGHT*2) - self.LINE_HEIGHT) / self.LINE_HEIGHT
        horizontalShowingPercentage = float((width - self.CORNER_WIDTH*2) - self.LINE_WIDTH) / self.LINE_WIDTH
        self.Lines[self.L].SetRenderingRect(0, 0, 0, verticalShowingPercentage)
        self.Lines[self.R].SetRenderingRect(0, 0, 0, verticalShowingPercentage)
        self.Lines[self.T].SetRenderingRect(0, 0, horizontalShowingPercentage, 0)
        self.Lines[self.B].SetRenderingRect(0, 0, horizontalShowingPercentage, 0)
        self.Base.SetSize(width - self.CORNER_WIDTH*2, height - self.CORNER_HEIGHT*2)

    def ShowInternal(self):
        self.Base.Show()
        for wnd in self.Lines:
            wnd.Show()
        for wnd in self.Corners:
            wnd.Show()

    def HideInternal(self):
        self.Base.Hide()
        for wnd in self.Lines:
            wnd.Hide()
        for wnd in self.Corners:
            wnd.Hide()

0924_141615.jpg
 
Çözüm
Son durumu bildirdiğiniz için teşekkürler. Konuyu çözüldü olarak işaretledim
 
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.
Geri
Üst