Am incercat sa o modific, dar nu reusesc, nu se alineaza cum trebuie..
Multumesc!



Cod: Selectaţi tot
{
"name" : "labelname0", "type" : "button",
"x" : LABEL_NAME_POS_X, "y" : LABEL_START_Y_FIX+LABEL_GAP*0,
},Cod: Selectaţi tot
import localeInfo
import uiScriptLocale
LOCALE_PATH = uiScriptLocale.WINDOWS_PATH
MAINBOARD_WIDTH = 200
MAINBOARD_HEIGHT = 364
LABEL_START_X = 120
LABEL_START_Y = 39
LABEL_START_Y_FIX = 46
LABEL_WIDTH = 50
LABEL_HEIGHT = 17
LABEL_GAP = LABEL_HEIGHT+7
LABEL_NAME_POS_X = 70
TITLE_BAR_POS_X = 10
TITLE_BAR_WIDTH = 163
window = {
"name" : "CharacterDetailsWindow",
"style" : ("float",),
"x" : 274,
"y" : (SCREEN_HEIGHT - 398) / 2,
"width" : MAINBOARD_WIDTH,
"height" : MAINBOARD_HEIGHT,
"children" :
(
{
"name" : "MainBoard",
"type" : "board",
"style" : ("attach","ltr"),
"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,
"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,
"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,
"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,
"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,
"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,
"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,
"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,
"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,
"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,
"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,
"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,
"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,
"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_FIX+LABEL_GAP*0,
},
{
"name" : "labelname1", "type" : "button",
"x" : LABEL_NAME_POS_X, "y" : LABEL_START_Y_FIX+LABEL_GAP*1,
},
{
"name" : "labelname2", "type" : "button",
"x" : LABEL_NAME_POS_X, "y" : LABEL_START_Y_FIX+LABEL_GAP*2,
},
{
"name" : "labelname3", "type" : "button",
"x" : LABEL_NAME_POS_X, "y" : LABEL_START_Y_FIX+LABEL_GAP*3,
},
{
"name" : "labelname4", "type" : "button",
"x" : LABEL_NAME_POS_X, "y" : LABEL_START_Y_FIX+LABEL_GAP*4,
},
{
"name" : "labelname5", "type" : "button",
"x" : LABEL_NAME_POS_X, "y" : LABEL_START_Y_FIX+LABEL_GAP*5,
},
{
"name" : "labelname6", "type" : "button",
"x" : LABEL_NAME_POS_X, "y" : LABEL_START_Y_FIX+LABEL_GAP*6,
},
{
"name" : "labelname7", "type" : "button",
"x" : LABEL_NAME_POS_X, "y" : LABEL_START_Y_FIX+LABEL_GAP*7,
},
{
"name" : "labelname8", "type" : "button",
"x" : LABEL_NAME_POS_X, "y" : LABEL_START_Y_FIX+LABEL_GAP*8,
},
{
"name" : "labelname9", "type" : "button",
"x" : LABEL_NAME_POS_X, "y" : LABEL_START_Y_FIX+LABEL_GAP*9,
},
{
"name" : "labelname10", "type" : "button",
"x" : LABEL_NAME_POS_X, "y" : LABEL_START_Y_FIX+LABEL_GAP*10,
},
{
"name" : "labelname11", "type" : "button",
"x" : LABEL_NAME_POS_X, "y" : LABEL_START_Y_FIX+LABEL_GAP*11,
},
{
"name" : "labelname12", "type" : "button",
"x" : LABEL_NAME_POS_X, "y" : LABEL_START_Y_FIX+LABEL_GAP*12,
},
),
},
),
}
Cod: Selectaţi tot
def SetText(self, text, height = 4):
if not self.ButtonText:
textLine = TextLine()
textLine.SetParent(self)
textLine.SetPosition(self.GetWidth()/2, self.GetHeight()/2)
textLine.SetVerticalAlignCenter()
textLine.SetHorizontalAlignCenter()
textLine.Show()
self.ButtonText = textLine
self.ButtonText.SetText(text)Cod: Selectaţi tot
{
"name" : "labelname0", "type" : "text",
"x" : LABEL_NAME_POS_X, "y" : LABEL_START_Y_FIX+LABEL_GAP*0,
},Cod: Selectaţi tot
#self.labelTextList[i].SetOverEvent( ui.__mem_func__(self.__ButtonOverIn), i )
#self.labelTextList[i].SetOverOutEvent( ui.__mem_func__(self.__ButtonOverOut), i )Cod: Selectaţi tot
#def __ButtonOverIn(self, i):
#idx = i + self.ScollPos
#tooltip = self.InfoList[idx][self.INFO_TOOLTIP]
#arglen = len(str(tooltip))
#pos_x, pos_y = wndMgr.GetMousePosition()
#self.toolTip.ClearToolTip()
#self.toolTip.SetThinBoardSize(11 * arglen)
#self.toolTip.SetToolTipPosition(pos_x + 50, pos_y + 50)
#self.toolTip.AppendTextLine(tooltip, 0xffffff00)
#self.toolTip.Show()
#def __ButtonOverOut(self, idx):
#self.toolTip.Hide()

Cod: Selectaţi tot
elif Type == "button":
parent.Children[Index] = Button()
parent.Children[Index].SetParent(parent)
self.LoadElementButton(parent.Children[Index], ElementValue, parent)Cod: Selectaţi tot
elif Type == "button2":
parent.Children[Index] = Button2()
parent.Children[Index].SetParent(parent)
self.LoadElementButton(parent.Children[Index], ElementValue, parent)Cod: Selectaţi tot
def SetText(self, text, height = 4):
if not self.ButtonText:
textLine = TextLine()
textLine.SetParent(self)
textLine.SetPosition(self.GetWidth()/2, self.GetHeight()/2)
textLine.SetVerticalAlignCenter()
textLine.SetHorizontalAlignCenter()
textLine.Show()
self.ButtonText = textLine
self.ButtonText.SetText(text)Cod: Selectaţi tot
textLine.SetHorizontalAlignCenter()Cod: Selectaţi tot
textLine.SetHorizontalAlignLeft()Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 9 vizitatori