public static void Init() { shader = new ShaderProgram(Shaders.GuiVert, Shaders.GuiFrag); TextFont.Init(); GameGuiRenderer.Init(); TitleScreenRenderer.Init(); }
public static void Init() { TextFont.Init(); TextStyle style = new TextStyle(TextAlignment.TopLeft, TextFont.LucidaConsole, 0.5f, 2f, int.MaxValue, 1.5f, new Vector3(1, 1, 1)); DebugText = new Text("", style, new Vector2(-0.99, 0.97)); Healthbar = GuiModel.CreateRectangle(new Vector2(0.52, 0.04), TextureUtil.ColourFromVec4(new Vector4(0.88, 0.3, 0.1, 0.8))); HealthbarTexture = GuiModel.CreateRectangle(new Vector2(0.55, 0.065), Textures.HealthbarTexture); Background = GuiModel.CreateRectangle(new Vector2(1, 1), Textures.GameBackgroundTex); PausedOverlay = GuiModel.CreateRectangle(new Vector2(1, 1), TextureUtil.ColourFromVec4(new Vector4(0.2, 0.2, 0.2, 0.9))); PausedText = new Text("Paused", new TextStyle(TextAlignment.Top, TextFont.Chiller, 1.3f, 2f, 1, 1f, new Vector3(1, 1, 1)), new Vector2(0, 1)); TxtInput = new InGameTextbox(new Vector2(0, -0.8), new Vector2(1, 0.03), TextFont.LucidaConsole, 0.5f); Buttons = new HashSet <Button>(); btn_BackToTitle = new Button(new Vector2(0, -0.2), new Vector2(0.4, 0.04), "Save and Quit", TextStyle.Chiller_SingleLine_Large, delegate() { Program.SaveWorld(); Program.SwitchToTitleScreen(); }); Buttons.Add(btn_BackToTitle); }