Jump to content
  • 0

How to create button expand?


VlzOhMG

Question

Hello, I have a button on my taskbar, but I would like that when clicking on it, it would show the other buttons on the side (as shown), that I wanted to do on other buttons that I had ... has active functions ...

Here is the image below:

otUvFJS.png

 

I would like it to look like the attack system, as shown in the image below

 

xJLd8NY.png

 

Sorry for my bad english =x

Link to post

5 answers to this question

Recommended Posts

  • 0
import uiScriptLocale
import app

BASE = "diretory"
BASE_BTN = "diretory"

Y_ADD_POSITION = 0

window = {
	"name" : "TaskBar",

	"x" : SCREEN_WIDTH - 240,
	"y" : SCREEN_HEIGHT - 55,

	"width" : 255,
	"height" : 158,

	"children" :
	(	
	

		{
			"name" : "BG",
			"type" : "image",

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

			"width" : 128,
			"height" : 128,
			
			"image" : BASE + "new_right.tga",

		},
		{
			"name" : "SystemButton",
			"type" : "button",

			"x" : 210,
			"y" : 23,

			"tooltip_text" : uiScriptLocale.TASKBAR_SYSTEM,

			"default_image" : BASE_BTN + "options_01_normal.tga",
			"over_image" : BASE_BTN + "options_02_hover.tga",
			"down_image" : BASE_BTN + "options_03_active.tga",
		},
		## teste botao
		{
			"name" : "button_panel",
			"type" : "expanded_image",

			"x" : 110,
			"y" : 20,

			"width" : 50,
			"height" : 50,

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

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

					"default_image" : BASE_BTN + "panel_01_normal.tga",
					"over_image" : BASE_BTN + "panel_02_hover.tga",
					"down_image" : BASE_BTN + "panel_03_active.tga",
				},
			),
		},
		#{
		#	"name" : "button_panel",
		#	"type" : "button",

		#	"x" : 120,
		#	"y" : 20,

		#	"tooltip_text" : "[!]Deschide panoul utilizatorului.",
		#	"default_image" : BASE_BTN + "panel_normal.tga",
		#	"over_image" : BASE_BTN + "panel_over.tga",
		#	"down_image" : BASE_BTN + "panel_down.tga",
		#},
		{
			"name" : "MessengerButton",
			"type" : "button",


			"x" : 183,
			"y" : 23,

			"tooltip_text" : uiScriptLocale.TASKBAR_MESSENGER,

			"default_image" : BASE_BTN + "friends_01_normal.tga",
			"over_image" : BASE_BTN + "friends_02_hover.tga",
			"down_image" : BASE_BTN + "friends_03_active.tga",
		},
		{
			"name" : "InventoryButton",
			"type" : "button",

			"x" : 156,
			"y" : 23,

			"tooltip_text" : uiScriptLocale.TASKBAR_INVENTORY,

			"default_image" : BASE_BTN + "inventory_01_normal.tga",
			"over_image" : BASE_BTN + "inventory_02_hover.tga",
			"down_image" : BASE_BTN + "inventory_03_active.tga",
		},
        {
            "name" : "Money",
            "type" : "text",
        
            "x" : -350,
            "y" : 10,
        
            "horizontal_align" : "right",
            "text_horizontal_align" : "right",
			"color" : 0xfff8d090,
            "text" : "123456789",
        },
		#{
		#	"name" : "MoreButtons",
		#	"type" : "button",

		#	"x" : 188 + 10,
		#	"y" : 65,
		#	"tooltip_text" : uiScriptLocale.TASKBAR_MONEY_EXPAND,

		#	"default_image" : BASE_BTN + "more_btn_leave_01_normal.tga",
		#	"over_image" : BASE_BTN + "more_btn_leave_01_hover.tga",
		#	"down_image" : BASE_BTN + "more_btn_leave_01_active.tga",
		#},
		{
			"name" : "ExpandedMoneyTaskBar",
			"type" : "button",

			"x" : 50,
			"y" : 23,
			"tooltip_text" : uiScriptLocale.TASKBAR_MONEY_EXPAND,

			"default_image" : BASE_BTN + "Ex_gemshop_button_01.tga",
			"over_image" : BASE_BTN + "Ex_gemshop_button_02.tga",
			"down_image" : BASE_BTN + "Ex_gemshop_button_03.tga",
		},
		{
			"name" : "OfflineShopButton",
			"type" : "button",

			"x" : 20,
			"y" : 23,

			"tooltip_text" : uiScriptLocale.TASKBAR_OFFLINE_SHOP,

			"default_image" : "locale/es/offlineshop/new_offline_shop_1.tga",
			"over_image" : "locale/es/offlineshop/new_offline_shop_2.tga",
			"down_image" : "locale/es/offlineshop/new_offline_shop_3.tga",
		},
		{
			"name" : "SpecialInventoryButton",
			"type" : "button",

			"x" : -10,
			"y" : 23,

			"tooltip_text" : uiScriptLocale.ENABLE_SPLIT_INVENTORY_SYSTEM,

			"default_image" : "locale/es/offlineshop/new_offline_shop_1.tga",
			"over_image" : "locale/es/offlineshop/new_offline_shop_2.tga",
			"down_image" : "locale/es/offlineshop/new_offline_shop_3.tga",
		},
	),
}

This is my taskbar (root)... I wanted to put SpecialInventoryButton, OfflineShopButton and ExpandedMoneyTaskBar due to that button (button_panel / #teste button) ... Would you need any other code?

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • 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.