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?
#How to move the placement of my mute and report buttons.
1 messages · Page 1 of 1 (latest)
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
So is there no way to move it unless I build it from scratch, add all the functions through .ts and .xml and then just keep tweaking the .css until it looks like it?
You can edit it in runtime using js, but it very fragile with random valve changes
edit the official scoreboard?
Any ui part
just parent it to dota panel, but you must apply styles before parent or the they has no effect
i reread your message and yes, you can literally parent your custom buttons to dota scoreboard using js
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?
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
no, panel can contain only styles they already have and cant get new styles from other layout panel
So I would add that code to my hud.xml file for example? What file is the action of setting the parent taking place in?
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).");
}
So how do I apply styles?
And youre doing this in hud.xml?
This script referenced in one of xml:
<root>
<Panel>
<CustomUIElement type="Hud" layoutfile="file://{resources}/layout/custom_game/dota_hud.xml" />
</Panel>
</root>
And you figured out the "location" or what the standard level/xp circle is called (dotaXpContainer) through the panorama debugger?
yes
like i say apply before parenting
I dont know what apply styles mean 🙁
Are you applying styles here?
when you got this problem you understand what i trying to say 🙃
dota_xp_container.xml this is where you built your custom one right? Do you have a dota_xp_container.css?