Jump to content

[Pedido]Aumentar Slots De Negociar


pedrorrr
 Share

Recommended Posts

 

Boa alguém me poderia dizer onde consigo aumentar as slots da janela de negociar?

 

Exemplo: 12 slots para 24 slots

 

 

Nota: tierrilopes não consigo falar na shoutbox :p

 

Parte da source/Game

Abrir game/exchange.cpp procurar por:

 

m_pGrid = M2_NEW CGrid(4,3);

 

Alterar por:

 

m_pGrid = M2_NEW CGrid(6,4);

 

Abrir game/exchange.h procurar por:

 

EXCHANGE_ITEM_MAX_NUM = 12

 

Alterar por:

 

EXCHANGE_ITEM_MAX_NUM = 24

 

Parte da source/Binario:

Abrir UserInterface/PythonExchange.h procurar por:

 

EXCHANGE_ITEM_MAX_NUM = 12

 

Alterar por:

 

EXCHANGE_ITEM_MAX_NUM = 24

 

Agora parte python:

Abrir: pack/uiscript/exchangedialog.py Substituir por este código:

#ExchangeDialog.py ~ 24 Slot Item
#Developed by Samuel
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_02.sub",

                                                       "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",

                                                       "children" :
                                                       (
                                                               {
                                                                       "name" : "Owner_Money_Value",
                                                                       "type" : "text",

                                                                       "x" : 59,
                                                                       "y" : 2,

                                                                       "text" : "1234567",

                                                                       "text_horizontal_align" : "right",
                                                               },
                                                       ),
                                               },
                                               {
                                                       "name" : "Owner_Accept_Light",
                                                       "type" : "button",

                                                       "x" : 62,
                                                       "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" : 85,
                                                       "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_02.sub",

                                                       "children" :
                                                       (
                                                               {
                                                                       "name" : "Target_Money_Value",
                                                                       "type" : "text",

                                                                       "x" : 59,
                                                                       "y" : 2,

                                                                       "text" : "1234567",

                                                                       "text_horizontal_align" : "right",
                                                               },
                                                       ),
                                               },
                                               {
                                                       "name" : "Target_Accept_Light",
                                                       "type" : "button",

                                                       "x" : 62,
                                                       "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",
                                               },
                                       ),
                               },
                       ),
               },
       ),
}

Créditos: #Developed by Samuel

Link to comment
Share on other sites

Testado e funciona 100%, obrigado a todos +1...

 

Nota: Se usarem este código python fica mais estético :p

 

Codigo Python:

 

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_02.sub",

 

"default_image" : "d:/ymir work/ui/public/parameter_slot_04.sub",

"over_image" : "d:/ymir work/ui/public/parameter_slot_04.sub",

"down_image" : "d:/ymir work/ui/public/parameter_slot_04.sub",

 

"children" :

(

{

"name" : "Owner_Money_Value",

"type" : "text",

 

"x" : 112,

"y" : 2,

 

"text" : "1234567",

 

"text_horizontal_align" : "right",

},

),

},

{

"name" : "Owner_Accept_Light",

"type" : "button",

 

"x" : 116,

"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" : 139,

"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_04.sub",

 

"children" :

(

{

"name" : "Target_Money_Value",

"type" : "text",

 

"x" : 112,

"y" : 2,

 

"text" : "1234567",

 

"text_horizontal_align" : "right",

},

),

},

{

"name" : "Target_Accept_Light",

"type" : "button",

 

"x" : 116,

"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",

},

),

},

),

},

),

}

 

Resultado:

 

 

js87ci4n9ggzy6jzyygk.png

 

Podem fechar ;)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...