1 Star 0 Fork 0

yoyojacky/CSMoE

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
QueryBox.h 1.63 KB
一键复制 编辑 原始数据 按行查看 历史
萌殇小白白๑ 提交于 2019-04-20 21:32 +08:00 . vgui2 MOTD (not working yet...)
//========= Copyright ?1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose: Creates a Message box with a question in it and yes/no buttons
//
// $NoKeywords: $
//=============================================================================//
#ifndef QUERYBOX_H
#define QUERYBOX_H
#ifdef _WIN32
#pragma once
#endif
#include <tier1/KeyValues.h>
#include "MessageBox.h"
#include "Button.h"
namespace vgui2
{
//-----------------------------------------------------------------------------
// Purpose: Creates A Message box with a question in it and yes/no buttons
//-----------------------------------------------------------------------------
class QueryBox : public MessageBox
{
DECLARE_CLASS_SIMPLE( QueryBox, MessageBox );
public:
QueryBox(const char *title, const char *queryText, Panel *parent = NULL );
QueryBox(const wchar_t *wszTitle, const wchar_t *wszQueryText, Panel *parent = NULL);
~QueryBox();
// Layout the window for drawing
virtual void PerformLayout();
// Set the keyvalues to send when ok button is hit
void SetOKCommand(KeyValues *keyValues);
// Set the keyvalues to send when the cancel button is hit
void SetCancelCommand(KeyValues *keyValues);
// Set the text on the Cancel button
void SetCancelButtonText(const char *buttonText);
void SetCancelButtonText(const wchar_t *wszButtonText);
// Set a value of the ok command
void SetOKCommandValue(const char *keyName, int value);
protected:
virtual void OnKeyCodeTyped(KeyCode code);
virtual void OnCommand(const char *command);
Button *m_pCancelButton;
private:
KeyValues *m_pCancelCommand;
KeyValues *m_pOkCommand;
};
}
#endif // QUERYBOX_H
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yoyojacky/CSMoE.git
git@gitee.com:yoyojacky/CSMoE.git
yoyojacky
CSMoE
CSMoE
master

搜索帮助