Jump to content

Problem with sidebar by vegas


Recommended Posts

  • Premium

Hello,

I am trying to implement this system: 

 

But I have a problem that I can't click on the icons. At the same time, when I first open the inventory and click on "inventory" the sidebar moves.

import item
import app

TEXT_VEGAS_1 = "Description button 1"
TEXT_VEGAS_2 = "Description button 2"
TEXT_VEGAS_3 = "Description button 3"
TEXT_VEGAS_4 = "Description button 4"
TEXT_VEGAS_5 = "Description button 5"
TEXT_VEGAS_6 = "Description button 6"

########################################
GET_IMAGE_BUTTON = "d:/ymir work/item/quest/"
########################################

position_button_1_x = 10
position_button_1_y = 10
position_button_2_x = 10
position_button_2_y = 42
position_button_3_x = 10
position_button_3_y = 72
position_button_4_x = 10
position_button_4_y = 102
position_button_5_x = 10
position_button_5_y = 134
position_button_6_x = 10 
position_button_6_y = 166

EQUIPMENT_START_INDEX = False

if app.ENABLE_ADDITIONAL_EQUIPMENT_PAGE:
	BOARD_HEIGHT = 375
	window = {
		"name" : "InventoryWindow",

		## 600 - (width + żŔ¸ĄÂĘŔ¸·Î şÎĹÍ ¶çżě±â 24 px)
		"x" : SCREEN_WIDTH - 176,
		"y" : SCREEN_HEIGHT - 37 - BOARD_HEIGHT,

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

		"width" : 176,
		"height" : BOARD_HEIGHT,

		"children" :
		[
			{
				"name" : "vegas_board",
				"type" : "board",
				"style" : ("attach",),

				"x" : -45,
				"y" : +15,
				"vertical_align":"center",

				"width" : 40,
				"height" : 210,

				"children" :
				(
					{
						"name" : "Button_Function_1",
						"type" : "button",

						"x" : position_button_1_x,
						"y" : position_button_1_y,

						"tooltip_text" : TEXT_VEGAS_1,

						"default_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_01.tga",
						"over_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_02.tga",
						"down_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_03.tga",
					},
					{
						"name" : "Button_Function_2",
						"type" : "button",

						"x" : position_button_2_x,
						"y" : position_button_2_y,

						"tooltip_text" : TEXT_VEGAS_2,

						"default_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_01.tga",
						"over_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_02.tga",
						"down_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_03.tga",
					},	
					{
						"name" : "Button_Function_3",
						"type" : "button",

						"x" : position_button_3_x,
						"y" : position_button_3_y,

						"tooltip_text" : TEXT_VEGAS_3,

						"default_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_01.tga",
						"over_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_02.tga",
						"down_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_03.tga",
					},	
					{
						"name" : "Button_Function_4",
						"type" : "button",

						"x" : position_button_4_x,
						"y" : position_button_4_y,

						"tooltip_text" : TEXT_VEGAS_4,

						"default_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_01.tga",
						"over_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_02.tga",
						"down_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_03.tga",
					},	
					{
						"name" : "Button_Function_5",
						"type" : "button",

						"x" : position_button_5_x,
						"y" : position_button_5_y,

						"tooltip_text" : TEXT_VEGAS_5,

						"default_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_01.tga",
						"over_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_02.tga",
						"down_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_03.tga",
					},	
					{
						"name" : "Button_Function_6",
						"type" : "button",

						"x" : position_button_6_x,
						"y" : position_button_6_y,

						"tooltip_text" : TEXT_VEGAS_6,

						"default_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_01.tga",
						"over_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_02.tga",
						"down_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_03.tga",
					},	
				),
			},
			## Inventory, Equipment Slots
			{
				"name" : "board",
				"type" : "board",
				"style" : ("attach",),

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

				"width" : 176,
				"height" : BOARD_HEIGHT,

				"children" :
				[
					## Title
					{
						"name" : "TitleBar",
						"type" : "titlebar",
						"style" : ("attach",),

						"x" : 8,
						"y" : 7,

						"width" : 161,
						"color" : "yellow",

						"children" :
						(
							{ "name":"TitleName", "type":"text", "x":77, "y":3, "text":uiScriptLocale.INVENTORY_TITLE, "text_horizontal_align":"center" },
						),
					},
					{
						"name" : "Inventory_Tab_01",
						"type" : "radio_button",

						"x" : 10,
						"y" : 33,

						"default_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_01.sub",
						"over_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_02.sub",
						"down_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_03.sub",
						"tooltip_text" : uiScriptLocale.INVENTORY_PAGE_BUTTON_TOOLTIP_1,

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

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

								"all_align" : "center",

								"text" : "I",
							},
						),
					},
					{
						"name" : "Inventory_Tab_02",
						"type" : "radio_button",

						#"x" : 10 + 78,
						"x" : 10 + 39,
						"y" : 33,

						"default_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_01.sub",
						"over_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_02.sub",
						"down_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_03.sub",
						"tooltip_text" : uiScriptLocale.INVENTORY_PAGE_BUTTON_TOOLTIP_2,

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

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

								"all_align" : "center",

								"text" : "II",
							},
						),
					},
					
					{
						"name" : "Inventory_Tab_03",
						"type" : "radio_button",

						"x" : 10 + 39 + 39,
						"y" : 33,

						"default_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_01.sub",
						"over_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_02.sub",
						"down_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_03.sub",
						"tooltip_text" : uiScriptLocale.INVENTORY_PAGE_BUTTON_TOOLTIP_3,

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

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

								"all_align" : "center",

								"text" : "III",
							},
						),
					},
					
					{
						"name" : "Inventory_Tab_04",
						"type" : "radio_button",

						"x" : 10 + 39 + 39 + 39,
						"y" : 33,

						"default_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_01.sub",
						"over_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_02.sub",
						"down_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_03.sub",
						"tooltip_text" : uiScriptLocale.INVENTORY_PAGE_BUTTON_TOOLTIP_4,

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

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

								"all_align" : "center",

								"text" : "IV",
							},
						),
					},

					## Item Slot
					{
						"name" : "ItemSlot",
						"type" : "grid_table",

						"x" : 8,
						"y" : 55,

						"start_index" : 0,
						"x_count" : 5,
						"y_count" : 9,
						"x_step" : 32,
						"y_step" : 32,

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

					## Print
					{
						"name":"Money_Icon",
						"type":"image",
						"vertical_align":"bottom",
						
						"x":57,
						"y":26,

						"image":"d:/ymir work/ui/game/windows/money_icon.sub",
					},
					{
						"name":"Money_Slot",
						"type":"button",

						"x":75,
						"y":28,

						#"horizontal_align":"center",
						"vertical_align":"bottom",

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

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

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

								"horizontal_align" : "right",
								"text_horizontal_align" : "right",

								"text" : "123456789",
							},
						),
					},

 

