ImagePanel

From Empires Wiki
Jump to: navigation, search

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

Properties

Properties Inherited from ImagePanel

  • 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:
  • drawColor: The color to multiply the image with.
  • border: Name of the border type
  • fillcolor_override: Background color behind the image.
  • drawcolor_override: The color to multiply the image with.

Properties Inherited from Panel

  • fieldName: Determines the name of the control.
  • xpos: Determines the horizontal offset from the top left (by default) of the parent panel.
  • ypos: Determines the vertical offset from the top left (by default) of the parent panel.
  • wide: Determines the width of the control.
  • tall: Determines the height of the control.
  • zpos: Determines the depth of the panel. Deeper panels are drawn first. Lower numbers = deeper.
  • pinCorner: The pinned corner is the one positioned at xpos/ypos. Values are: TOPLEFT (default), TOPRIGHT, BOTTOMLEFT, BOTTOMRIGHT
  • pinnedCornerOffsetX:
  • pinnedCornerOffsetY:
  • unpinnedCornerOffsetX:
  • unpinnedCornerOffsetY:
  • visible: Determines if the control will be drawn.
  • enabled: Determines if the control is enabled. Used by controls higher up the chain (like Buttons).
  • ignoreScheme:
  • tabPosition: Determines the tab order of the control.
  • tooltiptext: Determines the tooltip text to show when you hover over this control.
  • paintbackground: Paint the background color of this control.
  • paintBackgroundType:
  • paintborder: Paint the border of this control.
  • autoResize: Sets which edges of the panel can be resized. Values are: 0 (NO, default), 1 (RIGHT), 2 (DOWN), 3 (DOWNANDRIGHT)
  • fgcolor_override: Sets the foreground color
  • bgcolor_override: Sets the background color

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