Inventory System

04/04/2015 10:48 SounndP#1
HIIII. :pwho:D:):confused: knows how to make this system? this icons to right...

[Only registered and activated users can see links. Click Here To Register...]

Thanks

Forgive my English
04/04/2015 11:45 Poccix#2
Inventory System in Metin2 ! o_O Damn it !
---
You can change the size of the window in "locale/de(or other language)/ui/inventorywindow.py" at:
Code:
window = {
	"name" : "InventoryWindow",

	## 600 - (width + 오른쪽으로 부터 띄우기 24 px)
	"x" : SCREEN_WIDTH - 176,
	"y" : SCREEN_HEIGHT - 37 - 565,

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

	"width" : 176,
	"height" : 565,

	"children" :
	(
		## Inventory, Equipment Slots
		{
			"name" : "board",
			"type" : "board",
			"style" : ("attach",),

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

			"width" : 176,
			"height" : 565,
Both width and height declarations.

Then you can add new Buttons like this:

Code:
						{
							"name" : "NewSounndPButton",
							"type" : "button",

							"x" : 118,
							"y" : 148,

							"tooltip_text" : "I'm a new Button",

							"default_image" : "d:/ymir work/ui/game/TaskBar/Mall_Button_01.tga",
							"over_image" : "d:/ymir work/ui/game/TaskBar/Mall_Button_02.tga",
							"down_image" : "d:/ymir work/ui/game/TaskBar/Mall_Button_03.tga",
						},
With your own images and position.

In uiinventory.py in your root folder can you give the button a function.

e.G.
Code:
self.NewSounndPButton = self.GetChild("NewSounndPButton")
self.NewSounndPButton.SetEvent(ui.__mem_func__(self.NewTestFunc))

def NewTestFunc(self):
	import chat
	chat.AppendChat(1,"This is an example for a new function")
04/04/2015 17:57 Zevion#3
-> [Only registered and activated users can see links. Click Here To Register...]