Jump to content

Sash Combine and Absorb Window "Position Problem"


Recommended Posts

Hey buddys !

i have a little problem with my sash absorb window and combination window
it always open like this

85fce407b652075bf20866715ce5e2ff.jpg

but i want that it open in the middle like on the official but every changes i made the window dont change the position and thats weird.


my sash_absorbwindow.py
 

import app
import item
import uiScriptLocale

window = {
	"name" : "Sash_AbsorbtionWindow",
	"x" : 0,
	"y" : 0,
	"style" : ("movable", "float",),
	"width" : 205,
	"height" : 270,
	"children" :
	(
		{
			"name" : "board",
			"type" : "board",
			"style" : ("attach",),
			"x" : 0,
			"y" : 0,
			"width" : 205,
			"height" : 270,
			"children" :
			(
				{
					"name" : "TitleBar",
					"type" : "titlebar",
					"style" : ("attach",),
					"x" : 6,
					"y" : 6,
					"width" : 190,
					"color" : "yellow",
					"children" :
					(
						{
							"name":"TitleName",
							"type":"text",
							"x":95,
							"y":3,
							"text":uiScriptLocale.SASH_ABSORB,
							"text_horizontal_align":"center"
						},
					),
				},
				{
					"name" : "Sash_Combine",
					"type" : "image",
					"x" : 9,
					"y" : 35,
					"image" : uiScriptLocale.LOCALE_UISCRIPT_PATH + "Acce/Acce_absorb.tga",
					"children" :
					(
						{
							"name" : "SashSlot",
							"type" : "slot",
							"x" : 3,
							"y" : 3,
							"width" : 190,
							"height" : 200,
							"slot" : (
										{
											"index" : 0,
											"x" : 26,
											"y" : 41,
											"width" : 31,
											"height" : 31
										},
										{
											"index" : 1,
											"x" : 125,
											"y" : 8,
											"width" : 31,
											"height" : 96
										},
										{
											"index" : 2,
											"x" : 75,
											"y" : 126,
											"width" : 31,
											"height" : 31
										},
							),
						},
					),
				},
				{
					"name" : "AcceptButton",
					"type" : "button",
					"x" : 40,
					"y" : 235,
					"text" : uiScriptLocale.OK,
					"default_image" : "d:/ymir work/ui/public/middle_button_01.sub",
					"over_image" : "d:/ymir work/ui/public/middle_button_02.sub",
					"down_image" : "d:/ymir work/ui/public/middle_button_03.sub",
				},
				{
					"name" : "CancelButton",
					"type" : "button",
					"x" : 114,
					"y" : 235,
					"text" : uiScriptLocale.CANCEL,
					"default_image" : "d:/ymir work/ui/public/middle_button_01.sub",
					"over_image" : "d:/ymir work/ui/public/middle_button_02.sub",
					"down_image" : "d:/ymir work/ui/public/middle_button_03.sub",
				},				
			),
		},
	),
}


my sash_combinewindow.py

 

import app
import item
import uiScriptLocale

COSTUME_START_INDEX = item.COSTUME_SLOT_START

window = {
	"name" : "Sash_CombineWindow",
	"x" : 0,
	"y" : 0,
	"style" : ("movable", "float",),
	"width" : 215,
	"height" : 270,
	"children" :
	(
		{
			"name" : "board",
			"type" : "board",
			"style" : ("attach",),
			"x" : 0,
			"y" : 0,
			"width" : 215,
			"height" : 270,
			"children" :
			(
				{
					"name" : "TitleBar",
					"type" : "titlebar",
					"style" : ("attach",),
					"x" : 6,
					"y" : 6,
					"width" : 200,
					"color" : "yellow",
					"children" :
					(
						{
							"name" : "TitleName",
							"type" : "text",
							"x" : 95,
							"y" : 3,
							"text" : uiScriptLocale.SASH_COMBINE,
							"text_horizontal_align" : "center"
						},
					),
				},
				{
					"name" : "Sash_Combine",
					"type" : "image",
					"x" : 9,
					"y" : 35,
					"image" : uiScriptLocale.LOCALE_UISCRIPT_PATH + "acce/acce_combine.tga",
					"children" :
					(
						{
							"name" : "SashSlot",
							"type" : "slot",
							"x" : 3,
							"y" : 3,
							"width" : 200,
							"height" : 150,
							"slot" : (
										{
											"index":0,
											"x":78,
											"y":7,
											"width":32,
											"height":32
										},
										{
											"index":1,
											"x":78,
											"y":60,
											"width":32,
											"height":32
										},
										{
											"index":2,
											"x":78,
											"y":115,
											"width":32,
											"height":32
										},
							),
						},
						{
							"name" : "Main",
							"type" : "text",
							"text" : uiScriptLocale.SASH_MAIN,
							"text_horizontal_align":"center",
							"x" : 85 + 12,
							"y" : 7 + 36,
						},
						{
							"name" : "serve",
							"type" : "text",
							"text" : uiScriptLocale.SASH_SERVE,
							"text_horizontal_align" : "center",
							"x" : 85 + 12,
							"y" : 60 + 38,
						},
						{
							"name" : "Result",
							"type" : "text", 
							"text" : uiScriptLocale.SASH_RESULT,
							"text_horizontal_align":"center",
							"x" : 85 + 12,
							"y" : 115 + 40
						},
					),
				},
				{
					"name" : "NeedMoney",
					"type" : "text",
					"text" : "",
					"text_horizontal_align" : "center",
					"x" : 105,
					"y" : 215,
				},
				{
					"name" : "AcceptButton",
					"type" : "button",
					"x" : 40,
					"y" : 235,
					"text" : uiScriptLocale.OK,
					"default_image" : "d:/ymir work/ui/public/middle_button_01.sub",
					"over_image" : "d:/ymir work/ui/public/middle_button_02.sub",
					"down_image" : "d:/ymir work/ui/public/middle_button_03.sub",
				},
				{
					"name" : "CancelButton",
					"type" : "button",
					"x" : 114,
					"y" : 235,
					"text" : uiScriptLocale.CANCEL,
					"default_image" : "d:/ymir work/ui/public/middle_button_01.sub",
					"over_image" : "d:/ymir work/ui/public/middle_button_02.sub",
					"down_image" : "d:/ymir work/ui/public/middle_button_03.sub",
				},			
			),
		},
	),
}

 

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

vor 21 Stunden schrieb Heathcliff™:

Hi!
Try this way 


window = {
	"name" : "Sash_AbsorbtionWindow",
	"x" : SCREEN_WIDTH - 176 - 200 - 80,
	"y" : SCREEN_HEIGHT - 37 - 563,
	"style" : ("movable", "float",),
	"width" : 205,
	"height" : 270,
	"children" :

Regards

 

Thats working thank you ?

  • Love 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.