Cum pot să lățesc caseta în care apare Yangul & cum pot muta butonul de acceptă mai la dreapta?

Înainte de a posta o problemă, caută în acest forum și poate găsești rezolvare.
Închis
Avatar utilizator
Sathyr
Veteran

Veteran
Mesaje: 1187
Membru din: 14 Feb 2018, 18:23
Regat: Jinno
Aprecieri: 28  
Mulţumiri: 627  
Discord: Copiază ID
 Contact:
Medalii

*Problemă/Întrebare: Cum pot să lățesc caseta în care apare Yangul & cum pot muta butonul de acceptă mai la dreapta?
Tipologie server: -
*Resursă folosită: -
*ServerFiles utilizat: Clean
*Syserr: N-am.
Poză: Imagine *Detalii suplimentare: Tot subiectul este specificat în titlu!
Imagine -> official.sathyr
Afișează semnătura
Avatar utilizator
[HF]White
Metin Master

Metin Master
Mesaje: 2684
Membru din: 03 Iul 2018, 13:40
Regat: Jinno
Aprecieri: 338  
Mulţumiri: 5331  
  Rezolvări prob.: 13
Discord: Copiază ID
 Contact:
Medalii

uiscript > exchangedialog.py >
Owner_Money & Target_Money

Cod: Selectaţi tot

							"default_image" : "d:/ymir work/ui/public/parameter_slot_02.sub",
							"over_image" : "d:/ymir work/ui/public/parameter_slot_02.sub",
							"down_image" : "d:/ymir work/ui/public/parameter_slot_02.sub",
inlocuieste d:/ymir work/ui/public/parameter_slot_02.sub

cu

Cod: Selectaţi tot

d:/ymir work/ui/public/parameter_slot_03.sub
Owner_Accept_Button > butonul de accept
Owner_Accept_Light (owner + target) > butonul care lumineaza cand accepti trade-ul
Pentru acest mesaj, [HF]White for the post:
Sathyr
Avatar utilizator
Sathyr
Veteran

Veteran
Mesaje: 1187
Membru din: 14 Feb 2018, 18:23
Regat: Jinno
Aprecieri: 28  
Mulţumiri: 627  
Discord: Copiază ID
 Contact:
Medalii

Mulțumiri lui Athero și [HF]White!
Imagine -> official.sathyr
Afișează semnătura
Avatar utilizator
Sathyr
Veteran

Veteran
Mesaje: 1187
Membru din: 14 Feb 2018, 18:23
Regat: Jinno
Aprecieri: 28  
Mulţumiri: 627  
Discord: Copiază ID
 Contact:
Medalii

Valori folosite de mine:
                        {
                            "name" : "Owner_Accept_Light",
                            "type" : "button",
 
                            "x" : 131,
                            "y" : 135,
 
                            "default_image" : "d:/ymir work/ui/game/windows/accept_button_off.sub",
                            "over_image" : "d:/ymir work/ui/game/windows/accept_button_off.sub",
                            "down_image" : "d:/ymir work/ui/game/windows/accept_button_on.sub",
                        },
                        {
                            "name" : "Owner_Accept_Button",
                            "type" : "toggle_button",
 
                            "x" : 150,
                            "y" : 135,
 
                            "text" : uiScriptLocale.EXCHANGE_ACCEPT,
 
                            "default_image" : "d:/ymir work/ui/public/small_button_01.sub",
                            "over_image" : "d:/ymir work/ui/public/small_button_02.sub",
                            "down_image" : "d:/ymir work/ui/public/small_button_03.sub",
                        },
Cum arată acum?
Imagine
Imagine -> official.sathyr
Afișează semnătura
Avatar utilizator
[HF]White
Metin Master

Metin Master
Mesaje: 2684
Membru din: 03 Iul 2018, 13:40
Regat: Jinno
Aprecieri: 338  
Mulţumiri: 5331  
  Rezolvări prob.: 13
Discord: Copiază ID
 Contact:
Medalii

E mai bine, dar cand pui mai mult yang o sa iasa din chenar, modifica parameter_slot_02.sub in parameter_slot_03.sub
Avatar utilizator
Sathyr
Veteran

Veteran
Mesaje: 1187
Membru din: 14 Feb 2018, 18:23
Regat: Jinno
Aprecieri: 28  
Mulţumiri: 627  
Discord: Copiază ID
 Contact:
Medalii