Could someone please advise me?

 

 

 

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Premium
Posted (edited)

bump and new:

https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif

Currently the buttons are working for me, but the background of the inventory has moved. The paradox is that if I shrink the crossed out field, the inventory slots will shrink and it is not possible to put items on those fields. But the buttons work (sidebar).

import item
import app

TEXT_VEGAS_1 = "Description button 1"
TEXT_VEGAS_2 = "Description button 2"
TEXT_VEGAS_3 = "Description button 3"
TEXT_VEGAS_4 = "Description button 4"
TEXT_VEGAS_5 = "Description button 5"
TEXT_VEGAS_6 = "Description button 6"

########################################
GET_IMAGE_BUTTON = "d:/ymir work/item/quest/"
########################################

INV_FUNC_X = 9
INV_FUNC_Y = 10
INV_FUNC_ADD = 32
VEGAS_BOARD = 40

EQUIPMENT_START_INDEX = False

if app.ENABLE_ADDITIONAL_EQUIPMENT_PAGE:
    BOARD_HEIGHT = 375
    window = {
        "name" : "InventoryWindow",

        ## 600 - (width + żŔ¸ĄÂĘŔ¸·Î şÎĹÍ ¶çżě±â 24 px)
        "x" : SCREEN_WIDTH - 176 - VEGAS_BOARD - 5,
        "y" : SCREEN_HEIGHT - 37 - BOARD_HEIGHT,

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

        "width" : 176 + VEGAS_BOARD,
        "height" : BOARD_HEIGHT,

        "children" :
        [
            {
                "name" : "vegas_board",
                "type" : "board",
                "style" : ("attach",),

                "x" : 0,
                "y" : 0,
                #"vertical_align":"center",

                "width" : VEGAS_BOARD,
                "height" : 210,

                "children" :
                (
                    {
                        "name" : "Button_Function_1",
                        "type" : "button",

                        "x" : INV_FUNC_X,
                        "y" : INV_FUNC_Y,

                        "tooltip_text" : TEXT_VEGAS_1,

                        "default_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_01.tga",
                        "over_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_02.tga",
                        "down_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_03.tga",
                    },
                    {
                        "name" : "Button_Function_2",
                        "type" : "button",

                        "x" : INV_FUNC_X,
                        "y" : INV_FUNC_Y + INV_FUNC_ADD,

                        "tooltip_text" : TEXT_VEGAS_2,

                        "default_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_01.tga",
                        "over_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_02.tga",
                        "down_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_03.tga",
                    },    
                    {
                        "name" : "Button_Function_3",
                        "type" : "button",

                        "x" : INV_FUNC_X,
                        "y" : INV_FUNC_Y + INV_FUNC_ADD * 2,

                        "tooltip_text" : TEXT_VEGAS_3,

                        "default_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_01.tga",
                        "over_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_02.tga",
                        "down_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_03.tga",
                    },    
                    {
                        "name" : "Button_Function_4",
                        "type" : "button",

                        "x" : INV_FUNC_X,
                        "y" : INV_FUNC_Y + INV_FUNC_ADD * 3,

                        "tooltip_text" : TEXT_VEGAS_4,

                        "default_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_01.tga",
                        "over_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_02.tga",
                        "down_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_03.tga",
                    },    
                    {
                        "name" : "Button_Function_5",
                        "type" : "button",

                        "x" : INV_FUNC_X,
                        "y" : INV_FUNC_Y + INV_FUNC_ADD * 4,

                        "tooltip_text" : TEXT_VEGAS_5,

                        "default_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_01.tga",
                        "over_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_02.tga",
                        "down_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_03.tga",
                    },    
                    {
                        "name" : "Button_Function_6",
                        "type" : "button",

                        "x" : INV_FUNC_X,
                        "y" : INV_FUNC_Y + INV_FUNC_ADD * 5,

                        "tooltip_text" : TEXT_VEGAS_6,

                        "default_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_01.tga",
                        "over_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_02.tga",
                        "down_image" : "d:/ymir work/ui/dragonsoul/DragonSoul_Button_03.tga",
                    },    
                ),
            },
            ## Inventory, Equipment Slots
            {
                "name" : "board",
                "type" : "board",
                "style" : ("attach",),

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

                "width" : 176,
                "height" : BOARD_HEIGHT,

                "children" :
                [
                    ## Title
                    {
                        "name" : "TitleBar",
                        "type" : "titlebar",
                        "style" : ("attach",),

                        "x" : 8,
                        "y" : 7,

                        "width" : 161,
                        "color" : "yellow",

                        "children" :
                        (
                            { "name":"TitleName", "type":"text", "x":77, "y":3, "text":uiScriptLocale.INVENTORY_TITLE, "text_horizontal_align":"center" },
                        ),
                    },
                    {
                        "name" : "Inventory_Tab_01",
                        "type" : "radio_button",

                        "x" : 10,
                        "y" : 33,

                        "default_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_01.sub",
                        "over_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_02.sub",
                        "down_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_03.sub",
                        "tooltip_text" : uiScriptLocale.INVENTORY_PAGE_BUTTON_TOOLTIP_1,

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

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

                                "all_align" : "center",

                                "text" : "I",
                            },
                        ),
                    },

 

Edited by Metin2 Dev International
Core X - External 2 Internal
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.