blob: 0ed25b3343a6843961869db1a2a9fc32aab34044 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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");
}
|