?? menu.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 + -