Jump to content

Ingame Item shop Problem


Recommended Posts

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:

5HKPUn0.png

 

 

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",
                },

            ),
        },
    ),
}
 

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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.