mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-23 04:34:58 -04:00
Better names in nostalgia options
This commit is contained in:
parent
82646f5cdb
commit
5b73327a86
@ -30,9 +30,9 @@ namespace ClassicalSharp.Gui.Screens {
|
||||
protected override void ContextRecreated() {
|
||||
widgets = new Widget[] {
|
||||
// Column 1
|
||||
MakeBool(-1, -150, "Classic arm model", OptionsKey.ClassicArmModel,
|
||||
MakeBool(-1, -150, "Classic hand model", OptionsKey.ClassicArmModel,
|
||||
OnWidgetClick, g => g.ClassicArmModel, (g, v) => g.ClassicArmModel = v),
|
||||
MakeBool(-1, -100, "Classic arms anim", OptionsKey.SimpleArmsAnim, true,
|
||||
MakeBool(-1, -100, "Classic walk anim", OptionsKey.SimpleArmsAnim, true,
|
||||
OnWidgetClick, g => !g.SimpleArmsAnim, (g, v) => g.SimpleArmsAnim = !v),
|
||||
MakeBool(-1, -50, "Classic gui textures", OptionsKey.UseClassicGui,
|
||||
OnWidgetClick, g => g.UseClassicGui, (g, v) => g.UseClassicGui = v),
|
||||
|
@ -12,7 +12,7 @@ namespace ClassicalSharp.Gui.Screens {
|
||||
protected TextWidget[] labels;
|
||||
public string[] lines = new string[4];
|
||||
|
||||
public Overlay(Game game) : base(game) { }
|
||||
public Overlay(Game game) : base(game) { }
|
||||
|
||||
public override void Init() {
|
||||
base.Init();
|
||||
|
62
ClassicalSharp/2D/Screens/Overlays/TexIdsOverlay.cs
Normal file
62
ClassicalSharp/2D/Screens/Overlays/TexIdsOverlay.cs
Normal file
@ -0,0 +1,62 @@
|
||||
// Copyright 2014-2017 ClassicalSharp | Licensed under BSD-3
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using ClassicalSharp.GraphicsAPI;
|
||||
using ClassicalSharp.Gui.Widgets;
|
||||
using OpenTK.Input;
|
||||
|
||||
namespace ClassicalSharp.Gui.Screens {
|
||||
|
||||
public sealed class TexIdsOverlay : Overlay {
|
||||
|
||||
TextAtlas idAtlas;
|
||||
public TexIdsOverlay(Game game) : base(game) { }
|
||||
|
||||
public override void Init() {
|
||||
base.Init();
|
||||
idAtlas = new TextAtlas(game, 16);
|
||||
idAtlas.Pack("0123456789", regularFont, "f");
|
||||
}
|
||||
|
||||
public override void Render(double delta) {
|
||||
int index = 0;
|
||||
VertexP3fT2fC4b[] vertices = game.ModelCache.vertices;
|
||||
idAtlas.tex.Y = 100;
|
||||
|
||||
for (int y = 0; y < 2; y++) {
|
||||
idAtlas.curX = 0;
|
||||
for (int x = 0; x < 16; x++) {
|
||||
idAtlas.AddInt(x + (y * 16), vertices, ref index);
|
||||
idAtlas.curX += 20;
|
||||
}
|
||||
idAtlas.tex.Y += 50;
|
||||
}
|
||||
|
||||
RenderMenuBounds();
|
||||
gfx.Texturing = true;
|
||||
gfx.SetBatchFormat(VertexFormat.P3fT2fC4b);
|
||||
gfx.BindTexture(idAtlas.tex.ID);
|
||||
gfx.UpdateDynamicVb_IndexedTris(game.ModelCache.vb, game.ModelCache.vertices, index);
|
||||
gfx.Texturing = false;
|
||||
}
|
||||
|
||||
public override bool HandlesKeyDown(Key key) {
|
||||
if (key == Key.F10 || key == game.Input.Keys[KeyBind.PauseOrExit]) {
|
||||
Dispose();
|
||||
CloseOverlay();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void RedrawText() { }
|
||||
|
||||
public override void MakeButtons() {
|
||||
widgets = new Widget[0];
|
||||
}
|
||||
|
||||
public override void Dispose() {
|
||||
base.Dispose();
|
||||
idAtlas.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
@ -4,7 +4,7 @@
|
||||
<ProjectGuid>{BEB1C785-5CAD-48FF-A886-876BF0A318D4}</ProjectGuid>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>ClassicalSharp</RootNamespace>
|
||||
<AssemblyName>ClassicalSharp</AssemblyName>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
@ -91,6 +91,7 @@
|
||||
<Compile Include="2D\Screens\DeathScreen.cs" />
|
||||
<Compile Include="2D\Screens\DisconnectScreen.cs" />
|
||||
<Compile Include="2D\Screens\Overlays\Overlay.cs" />
|
||||
<Compile Include="2D\Screens\Overlays\TexIdsOverlay.cs" />
|
||||
<Compile Include="2D\Screens\Overlays\WarningOverlay.cs" />
|
||||
<Compile Include="2D\Screens\StatusScreen.cs" />
|
||||
<Compile Include="2D\Screens\Inventory\InventoryScreen.cs" />
|
||||
|
@ -267,12 +267,20 @@ namespace ClassicalSharp {
|
||||
}
|
||||
} else if (key == Keys[KeyBind.PauseOrExit] && game.World.blocks != null) {
|
||||
game.Gui.SetNewScreen(new PauseScreen(game));
|
||||
} else if (!game.Mode.HandlesKeyDown(key)) {
|
||||
} else if (game.Mode.HandlesKeyDown(key)) {
|
||||
} else if (key == Key.F10) {
|
||||
ShowTextureIdsOverlay();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void ShowTextureIdsOverlay() {
|
||||
if (game.Gui.overlays.Count > 0) return;
|
||||
game.Gui.ShowOverlay(new TexIdsOverlay(game));
|
||||
}
|
||||
|
||||
void Toggle(Key key, ref bool target, string enableMsg, string disableMsg) {
|
||||
target = !target;
|
||||
if (target) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user