VGUI Panel: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(Made things easier to read, added more details)
Line 1: Line 1:
{{stub}}
{{stub}}
=VGUI Panel=


==Object Description==
An object that can have other objects placed inside it.
Often used as the main 'window' of a VGUI display.


"xpos" "300"
From the header file Panel.h:
Will position on x = 300, where x = 0 is the first position to the left and grows to the right.
<pre>
//-----------------------------------------------------------------------------
// Purpose: Base interface to all vgui windows
// All vgui controls that receive message and/or have a physical presence
// on screen are be derived from Panel.
// This is designed as an easy-access to the vgui-functionality; for more
// low-level access to vgui functions use the IPanel/IClientPanel interfaces directly
//-----------------------------------------------------------------------------
</pre>


"xpos" "r300"
==Availibility==
Will position on x = 300, where x = 0 is the first position to the right and grows to the left.
This object is available in all Source games.
In code it is represented by class '''Panel''', defined in <code>vgui_controls/Panel.h</code>


"xpos" "c300"
==Keyvalues==
Will position on x = 300, where x = 0 is at the center of the screen and grows to the right.
*'''"xpos"'''
:<string> X Position (column) of the panel.
::Examples:
::"xpos" "300"
:::Will position on x = 300, where x = 0 is the first position to the left and grows to the right.
::"xpos" "r300"
:::Will position on x = 300, where x = 0 is the first position to the right and grows to the left.
::"xpos" "c300"
:::Will position on x = 300, where x = 0 is at the center of the screen and grows to the right.
::The numeric value is parsed with atoi().


The numeric value is parsed with atoi().
*'''"ypos"'''
:<string> Y Position (row) of the panel.
::Examples:
::"ypos" "300"
:::Will position on y = 300, where y = 0 is the first position from the top and grows to the right.
::"ypos" "r300"
:::Will position on y = 300, where y = 0 is the first position from the bottom and grows to the right.
::"ypos" "c300"
:::Will position on y = 300, where y = 0 is at the center of the screen and grows to the right.
::The numeric value is parsed with atoi().


--
*'''zpos'''
:<string> Positions on z. Default is '''"1"'''


"ypos" "300"
*'''wide'''
Will position on y = 300, where y = 0 is the first position from the top and grows to the right.
:<string> Control width.


"ypos" "r300"
*'''tall'''
Will position on y = 300, where y = 0 is the first position from the bottom and grows to the right.
:<string> Control height.


"ypos" "c300"
*'''"IgnoreScheme"'''
Will position on y = 300, where y = 0 is at the center of the screen and grows to the right.
:<integer> Default 0
:Valid range: 0, 1
:// only get colors if we're ignoring the scheme


The numeric value is parsed with atoi().
*'''"visible"'''
:<integer> Wether the control is visible or not.
:Default: 1
:Valid range: 0, 1


--
*'''"enabled"'''
:<integer> Wether the control can be used.
:Default: 1
:Valid range: 0, 1


"zpos" "1"
*'''"tabPosition"'''
:<integer> Controls the tab sequence.
:Used to set the order of what object gets the focus when tab is pressed.
:Default: 0
:Valid range: 0, ... 255


Positions on z.
*'''"tooltiptext"'''
:<string> Text displayed when mouse is hovered over control
:''Doesnt work on XBOX''


--
*'''paintbackground'''
:<integer> Draw the background of the object (?)
:Default: -1
:Valid range: -1, 0


"wide" "32"
*'''"paintborder"'''
:<integer> Draw the border of the object (?)
:Default: -1
:Valid range: -1, 0


Control width.
*'''"fieldName"'''
:<string> Sets the control's name, default NULL


--
*'''"AutoResize"'''
: <string> Controls resizing ability
: Default: "no"
:
: Valid range:
: enum AutoResize_e
: {
: AUTORESIZE_NO = 0,
: AUTORESIZE_RIGHT,
: AUTORESIZE_DOWN,
: AUTORESIZE_DOWNANDRIGHT,
: };


"tall" "32"
*'''"PinCorner"'''
:<string> Controls where the 'pin' pulldown menu is displayed
:Default: "topleft"
:Valid range: TOPLEFT, TOPRIGHT, BOTTOMLEFT, BOTTOMRIGHT


Control height.
*'''"PinnedCornerOffsetX"'''
 
*'''"PinnedCornerOffsetY"'''
--
*'''"UnpinnedCornerOffsetX"'''
 
*'''"UnpinnedCornerOffsetY"'''
"IgnoreScheme" 0/1
 