Am modificat tot ce mi-ai zis mai sus!
Acest chenar l-aș vrea mai mare, să incapă tot scrisul de la Yang. Imagine
Am modificat cum mi-ai zis tu, dar acum îmi arată așa: Imagine
Vreau ca acel scris (Yang) să fie încadrat corect în negoț.
Imagine -> official.sathyr
Afișează semnătura
Avatar utilizator
[HF]White
Metin Master

Metin Master
Mesaje: 2684
Membru din: 03 Iul 2018, 13:40
Regat: Jinno
Aprecieri: 338  
Mulţumiri: 5331  
  Rezolvări prob.: 13
Discord: Copiază ID
 Contact:
Medalii

Modifica coordonatele la "Target_Money_Value"
si "Owner_Money_Value"

si pentru fereastra pop-up de yang, in uiscript> pickmoneydialog.py >

Cod: Selectaţi tot

"width" : 170,
"height" : 90,
modifici dimensiunea de aici

inlocuiesti "image" : "d:/ymir work/ui/public/Parameter_Slot_02.sub",

cu

Cod: Selectaţi tot

"image" : "d:/ymir work/ui/public/Parameter_Slot_03.sub",
si modifici coord la astea daca e cazul

"money_value",

si

"max_value",
Avatar utilizator
Sathyr
Veteran

Veteran
Mesaje: 1187
Membru din: 14 Feb 2018, 18:23
Regat: Jinno
Aprecieri: 28  
Mulţumiri: 627  
Discord: Copiază ID
 Contact:
Medalii

Am reușit intr-un final să nimeresc coordonatele, las aici fișierele pentru cine o să mai vrea în viitor.
Cum arată acum?
Imagine Imagine Imagine
exchangedialog.py
#ExchangeDialog.py ~ 24 Slot Item
import uiScriptLocale
 
ROOT = "d:/ymir work/ui/game/"
 
window = {
    "name" : "ExchangeDialog",
 
    "x" : 0,
    "y" : 0,
 
    "style" : ("movable", "float",),
 
    "width" : 400,
    "height" : 200,
 
    "children" :
    (
        {
            "name" : "board",
            "type" : "board",
            "style" : ("attach",),
 
            "x" : 0,
            "y" : 0,
 
            "width" : 400,
            "height" : 200,
 
            "children" :
            (
                ## Title
                {
                    "name" : "TitleBar",
                    "type" : "titlebar",
                    "style" : ("attach",),
 
                    "x" : 8,
                    "y" : 8,
 
                    "width" : 384,
                    "color" : "gray",
 
                    "children" :
                    (
                        { "name":"TitleName", "type":"text", "x":192, "y":3, "text":uiScriptLocale.EXCHANGE_TITLE, "text_horizontal_align":"center" },
                    ),
                },
 
                ## MiddleBar
                {
                    "name" : "Middle_Bar",
                    "type" : "image",
 
                    "x" : 200,
                    "y" : 31,
 
                    "image" : ROOT + "windows/middlebar.sub",
                },
 
                ## Owner
                {
                    "name" : "Owner",
                    "type" : "window",
 
                    "x" : 200,
                    "y" : 33,
 
                    "width" : 200,
                    "height" : 150,
 
                    "children" :
                    (
                        {
                            "name" : "Owner_Slot",
                            "type" : "grid_table",
 
                            "start_index" : 0,
 
                            "x" : 0,
                            "y" : 0,
 
                            "x_count" : 6,
                            "y_count" : 4,
                            "x_step" : 32,
                            "y_step" : 32,
                            "x_blank" : 0,
                            "y_blank" : 0,
 
                            "image" : "d:/ymir work/ui/public/slot_base.sub",
                        },
                        {
                            "name" : "Owner_Money",
                            "type" : "button",
 
                            "x" : 0,
                            "y" : 136,
 
                            #"image" : "d:/ymir work/ui/public/parameter_slot_03.sub",
 
                            "default_image" : "d:/ymir work/ui/public/parameter_slot_03.sub",
                            "over_image" : "d:/ymir work/ui/public/parameter_slot_03.sub",
                            "down_image" : "d:/ymir work/ui/public/parameter_slot_03.sub",
 
                            "children" :
                            (
                                {
                                    "name" : "Owner_Money_Value",
                                    "type" : "text",
 
                                    "x" : 84,
                                    "y" : 2,
 
                                    "text" : "1234567",
 
                                    "text_horizontal_align" : "right",
                                },
                            ),
                        },
                        {
                            "name" : "Owner_Accept_Light",
                            "type" : "button",
 
                            "x" : 131,
                            "y" : 135,
 
                            "default_image" : "d:/ymir work/ui/game/windows/accept_button_off.sub",
                            "over_image" : "d:/ymir work/ui/game/windows/accept_button_off.sub",
                            "down_image" : "d:/ymir work/ui/game/windows/accept_button_on.sub",
                        },
                        {
                            "name" : "Owner_Accept_Button",
                            "type" : "toggle_button",
 
                            "x" : 150,
                            "y" : 135,
 
                            "text" : uiScriptLocale.EXCHANGE_ACCEPT,
 
                            "default_image" : "d:/ymir work/ui/public/small_button_01.sub",
                            "over_image" : "d:/ymir work/ui/public/small_button_02.sub",
                            "down_image" : "d:/ymir work/ui/public/small_button_03.sub",
                        },
                    ),
                },
 
                ## Target
                {
                    "name" : "Target",
                    "type" : "window",
 
                    "x" : 10,
                    "y" : 33,
 
                    "width" : 200,
                    "height" : 150,
 
                    "children" :
                    (
                        {
                            "name" : "Target_Slot",
                            "type" : "grid_table",
 
                            "start_index" : 0,
 
                            "x" : 0,
                            "y" : 0,
 
                            "x_count" : 6,
                            "y_count" : 4,
                            "x_step" : 32,
                            "y_step" : 32,
                            "x_blank" : 0,
                            "y_blank" : 0,
 
                            "image" : "d:/ymir work/ui/public/slot_base.sub",
                        },
                        {
                            "name" : "Target_Money",
                            "type" : "image",
 
                            "x" : 0,
                            "y" : 135,
 
                            "image" : "d:/ymir work/ui/public/parameter_slot_03.sub",
 
                            "children" :
                            (
                                {
                                    "name" : "Target_Money_Value",
                                    "type" : "text",
 
                                    "x" : 84,
                                    "y" : 2,
 
                                    "text" : "1234567",
 
                                    "text_horizontal_align" : "right",
                                },
                            ),
                        },
                        {
                            "name" : "Target_Accept_Light",
                            "type" : "button",
 
                            "x" : 91,
                            "y" : 135,
 
                            "default_image" : "d:/ymir work/ui/game/windows/accept_button_off.sub",
                            "over_image" : "d:/ymir work/ui/game/windows/accept_button_off.sub",
                            "down_image" : "d:/ymir work/ui/game/windows/accept_button_on.sub",
                        },
                    ),
                },
            ),
        },
    ),
}
pickmoneydialog.py
import uiScriptLocale

