mirror of
https://github.com/unknownworlds/NS.git
synced 2024-11-23 04:52:16 +00:00
8552ac617c
git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@1 67975925-1194-0748-b3d5-c16f83f1a3a1
31 lines
1.1 KiB
C
31 lines
1.1 KiB
C
//========= Copyright © 1996-2001, Valve LLC, All rights reserved. ============
|
|
//
|
|
// Purpose:
|
|
//
|
|
// $NoKeywords: $
|
|
//=============================================================================
|
|
|
|
#ifndef VGUI_HELPERS_H
|
|
#define VGUI_HELPERS_H
|
|
#ifdef _WIN32
|
|
#pragma once
|
|
#endif
|
|
|
|
|
|
#include "vgui_panel.h"
|
|
#include "vgui_label.h"
|
|
|
|
|
|
inline int PanelTop(vgui::Panel *pPanel) {int x,y,w,h; pPanel->getBounds(x,y,w,h); return y;}
|
|
inline int PanelLeft(vgui::Panel *pPanel) {int x,y,w,h; pPanel->getBounds(x,y,w,h); return x;}
|
|
inline int PanelRight(vgui::Panel *pPanel) {int x,y,w,h; pPanel->getBounds(x,y,w,h); return x+w;}
|
|
inline int PanelBottom(vgui::Panel *pPanel) {int x,y,w,h; pPanel->getBounds(x,y,w,h); return y+h;}
|
|
inline int PanelWidth(vgui::Panel *pPanel) {int x,y,w,h; pPanel->getBounds(x,y,w,h); return w;}
|
|
inline int PanelHeight(vgui::Panel *pPanel) {int x,y,w,h; pPanel->getBounds(x,y,w,h); return h;}
|
|
|
|
// Places child at the requested position inside pParent. iAlignment is from Label::Alignment.
|
|
void AlignPanel(vgui::Panel *pChild, vgui::Panel *pParent, int alignment);
|
|
|
|
|
|
#endif // VGUI_HELPERS_H
|
|
|