EditorColorScheme::EditorColorScheme(fs::path path) : path(path)
{
	try {
		boost::property_tree::read_json(path.generic_string(), pt);
		_name = QString::fromStdString(pt.get<std::string>("name"));
		_index = pt.get<int>("index");
	} catch (const std::exception & e) {
		PRINTB("Error reading color scheme file '%s': %s", path.generic_string() % e.what());
		_name = "";
		_index = 0;
	}
}
void bSyncVideoLayer::draw()
{
    int w = GetConfig.screen_w, h = GetConfig.screen_h;
    glPushMatrix();
        glColor4d( 0.1, 0.1, 0.2, 1.0 );
        bSystem::video_sys.set_matrix_2d();
        glBegin( GL_TRIANGLE_STRIP );
            glVertex2i( 0, 0 );
            glVertex2i( 0, 600 );
            glVertex2i( 800, 0 );
            glVertex2i( 800, 600 );
        glEnd();
        glColor4d( 1.0, 1.0, 1.0, 1.0 );
        PRINTB( 250, 300, B_FONT_LIGHT, "...SYNCHRONIZING FPS TIMER..." );
    glPopMatrix();
}