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

📄 main.cpp

📁 需要clanlib 库 这个改进版的 在linux 很好玩 但是一定要有clanlib
💻 CPP
字号:
#include <ClanLib/core.h>#include <ClanLib/gui.h>#include <ClanLib/gl.h>#include <ClanLib/application.h>#include <ClanLib/display.h>#include <ClanLib/sound.h>#include "MenuSystem/NS_MenuManager.h"#include "ZZ_Theme/stylemanager_zz.h"class ZZ_ThemeExample : public CL_ClanApplication{public:    int main(int argc, char** argv)    {        // Create a console window for text-output if not available//		CL_ConsoleWindow console("Console");//        console.redirect_stdio();        try        {            CL_SetupCore setup_core;            CL_SetupGL setup_gl;            CL_SetupDisplay setup_display;            CL_SetupGUI setup_gui;			CL_SetupSound setup_sound;			CL_SoundOutput output(44100);                        bool full = false;            if (argc > 1)            {                if (std::string(argv[1]) == "-fullscreen")                    full = true;            }			std::cout << ".creating main window" << std::endl;            CL_DisplayWindow window("NaturePark", 800, 600, full);			std::cout << ".loading resources" << std::endl;            CL_ResourceManager resources("resources.xml", false);            CL_StyleManager_ZZ style(&resources);            CL_Display::clear(CL_Color::black);            {                CL_Font fnt("Window/font", &resources);                std::string str("Loading resources: please wait...");                fnt.draw(CL_Display::get_width() / 2 - fnt.get_width(str)/2,                    CL_Display::get_height() / 2, str);                CL_Display::flip();				std::cout << ".initializing\n";				std::cout << ".load all\n";                resources.load_all();            }            NS_MenuManager menu_manager(resources, style);            menu_manager.run();        }        catch (CL_Error e)        {            std::cout << e.message.c_str() << std::endl;            // Display console close message and wait for a key//            console.display_close_message();        }        return 0;    }} app;

⌨️ 快捷键说明

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