default 0
// only get colors if we're ignoring the scheme
 
--
 
"visible" 0/1
 
default 1
 
--
 
"enabled" 0/1
 
default 1
 
--
 
"tabPosition" 0-n
 
default 0
 
--
 
"tooltiptext" "text"
 
default NULL (no tooltip)
doesnt work on XBOX
 
--
 
"paintbackground" integer
 
default -1
 
--
 
"paintborder" value
 
default -1
 
--
 
"fieldName" text
 
sets the control's name, default NULL
 
 
 
 
AutoResizeSettings:
 
"AutoResize" integer
defaults no
enum AutoResize_e
{
AUTORESIZE_NO = 0,
AUTORESIZE_RIGHT,
AUTORESIZE_DOWN,
AUTORESIZE_DOWNANDRIGHT,
};
 
--
 
"PinCorner" integer
 
defaults topleft
enum PinCorner_e
{
PIN_TOPLEFT = 0,
PIN_TOPRIGHT,
PIN_BOTTOMLEFT,
PIN_BOTTOMRIGHT,
};
 
"PinnedCornerOffsetX"
"PinnedCornerOffsetY"
"UnpinnedCornerOffsetX"
"UnpinnedCornerOffsetY"




[[Category:VGUI_Controls]]
[[Category:VGUI_Controls]]

Revision as of 08:46, 5 January 2007

Stub

This article or section is a stub. You can help by expanding it.

VGUI Panel

Object Description

An object that can have other objects placed inside it. Often used as the main 'window' of a VGUI display.

From the header file Panel.h:

//-----------------------------------------------------------------------------
// Purpose: Base interface to all vgui windows
//			All vgui controls that receive message and/or have a physical presence
//			on screen are be derived from Panel.
//			This is designed as an easy-access to the vgui-functionality; for more
//			low-level access to vgui functions use the IPanel/IClientPanel interfaces directly
//-----------------------------------------------------------------------------

Availibility

This object is available in all Source games. In code it is represented by class Panel, defined in vgui_controls/Panel.h

Keyvalues

  • "xpos"
<string> X Position (column) of the panel.
Examples:
"xpos" "300"
Will position on x = 300, where x = 0 is the first position to the left and grows to the right.
"xpos" "r300"
Will position on x = 300, where x = 0 is the first position to the right and grows to the left.
"xpos" "c300"
Will position on x = 300, where x = 0 is at the center of the screen and grows to the right.
The numeric value is parsed with atoi().
  • "ypos"
<string> Y Position (row) of the panel.
Examples:
"ypos" "300"
Will position on y = 300, where y = 0 is the first position from the top and grows to the right.
"ypos" "r300"
Will position on y = 300, where y = 0 is the first position from the bottom and grows to the right.
"ypos" "c300"
Will position on y = 300, where y = 0 is at the center of the screen and grows to the right.
The numeric value is parsed with atoi().
  • zpos
<string> Positions on z. Default is "1"
  • wide
<string> Control width.
  • tall
<string> Control height.
  • "IgnoreScheme"
<integer> Default 0
Valid range: 0, 1
// only get colors if we're ignoring the scheme
  • "visible"
<integer> Wether the control is visible or not.
Default: 1
Valid range: 0, 1
  • "enabled"
<integer> Wether the control can be used.
Default: 1
Valid range: 0, 1
  • "tabPosition"
<integer> Controls the tab sequence.
Used to set the order of what object gets the focus when tab is pressed.
Default: 0
Valid range: 0, ... 255
  • "tooltiptext"
<string> Text displayed when mouse is hovered over control
Doesnt work on XBOX
  • paintbackground
<integer> Draw the background of the object (?)
Default: -1
Valid range: -1, 0
  • "paintborder"
<integer> Draw the border of the object (?)
Default: -1
Valid range: -1, 0
  • "fieldName"
<string> Sets the control's name, default NULL
  • "AutoResize"
<string> Controls resizing ability
Default: "no"
Valid range:
enum AutoResize_e
{
AUTORESIZE_NO = 0,
AUTORESIZE_RIGHT,
AUTORESIZE_DOWN,
AUTORESIZE_DOWNANDRIGHT,
};
  • "PinCorner"
<string> Controls where the 'pin' pulldown menu is displayed
Default: "topleft"
Valid range: TOPLEFT, TOPRIGHT, BOTTOMLEFT, BOTTOMRIGHT
  • "PinnedCornerOffsetX"
  • "PinnedCornerOffsetY"
  • "UnpinnedCornerOffsetX"
  • "UnpinnedCornerOffsetY"