当前位置: 首页>>代码示例>>Java>>正文


Java SplashProgress类代码示例

本文整理汇总了Java中net.minecraftforge.fml.client.SplashProgress的典型用法代码示例。如果您正苦于以下问题:Java SplashProgress类的具体用法?Java SplashProgress怎么用?Java SplashProgress使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SplashProgress类属于net.minecraftforge.fml.client包,在下文中一共展示了SplashProgress类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: bind

import net.minecraftforge.fml.client.SplashProgress; //导入依赖的package包/类
@Hook("net.minecraftforge.fml.client.SplashProgress$Texture#bind")
public static void bind(SplashProgress.Texture texture) {
	if (texture != SplashProgress.forgeTexture)
		return;
	int f = (++index / (60 / 4)) % gifs.length;
	SplashProgress.Texture gif = gifs[f];
	gif.bind();
	float fw = (float) gif.getWidth() / 2;
	float fh = (float) gif.getHeight() / 2;
	glPushMatrix();
	int w = Display.getWidth(), h = Display.getHeight(), offset = 20;
	glLoadIdentity();
	glTranslatef(min(0, (720 - w) / 2) + offset, min(0, (480 - h) / 2) + h - fh - offset, 0);
	glBegin(GL_QUADS);
	gif.texCoord(0, 0, 0);
	glVertex2f(-fw, -fh);
	gif.texCoord(0, 0, 1);
	glVertex2f(-fw, fh);
	gif.texCoord(0, 1, 1);
	glVertex2f(fw, fh);
	gif.texCoord(0, 1, 0);
	glVertex2f(fw, -fh);
	glEnd();
	glPopMatrix();
}
 
开发者ID:NekoCaffeine,项目名称:Alchemy,代码行数:26,代码来源:FMLLoading.java

示例2: performStartupChecks

import net.minecraftforge.fml.client.SplashProgress; //导入依赖的package包/类
@Override
@SuppressWarnings("deprecated")
public void performStartupChecks()
{
    //If the mod is disabled by configuration, just put back the initial value.
    if(!ConfigurationHandler.instance().isFullscreenWindowedEnabled()) {
        return;
    }

    if(ConfigurationHandler.instance().isMaximumCompatibilityEnabled()){
        dsHandler.setInitialFullscreen(client.gameSettings.fullScreen,  ConfigurationHandler.instance().getFullscreenMonitor());
    // This is the correct way to set fullscreen at launch, but LWJGL limitations means we might crash the game if
    // another mod tries to do a similar Display changing operation. Doesn't help the API says "don't use this"
    }else{
        try {
            //FIXME: Living dangerously here... Is there a better way of doing this?
            SplashProgress.pause();
            toggleFullScreen(client.gameSettings.fullScreen, ConfigurationHandler.instance().getFullscreenMonitor());
            SplashProgress.resume();
        }catch(NoClassDefFoundError e) {
            LogHelper.warn("Error while doing startup checks, are you using an old version of Forge ? " + e);
            toggleFullScreen(client.gameSettings.fullScreen, ConfigurationHandler.instance().getFullscreenMonitor());
        }
    }
}
 
开发者ID:hancin,项目名称:Fullscreen-Windowed-Minecraft,代码行数:26,代码来源:ClientProxy.java

示例3: startToHackScreen

import net.minecraftforge.fml.client.SplashProgress; //导入依赖的package包/类
void startToHackScreen()
	{
		SplashProgress.pause();
		DebugLogger.info("Start to check mods updatable.");
//		new Checker().run();
		SplashProgress.resume();
	}
 
开发者ID:InfinityStudio,项目名称:InspiringWorld,代码行数:8,代码来源:LibModContainer.java


注:本文中的net.minecraftforge.fml.client.SplashProgress类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。