window = {
	"name" : "PickMoneyDialog",

	"x" : 100,
	"y" : 100,

	"style" : ("movable", "float",),

	"width" : 170,
	"height" : 90,

	"children" :
	(
		{
			"name" : "board",
			"type" : "board_with_titlebar",

			"x" : 0,
			"y" : 0,

			"width" : 205,
			"height" : 90,
			"title" : uiScriptLocale.PICK_MONEY_TITLE,

			"children" :
			(

				## Money Slot
				{
					"name" : "money_slot",
					"type" : "image",

					"x" : 20,
					"y" : 34,

					"image" : "d:/ymir work/ui/public/Parameter_Slot_03.sub",

					"children" :
					(
							{
								"name" : "money_value",
								"type" : "editline",

								"x" : 3,
								"y" : 2,

								"width" : 60,
								"height" : 18,

								"input_limit" : 6,
								"only_number" : 1,

								"text" : "1",
							},
						{
							"name" : "max_value",
							"type" : "text",

							"x" : 80,
							"y" : 3,

							"text" : "/ 999999",
						},
					),
				},

				## Button
				{
					"name" : "accept_button",
					"type" : "button",

					"x" : 100 - 61 - 5,
					"y" : 58,

					"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" : "cancel_button",
					"type" : "button",

					"x" : 100 + 5,
					"y" : 58,

					"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",
				},
			),
		},
	),
}
T/C!
Imagine -> official.sathyr
Afișează semnătura
Avatar utilizator
[HF]White
Metin Master

Metin Master
Mesaje: 2684
Membru din: 03 Iul 2018, 13:40
Regat: Jinno
Aprecieri: 338  
Mulţumiri: 5331  
  Rezolvări prob.: 13
Discord: Copiază ID
 Contact:
Medalii

Rezolvat!
Închis

Înapoi la “Probleme rezolvate”

  • Informaţie