Moved colored implementation to their own functions

To minimise source code modifications, colored input text has been moved to their own functions.
The ImFont is still modified tho.
This commit is contained in:
Nemirtingas 2019-08-03 14:37:03 +02:00
parent 804355fa54
commit d2a75db930
6 changed files with 845 additions and 16 deletions

View file

@ -325,7 +325,7 @@ void Steam_Overlay::BuildFriendWindow(Friend const& frd, friend_window_state& st
}
ImGui::PushItemWidth(-1.0f);
ImGui::InputTextMultiline("##chat_history", &state.chat_history[0], state.chat_history.length(), { -1.0f, 0 }, ImGuiInputTextFlags_ReadOnly);
ImGui::ColoredInputTextMultiline("##chat_history", &state.chat_history[0], state.chat_history.length(), { -1.0f, 0 }, ImGuiInputTextFlags_ReadOnly);
ImGui::PopItemWidth();
if (ImGui::InputText("##chat_line", state.chat_input, max_chat_len, ImGuiInputTextFlags_EnterReturnsTrue))