ImagePanel: Difference between revisions

From Empires Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
Displays an image. Inherits all properties from [[Panel]].
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 ==
== Special Properties ==
Line 9: Line 15:
* image: The actual image. Expects a path to a .VMT file in the <code>/materials/vgui</code> folder.
* image: The actual image. Expects a path to a .VMT file in the <code>/materials/vgui</code> folder.
* fillcolor: Determines the background color behind the image. Only painted if the alpha is higher than 0.
* fillcolor: Determines the background color behind the image. Only painted if the alpha is higher than 0.
* positionImage:


== Example ==
== Example ==

Revision as of 03:53, 8 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"
}

See Also