代码拉取完成,页面将自动刷新
//========= 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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。