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

📄 console.h

📁 小型的3D游戏引擎
💻 H
字号:
#ifndef _CONSOLE_H_
#define _CONSOLE_H_

#include <windows.h>
#include <gl/gl.h>
#include "../texture.h"
#include "../global.h"
#include "font.h"

enum	ConsoleState { Raised, Lowered };
#define CONSOLEBUFFER 50
#define CMDLINE 80

class GcConsole
{
	public:
		GcConsole();
		void Load();
		void SetSize( int width, int height );
		void Draw();
		void TurnOn();
		void TurnOff();
		void Toggle();
		bool Active() { return ( (m_state == Lowered) ? (true) : (false) ); }
		void SendKey( uint key );
		void AddBuffer( char * text );

	private:
		void RenderBackground();
		void RenderBuffers();
		void RenderCmdLine();
		void Slide();
	
		bool m_active;
		ConsoleState m_state;

		float m_x, m_y;
		float m_width;
		float m_height;

		bool m_sliding;
		int m_slide_speed;

		GcTexture bg_tex;
		GcFont font;
		float tile_repeat;

		char CmdLine[CMDLINE];
		int  CurrentPos;
		char Buffer[CONSOLEBUFFER][CMDLINE];

};

#endif // _CONSOLE_H_

⌨️ 快捷键说明

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