satoshiB
-
Posts
1 -
Joined
-
Last visited
-
Feedback
0%
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.
Ingame Item shop Problem
in Community Support - Questions & Answers
Posted · Edited by Metin2 Dev
Core X - External 2 Internal
Hello, i want to add my browser item shop ... we tryd to change code but dont work.. can someone help me?
interfacemodule.py
def __MakeWebWindow(self):
if constInfo.IN_GAME_SHOP_ENABLE:
import uiWeb
self.wndWeb = uiWeb.WebWindow()
self.wndWeb.LoadWindow()
self.wndWeb.Hide()
game.py
def __InGameShop_Show(self):
if constInfo.IN_GAME_SHOP_ENABLE:
self.interface.OpenWebWindow()
ingame looks like this:
webwindow.py
import uiScriptLocale
WEB_WIDTH = 640
WEB_HEIGHT = 480
window = {
"name" : "MallWindow",
"x" : 0,
"y" : 0,
"style" : ("movable", "float",),
"width" : WEB_WIDTH + 20,
"height" : WEB_HEIGHT + 40,
"children" :
(
{
"name" : "board",
"type" : "board",
"style" : ("attach",),
"x" : 0,
"y" : 0,
"width" : WEB_WIDTH + 20,
"height" : WEB_HEIGHT + 40,
"children" :
(
## Title
{
"name" : "TitleBar",
"type" : "titlebar",
"style" : ("attach",),
"x" : 8,
"y" : 7,
"width" : WEB_WIDTH + 10,
"color" : "yellow",
"children" :
(
{ "name":"TitleName", "type":"text", "x":50, "y":3, "text":uiScriptLocale.SYSTEM_MALL, "text_horizontal_align":"center" },
),
},
),
},
),
}
mallwindow.py
import uiScriptLocale
window = {
"name" : "SafeboxWindow",
"x" : 100,
"y" : 20,
"style" : ("movable", "float",),
"width" : 176,
"height" : 327,
"children" :
(
{
"name" : "board",
"type" : "board",
"x" : 0,
"y" : 0,
"width" : 176,
"height" : 327,
"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.MALL_TITLE, "text_horizontal_align":"center" },
),
},
## Button
{
"name" : "ExitButton",
"type" : "button",
"x" : 0,
"y" : 37,
"text" : uiScriptLocale.CLOSE,
"horizontal_align" : "center",
"vertical_align" : "bottom",
"default_image" : "d:/ymir work/ui/public/large_button_01.sub",
"over_image" : "d:/ymir work/ui/public/large_button_02.sub",
"down_image" : "d:/ymir work/ui/public/large_button_03.sub",
},
),
},
),
}