From 1da4be383924659afab58d8b232c2a28da7bfb08 Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Wed, 2 Nov 2022 07:38:15 +0000 Subject: [PATCH] Fix chat Accidentally broken by #5453 --- Source/control.cpp | 2 +- Source/engine/backbuffer_state.hpp | 3 +-- Source/engine/render/scrollrt.cpp | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Source/control.cpp b/Source/control.cpp index 041855df3..11dff1089 100644 --- a/Source/control.cpp +++ b/Source/control.cpp @@ -1319,7 +1319,7 @@ void control_type_message() if (!IsChatAvailable()) return; - RedrawComponent(PanelDrawComponent::ChatInput); + talkflag = true; SDL_Rect rect = MakeSdlRect(GetMainPanel().position.x + 200, GetMainPanel().position.y + 22, 250, 39); SDL_SetTextInputRect(&rect); TalkMessage[0] = '\0'; diff --git a/Source/engine/backbuffer_state.hpp b/Source/engine/backbuffer_state.hpp index 2cb59bf19..1fd54dd18 100644 --- a/Source/engine/backbuffer_state.hpp +++ b/Source/engine/backbuffer_state.hpp @@ -12,10 +12,9 @@ enum class PanelDrawComponent { Mana, ControlButtons, Belt, - ChatInput, FIRST = Health, - LAST = ChatInput + LAST = Belt }; struct DrawnCursor { diff --git a/Source/engine/render/scrollrt.cpp b/Source/engine/render/scrollrt.cpp index bc46c6f5e..4b11a1315 100644 --- a/Source/engine/render/scrollrt.cpp +++ b/Source/engine/render/scrollrt.cpp @@ -1529,7 +1529,7 @@ void DrawAndBlit() bool drawMana = IsRedrawComponent(PanelDrawComponent::Mana); bool drawControlButtons = IsRedrawComponent(PanelDrawComponent::ControlButtons); bool drawBelt = IsRedrawComponent(PanelDrawComponent::Belt); - bool drawChatInput = IsRedrawComponent(PanelDrawComponent::ChatInput); + bool drawChatInput = talkflag; bool drawInfoBox = false; bool drawCtrlPan = false;