diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /utils/vgui_panel_zoo/MenuDemo2.cpp | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'utils/vgui_panel_zoo/MenuDemo2.cpp')
| -rw-r--r-- | utils/vgui_panel_zoo/MenuDemo2.cpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/utils/vgui_panel_zoo/MenuDemo2.cpp b/utils/vgui_panel_zoo/MenuDemo2.cpp new file mode 100644 index 0000000..0ed25b3 --- /dev/null +++ b/utils/vgui_panel_zoo/MenuDemo2.cpp @@ -0,0 +1,42 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//=============================================================================// + +#include "MenuDemo.h" + +class MenuDemo; + +using namespace vgui; + + +class MenuDemo2 : public MenuDemo +{ + public: + MenuDemo2(Panel *parent, const char *name); +}; + +//----------------------------------------------------------------------------- +// Purpose: Constructor +//----------------------------------------------------------------------------- +MenuDemo2::MenuDemo2(Panel *parent, const char *name) : MenuDemo(parent, name) +{ + // Set the number of items visible in the menu at one time to 5 + // If there are more than 5 items in the menu a scrollbar will + // be added automatically + m_pMenu->SetNumberOfVisibleItems(5); + + // Lets also make it so this menu opens up above the button + // instead of below it + m_pMenuButton->SetOpenDirection(Menu::UP); +} + + +Panel* MenuDemo2_Create(Panel *parent) +{ + return new MenuDemo2(parent, "MenuDemo2"); +} + + |