Created on by Noya

Hiding HUD with SetHUDVisible

caution

This tutorial is outdated. It's recommended to use Panorama for UI manipulation now.

Example:

GameUI.SetDefaultUIEnabled(DotaDefaultUIElement_t.DOTA_DEFAULT_UI_TOP_TIMEOFDAY, false);

There's a function currently missing from the API page: SetHUDVisible(int, bool) which I want to document here.

Credits to BMD for this list:

HUD Componentint value
DOTA_HUD_VISIBILITY_TOP_TIMEOFDAY0
DOTA_HUD_VISIBILITY_TOP_HEROES1
DOTA_HUD_VISIBILITY_TOP_SCOREBOARD2
DOTA_HUD_VISIBILITY_ACTION_PANEL3
DOTA_HUD_VISIBILITY_ACTION_MINIMAP4
DOTA_HUD_VISIBILITY_INVENTORY_PANEL5
DOTA_HUD_VISIBILITY_INVENTORY_SHOP6
DOTA_HUD_VISIBILITY_INVENTORY_ITEMS7
DOTA_HUD_VISIBILITY_INVENTORY_QUICKBUY8
DOTA_HUD_VISIBILITY_INVENTORY_COURIER9
DOTA_HUD_VISIBILITY_INVENTORY_PROTECT10
DOTA_HUD_VISIBILITY_INVENTORY_GOLD11
DOTA_HUD_VISIBILITY_SHOP_SUGGESTEDITEMS12

Note that changing it once doesn't let you change it back without restarting tools, so this shouldn't be used to manipulate the HUD after the game loads.

Usage

Somewhere in a game started event, I used player_connect_full

mode = GameRules:GetGameModeEntity()
mode:SetHUDVisible(hud_component_value, false)