⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 menu.cpp

📁 3D游戏模板
💻 CPP
字号:
/* game menu * Template CS game * (C)2001 Mat Sutcliffe. See license.txt for license info (GPL) */#include <cssysdef.h>#include <iutil/objreg.h>#include <iutil/event.h>#include "menu.h"#include "../game/game.h"/// This whole thing is DEVELOPER MODIFIABLE big time ///Menu::Menu(Game *gam, iObjectRegistry *objreg) {	game = gam;	show();	/* This is where the app starts.	 * Call game->start() and then hide() the menu to start the game.	 */}const char* Menu::init() {	// DEV MOD: do stuff that you want in the constructor	//	but that needs the application to have openned already	// Return NULL if okay, otherwise return error message	return NULL;}Menu::~Menu() {}void Menu::draw() {	// DEV MOD: update screen}void Menu::show() {	// DEV MOD: menu on	visible = 1;}void Menu::hide() {	// DEV MOD: menu off	visible = 0;}bool Menu::toggle() {	if (visible) hide(); else show();	return visible;}bool Menu::HandleEvent(iEvent &ev) {	// DEV MOD: handle input event	return 0;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -