From ba4dc8bbed368231baceb8089245f87d7217fc7b Mon Sep 17 00:00:00 2001 From: Samuel Deutsch Date: Fri, 13 Dec 2024 22:36:39 -0800 Subject: [PATCH] Incorporated new update --- ui_enhancer/source/scripts/library_ui.lua | 1 + ui_enhancer/source/scripts/library_util.lua | 1 + .../source/scripts/screen_vehicle_control.lua | 13 ++++++++++++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ui_enhancer/source/scripts/library_ui.lua b/ui_enhancer/source/scripts/library_ui.lua index 8ca430a..4b6d23d 100644 --- a/ui_enhancer/source/scripts/library_ui.lua +++ b/ui_enhancer/source/scripts/library_ui.lua @@ -2247,6 +2247,7 @@ function imgui_options_menu(ui, x, y, w, h, is_active, selected_category_index, settings.vr_tablet_index = ui:combo(update_get_loc(e_loc.vr_tablet_index), settings.vr_tablet_index, { "1", "2" }) settings.vr_controller_tooltips = ui:checkbox(update_get_loc(e_loc.vr_controller_tooltips), settings.vr_controller_tooltips) settings.vr_screen_tilt = ui:checkbox(update_get_loc(e_loc.vr_screen_tilt), settings.vr_screen_tilt) + settings.vr_voice_xmit = ui:checkbox(update_get_loc(e_loc.voice), settings.vr_voice_xmit) settings.vr_move_mode = ui:combo(update_get_loc(e_loc.vr_move_mode), settings.vr_move_mode, { update_get_loc(e_loc.vr_move_mode_teleport), update_get_loc(e_loc.vr_move_mode_smooth) }) settings.vr_smooth_move_speed = ui:slider(update_get_loc(e_loc.vr_smooth_move_speed), settings.vr_smooth_move_speed, 0.5, 2, 0.1) settings.vr_smooth_rotate_speed = ui:slider(update_get_loc(e_loc.vr_smooth_rotate_speed), settings.vr_smooth_rotate_speed, 0.5, 2, 0.1) diff --git a/ui_enhancer/source/scripts/library_util.lua b/ui_enhancer/source/scripts/library_util.lua index 51ded27..42da042 100644 --- a/ui_enhancer/source/scripts/library_util.lua +++ b/ui_enhancer/source/scripts/library_util.lua @@ -233,6 +233,7 @@ atlas_icons = { map_icon_damage_indicator = 0, map_icon_low_fuel = 0, map_icon_low_ammo = 0, + map_icon_hold_fire = 0, damage_hull = 0, damage_bg = 0, damage_fr = 0, diff --git a/ui_enhancer/source/scripts/screen_vehicle_control.lua b/ui_enhancer/source/scripts/screen_vehicle_control.lua index 5c9932d..3b38f24 100644 --- a/ui_enhancer/source/scripts/screen_vehicle_control.lua +++ b/ui_enhancer/source/scripts/screen_vehicle_control.lua @@ -408,6 +408,12 @@ function render_selection_vehicle(screen_w, screen_h, vehicle) ui:header(update_get_loc(e_loc.upp_actions)) + if def_index ~= e_game_object_type.chassis_carrier and def_index ~= e_game_object_type.chassis_sea_barge and def_index ~= e_game_object_type.chassis_land_robot_dog then + local is_vehicle_hold_fire = vehicle:get_is_hold_fire() + is_hold_fire, is_modified = ui:checkbox(update_get_loc(e_loc.hold_fire), is_vehicle_hold_fire) + if is_modified then vehicle:set_is_hold_fire(is_hold_fire) end + end + if ui:list_item(update_get_loc(e_loc.upp_center_to_vehicle), true) then g_camera_pos_x = vehicle:get_position_xz():x() g_camera_pos_y = vehicle:get_position_xz():y() @@ -440,7 +446,7 @@ function render_selection_vehicle(screen_w, screen_h, vehicle) end end - if #attachments > 0 and vehicle:get_definition_index() ~= e_game_object_type.chassis_land_turret then + if #attachments > 0 and def_index ~= e_game_object_type.chassis_land_turret then local window = ui:begin_window(update_get_loc(e_loc.upp_ammo), 10, 116, left_w, { max=130 }, atlas_icons.column_stock, false, 2) local region_w, region_h = ui:get_region() local cy = 0 @@ -1939,6 +1945,11 @@ function update(screen_w, screen_h, ticks) update_ui_image(cx, cy, atlas_icons.map_icon_low_ammo, icon_color, 0) cx = cx + 4 end + + if vehicle:get_is_hold_fire() then + update_ui_image(cx, cy, atlas_icons.map_icon_hold_fire, color8(255, 0, 0, 255), 0) + cx = cx + 4 + end end if vehicle_team == screen_team then