You can still type chat input when F1 is mode on, like original classicube client. Fixes #248.

This commit is contained in:
UnknownShadow200 2017-11-08 16:19:35 +11:00
parent 813ea75a4b
commit bee5da56a5
3 changed files with 7 additions and 4 deletions

View File

@ -19,7 +19,7 @@ namespace ClassicalSharp.Gui.Screens {
HudScreen hud;
int chatLines;
TextWidget announcement;
InputWidget input;
internal InputWidget input;
TextGroupWidget status, bottomRight, normalChat, clientStatus;
bool suppressNextPress = true;
int chatIndex;

View File

@ -24,6 +24,11 @@ namespace ClassicalSharp.Gui.Screens {
internal int BottomOffset { get { return hotbar.Height; } }
public override void Render(double delta) {
if (game.HideGui && chat.HandlesAllInput) {
gfx.Texturing = true;
chat.input.Render(delta);
gfx.Texturing = false;
}
if (game.HideGui) return;
bool showMinimal = game.Gui.ActiveScreen.BlocksWorld;

View File

@ -65,12 +65,10 @@ namespace ClassicalSharp.Gui.Widgets {
#region Input handling
public override bool HandlesKeyPress(char key) {
if (!game.HideGui) Append(key);
return true;
Append(key); return true;
}
public override bool HandlesKeyDown(Key key) {
if (game.HideGui) return key < Key.F1 || key > Key.F35;
bool controlDown = ControlDown();
if (key == Key.Tab) { TabKey(); return true; }