mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 08:17:35 +00:00
merge early startup into main window if used. It seems to work well.. Also ticks window on main thread, so mac compatible now.
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
This commit is contained in:
8 files changed
+945
-100
No files matched your search
@@ -43,9 +43,6 @@ public class EarlyLoaderGUI {
|
||||
|
||||
public EarlyLoaderGUI(final MainWindow window) {
|
||||
this.window = window;
|
||||
RenderSystem.clearColor(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
RenderSystem.clear(GL11.GL_COLOR_BUFFER_BIT, Minecraft.IS_RUNNING_ON_MAC);
|
||||
window.flipFrame();
|
||||
}
|
||||
|
||||
private void setupMatrix() {
|
||||
@@ -83,11 +80,12 @@ public class EarlyLoaderGUI {
|
||||
private void renderMessages() {
|
||||
List<Pair<Integer, StartupMessageManager.Message>> messages = StartupMessageManager.getMessages();
|
||||
for (int i = 0; i < messages.size(); i++) {
|
||||
boolean nofade = i == 0;
|
||||
final Pair<Integer, StartupMessageManager.Message> pair = messages.get(i);
|
||||
final float fade = MathHelper.clamp((4000.0f - (float) pair.getLeft() - ( i - 4 ) * 1000.0f) / 5000.0f, 0.0f, 1.0f);
|
||||
if (fade <0.01f) continue;
|
||||
if (fade <0.01f && !nofade) continue;
|
||||
StartupMessageManager.Message msg = pair.getRight();
|
||||
renderMessage(msg.getText(), msg.getTypeColour(), ((window.getScaledHeight() - 15) / 10) - i + 1, fade);
|
||||
renderMessage(msg.getText(), msg.getTypeColour(), ((window.getScaledHeight() - 15) / 10) - i + 1, nofade ? 1.0f : fade);
|
||||
}
|
||||
renderMemoryInfo();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user