VGUI ListPanel: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Thunder4ik (talk | contribs) m (→top: Unicodifying, replaced: [[Image: → [[File:) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{stub}} | |||
A ListPanel is a vgui2 element defined in the vgui_controls library, in the file ListPanel.cpp. ListPanels are available in all source games. ListPanels are used for listing information in a tabular format. | A ListPanel is a vgui2 element defined in the vgui_controls library, in the file ListPanel.cpp. ListPanels are available in all source games. ListPanels are used for listing information in a tabular format. | ||
[[ | [[File:ListPanel.jpg|thumb|This is a screenshot of a ListPanel used in Valve's MP3 player.]] | ||
== Example Usage == | == Example Usage == | ||
Line 16: | Line 9: | ||
#include <vgui_controls/ListPanel.h> | #include <vgui_controls/ListPanel.h> | ||
using namespace vgui; | using namespace vgui; | ||
Latest revision as of 02:10, 9 January 2024
A ListPanel is a vgui2 element defined in the vgui_controls library, in the file ListPanel.cpp. ListPanels are available in all source games. ListPanels are used for listing information in a tabular format.
Example Usage
Before creating anything, we first need to include the ListPanel header file and use the vgui namespace.
#include <vgui_controls/ListPanel.h>
using namespace vgui;
ListPanels can be created via the c++ keyword new with a simple call to ListPanel.
ListPanel* myPanel = new ListPanel(this, "myPanel");
Additional Information
Additional information and examples can be found by looking at the MP3 code, found in mp3player.cpp in the game_controls folder.