#How to move the placement of my mute and report buttons.

1 messages · Page 1 of 1 (latest)

empty crow
#

As you can see, I made my own mute buttons panel however I was wondering if there is a way to move it to where they are in regular Dota for a more natural look. Is there a way to do this that doesn't involve disabling the standard flyout scoreboard and building it all from scratch? Or is it out there the .xml, .ts and .css file for the standard flyout scoreboard that I can copy and paste into my game files?

long kelp
#

Valve don't use .ts except one time in event custom game for test purpose. You can copy paste any valve panorama if you wish, but of most of time it will not work because it rely on internal valve c++ stuff

empty crow
long kelp
#

You can edit it in runtime using js, but it very fragile with random valve changes

empty crow
#

edit the official scoreboard?

long kelp
#

Any ui part

ornate trellis
#

just parent it to dota panel, but you must apply styles before parent or the they has no effect

long kelp
#

i reread your message and yes, you can literally parent your custom buttons to dota scoreboard using js

empty crow
#

Oh that sounds like exactly what I want to do

#

How do I parent it?

#

And by apply styles do you mean creating a seperate .css file?

long kelp
#

Find container class/id using panorama debugger, find it in js and yourPanel.SetParent or how it named to that container

#

#1394606085708709948 message

#

This probably can be example

ornate trellis
empty crow
long kelp
#

This is how i literally replace level/xp circle in my custom game:

    let dotaHudRoot = GetDotaHudRoot();
    
    if(dotaHudRoot == null) {
        return;
    }

    let dotaXpContainer = dotaHudRoot.FindChildTraverse("xp");

    // Replaces dota level/xp circle with custom one
    if(dotaXpContainer != undefined) {
        dotaXpContainer.style.visibility = "collapse";

        if(dotaXpContainer._customXpContainer == undefined) {
            let dotaXpContainerParent = dotaXpContainer.GetParent();

            customXpContainer = $.CreatePanel('Panel', dotaXpContainerParent, '');
            customXpContainer.BLoadLayout('file://{resources}/layout/custom_game/dota_hud/dota_xp_container.xml', false, false);
            dotaXpContainerParent.MoveChildAfter(customXpContainer, dotaXpContainer);

            customXpContainer.SetPanelEvent("onactivate", function() {
                PingHeroLevel();
            });

            dotaXpContainer._customXpContainer = customXpContainer;
        } else
        {
            customXpContainer = dotaXpContainer._customXpContainer;
        }

        customLevelLabel = customXpContainer.FindChildTraverse("LevelLabel");
        customLevelProgressBar = customXpContainer.FindChildTraverse("CircularXPProgress");
        customLevelProgressBlurBar = customXpContainer.FindChildTraverse("CircularXPProgressBlur");
    } else
    {
        $.Msg("Valve break something or did major changes to UI (can't replace xp bar).");
    }
empty crow
long kelp
#

This script referenced in one of xml:

<root>
    <Panel>
        <CustomUIElement type="Hud"                 layoutfile="file://{resources}/layout/custom_game/dota_hud.xml" />
    </Panel>
</root>
empty crow
long kelp
#

yes

ornate trellis
empty crow
empty crow
ornate trellis
empty crow