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