Welcome to Onforum.net - Web and gaming resource community

Join us now to get access to all our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, and so, so much more. It's also quick and totally free, so what are you waiting for?

Quests /Python [MINI-PY]Change Help Window and add more pages

Aioria

Banned
Banned
Credits
1
Hi guys! First of all sorry for my bad english.

This is a mini-release i've done years ago, and now i'll post it here, hoping some guy can enjoy it.
This edit was done cause i've ever hate the button-config to mount on horse, and always open the help window instead, so we're gonna change them.

Unpack "root/game.py" and search:

Code:
    def    __PressHKey(self):
        if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
            net.SendChatPacket("/user_horse_ride")
        else:
            self.interface.OpenHelpWindow()

replace with:

Code:
    def    __PressHKey(self):
        if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
            self.interface.OpenHelpWindow()
        else:
            net.SendChatPacket("/user_horse_ride")

In this way you'll mount on horse by pressing "H" and open help window with "CTRL+H"
You can even disable the help window and let the horse command like always by replace:

Code:
            self.interface.OpenHelpWindow()

with "pass"

You can even add help window pages and use them like wiki or others if you're good enough (i'm not :D)

So, just open the file "root/uihelp.py" and replace:

Code:
ENABLE_HELP_MULTIPAGE = 0

with

ENABLE_HELP_MULTIPAGE = 1

then can go to "root/helpwindow2.py" and make your edits, you can add lot of pages if you want, images, ecc

This is an example without edits of helpwindow2.py

j8IKMKi.jpg



Sorry if this is just a mini release! Love you.
 
Last edited:

[RaffaeL]

Administrator
Administrator
Credits
9
Hi guys! First of all sorry for my bad english.

This is a mini-release i've done years ago, and now i'll post it here, hoping some guy can enjoy it.
This edit was done cause i've ever hate the button-config to mount on horse, and always open the help window instead, so we're gonna change them.

Unpack "root/game.py" and search:

Code:
    def    __PressHKey(self):
        if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
            net.SendChatPacket("/user_horse_ride")
        else:
            self.interface.OpenHelpWindow()

replace with:

Code:
    def    __PressHKey(self):
        if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
            self.interface.OpenHelpWindow()
        else:
            net.SendChatPacket("/user_horse_ride")

In this way you'll mount on horse by pressing "H" and open help window with "CTRL+H"
You can even disable the help window and let the horse command like always by replace:

Code:
            self.interface.OpenHelpWindow()

with "pass"

You can even add help window pages and use them like wiki or others if you're good enough (i'm not :D)

So, just open the file "root/uihelp.py" and replace:

Code:
ENABLE_HELP_MULTIPAGE = 0

with

ENABLE_HELP_MULTIPAGE = 1

then can go to "root/helpwindow2.py" and make your edits, you can add lot of pages if you want, images, ecc

This is an example without edits of helpwindow2.py

j8IKMKi.jpg



Sorry if this is just a mini release! Love you.

You can even add help window pages and use them like wiki or others if you're good enough (i'm not :D)

You don't need to be overskilled to add those pages. Just:
Python:
#Second page
{
            "name" : "page_2",
            "type" : "window",

            "x" : SCREEN_WIDTH * 150 / 800,
            "y" : SCREEN_HEIGHT * START_HEIGHT / 600,
            "width" : 0,
            "height" : 0,

            "children" :
            (
                {
                    "name" : "help_02_01", "type" : "text", "outline" : 1,
                    "x" : 0, "y" : SCREEN_HEIGHT * HEIGHT_STEP*0,
                    "text" : "Your 1st text here",
                },
                {
                    "name" : "help_02_02", "type" : "text", "outline" : 1,
                    "x" : 0, "y" : HEIGHT_STEP*1,
                    "text" : "Your 2nd text here",
                },
                {
                    "name" : "help_02_03", "type" : "text", "outline" : 1,
                    "x" : 0, "y" : HEIGHT_STEP*1,
                    "text" : "Your 3rd text here",
                },
            ),
        },
#3rd page
        {
            "name" : "page_3",
            "type" : "window",

            "x" : SCREEN_WIDTH * 150 / 800,
            "y" : SCREEN_HEIGHT * START_HEIGHT / 600,
            "width" : 0,
            "height" : 0,

            "children" :
            (
                {
                    "name" : "help_03_01", "type" : "text", "outline" : 1,
                    "x" : 0, "y" : SCREEN_HEIGHT * HEIGHT_STEP*0,
                    "text" : "Your 1st text here",
                },
                {
                    "name" : "help_03_02", "type" : "text", "outline" : 1,
                    "x" : 0, "y" : HEIGHT_STEP*1,
                    "text" : "Your 2nd text here",
                },
                {
                    "name" : "help_03_03", "type" : "text", "outline" : 1,
                    "x" : 0, "y" : HEIGHT_STEP*1,
                    "text" : "Your 3rd text here",
                },

                ## An so on.....
            ),
        },

Then, search bellow in the same file, and add buttons for those pages. Just copy-paste the existing code, for button.
 

Similar threads


About us

OnForum.net is a resource community where aspiring webmasters and designers can share content and receive support for a wide variety of software platforms. We are working every day to make sure our community is one of the best.

None of the files are hosted on this site.

PARTNERS

Follow us

We recommend

Doza de Blog
Top

Dear User!

We found that you are blocking the display of ads on our site.

Please add it to the exception list or disable AdBlock.

The advertises that you'll see aren't intrusive they just help us to keep the community alive

If you don't want to see those ads just buy an upgrade.

Thank you for understanding!