ImagePanel: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 41: | Line 41: | ||
== See Also == | == See Also == | ||
* https://developer.valvesoftware.com/wiki/Understanding_VGUI2_Resource_Files#ImagePanel | * https://developer.valvesoftware.com/wiki/Understanding_VGUI2_Resource_Files#ImagePanel | ||
[[Category:VGUI Elements]] |
Revision as of 13:09, 7 August 2017
Displays an image. Inherits all properties from Panel.
Tips
When creating a new ImagePanel, try creating it with the following options:
- positionImage 0
- autoResize 0
- scaleImage 1
Special Properties
- scaleImage: A boolean that determines whether to scale the image to its specified width and height.
- scaleAmount: A float that determines how much the image should scale.
- tileImage: A boolean that determines whether to tile the image.
- tileHorizontally: A boolean that determines whether to tile the image horizontally.
- tileVertically: A boolean that determines whether to tile the image vertically.
- image: The actual image. Expects a path to a .VMT file in the
/materials/vgui
folder. - fillcolor: Determines the background color behind the image. Only painted if the alpha is higher than 0.
- positionImage:
Example
"HudHealthOverlay" { "ControlName" "ImagePanel" "fieldName" "HudHealthOverlay" "xpos" "0" "ypos" "0" "wide" "512" "tall" "128" "positionImage" "0" "autoResize" "0" "pinCorner" "0" "visible" "1" "enabled" "1" "tabPosition" "0" "image" "hud/lower_left" "scaleImage" "1" "scaleAmount" "0.5" }