chore: Replace ImGui::InputText with components::input_text (#869)

Fixes #862
This commit is contained in:
TheGreenBandit
2023-01-16 15:58:57 -05:00
committed by GitHub
parent 7433b0a69f
commit 61f125901e
6 changed files with 27 additions and 13 deletions

View File

@ -134,7 +134,7 @@ namespace big
});
static char message[256];
ImGui::InputText("Input Message", message, sizeof(message));
components::input_text("Input Message", message, sizeof(message));
if (components::button("Send Message"))
{
g_thread_pool->push([selected]
@ -180,7 +180,7 @@ namespace big
static char new_name[64];
static int64_t new_rockstar_id;
ImGui::InputText("Name", new_name, sizeof(new_name));
components::input_text("Name", new_name, sizeof(new_name));
ImGui::InputScalar("Rockstar ID", ImGuiDataType_S64, &new_rockstar_id);
if (ImGui::Button("Add"))

View File

@ -31,7 +31,7 @@ namespace big
});
static char username[20];
ImGui::InputText("Input Username", username, sizeof(username));
components::input_text("Input Username", username, sizeof(username));
if (components::button("Join by Username"))
{
session::join_by_username(username);
@ -43,7 +43,7 @@ namespace big
};
static char base64[500]{};
ImGui::InputText("Session Info", base64, sizeof(base64));
components::input_text("Session Info", base64, sizeof(base64));
components::button("Join Session Info", []
{
rage::rlSessionInfo info;
@ -101,7 +101,7 @@ namespace big
ImGui::Checkbox("Log Chat Messages", &g.session.log_chat_messages);
ImGui::Checkbox("Log Text Messages", &g.session.log_text_messages);
static char msg[256];
ImGui::InputText("##message", msg, sizeof(msg));
components::input_text("##message", msg, sizeof(msg));
ImGui::SameLine();
ImGui::Checkbox("Is Team", &g.session.is_team);
ImGui::SameLine();
@ -179,7 +179,7 @@ namespace big
strcpy_s(name, sizeof(name), g.session.spoofed_name.c_str());
ImGui::Text("Name: ");
ImGui::InputText("##username_input", name, sizeof(name));
components::input_text("##username_input", name, sizeof(name));
if (name != g.session.spoofed_name)
g.session.spoofed_name = std::string(name);

View File

@ -9,10 +9,6 @@ namespace big
{
void view::spoofing()
{
g_fiber_pool->queue_job([] {
PAD::DISABLE_ALL_CONTROL_ACTIONS(0);
});
components::small_text("To spoof any of the below credentials you need to reconnect with the lobby.\nAll spoofed details will be only visible by other players, your game will still show your actual name, ip, rid...");
components::sub_title("Username");
@ -29,7 +25,7 @@ namespace big
strcpy_s(name, sizeof(name), g.spoofing.username.c_str());
ImGui::Text("Username:");
ImGui::InputText("##username_input", name, sizeof(name));
components::input_text("##username_input", name, sizeof(name));
if (name != g.spoofing.username)
g.spoofing.username = std::string(name);
@ -67,7 +63,7 @@ namespace big
strcpy_s(crew_tag, sizeof(crew_tag), g.spoofing.crew_tag.c_str());
ImGui::Text("Crew Tag:");
ImGui::InputText("##crew_tag_input", crew_tag, sizeof(crew_tag));
components::input_text("##crew_tag_input", crew_tag, sizeof(crew_tag));
if (crew_tag != g.spoofing.crew_tag)
g.spoofing.crew_tag = std::string(crew_tag);