-
Notifications
You must be signed in to change notification settings - Fork 12
Medigun Info
The Medigun info module is broken up into two main parts: separated and embedded panels. Whichever one you choose to use (or both), it is recommended to download https://github.com/Wiethoofd/TF2-MedigunInfo. This will give you a starting point for the separated medigun panels, and includes icons for the different mediguns.
Separated panels are free-floating panels with their own "stacking" abilities. Because they are in their own root panel (and other reasons), it is not possible to use PinToSibling to attach them to existing HUD panels. These panels can be configured by editing /tf/resource/ui/MedigunInfo.res.
-
ce_mediguninfo_separate_enabled
: Enables the Medigun Info module.
-
ce_mediguninfo_separate_reload
: Reloads the configuration file for separated medigun info panels (from /tf/resource/ui/MedigunInfo.res)
Embedded medigun panels adds extra controls and makes additional data available to specgui player panels.
-
ce_mediguninfo_embedded_enabled
: Enables embedded medigun panels. -
ce_mediguninfo_embedded_medigun_text
: Text to use for the Medi-Gun for the %medigun% dialog variable on playerpanels. -
ce_mediguninfo_embedded_kritzkrieg_text
: Text to use for the Kritzkrieg for the %medigun% dialog variable on playerpanels. -
ce_mediguninfo_embedded_quickfix_text
: Text to use for the Quick-Fix for the %medigun% dialog variable on playerpanels. -
ce_mediguninfo_embedded_vaccinator_text
: Text to use for the Vaccinator for the %medigun% dialog variable on playerpanels.
In order to use embedded medigun panels, the /tf/resource/ui/spectatortournament.res must be modified to add support.
Enabling medigun icons is as simple as adding an ImagePanel
named MedigunIconRed
or MedigunIconBlue
. Only one will ever be visible at a time. For performance reasons, these names are case sensitive.
Medigun charge percentage text is already supported in the base game. Just add a CExLabel
and use the dialog variable chargeamount
:
NameDoesntMatter
{
ControlName CExLabel
fieldname NameDoesntMatter
labelText "%chargeamount%"
}
We can re-use the chargeamount
dialog variable to power our progress bars. Bonus feature: you can use the direction
setting for (Continuous)ProgressBar to change which direction the progress bar runs. Valid values are north
/east
/south
/west
.
NameDoesntMatter
{
ControlName ContinuousProgressBar
fieldname NameDoesntMatter
variable chargeamount
direction north
}
Embedded medigun info makes an additional dialog variable available: medigun
. This is a string that contains one of the values from the ce_mediguninfo_embedded_????_text
cvars.
NameDoesntMatter
{
ControlName CExLabel
fieldname NameDoesntMatter
labelText "%medigun%"
}