Disable input when typing into a text field. (#2140)

Closes #2139
This commit is contained in:
gir489
2023-09-17 16:23:26 -04:00
committed by GitHub
parent a4209c1b23
commit 347f33fb2d
14 changed files with 41 additions and 19 deletions

View File

@ -182,6 +182,8 @@ namespace big
ImGui::SetNextItemWidth(300);
ImGui::InputText("##outfit_name", outfit_name, sizeof(outfit_name));
if (ImGui::IsItemActive())
g.self.hud.typing = TYPING_TICKS;
ImGui::SameLine();
components::button("OUTFIT_SAVE_CURRENT"_T, [] {

View File

@ -21,6 +21,8 @@ namespace big
ImGui::SetNextItemWidth(300);
ImGui::InputText("OUTFIT_NAME"_T.data(), outfit::get_slot_name_address(slot), 16);
if (ImGui::IsItemActive())
g.self.hud.typing = TYPING_TICKS;
static outfit::components_t components;
static outfit::props_t props;

View File

@ -141,11 +141,7 @@ namespace big
g.weapons.vehicle_gun_model = vehicle_gun;
}
if (ImGui::IsItemActive())
{
g_fiber_pool->queue_job([] {
PAD::DISABLE_ALL_CONTROL_ACTIONS(0);
});
}
g.self.hud.typing = TYPING_TICKS;
break;
case CustomWeapon::PAINT_GUN: