Skip to content

Commit

Permalink
Incorporated new update
Browse files Browse the repository at this point in the history
  • Loading branch information
Quantx committed Dec 14, 2024
1 parent 7b8b654 commit ba4dc8b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions ui_enhancer/source/scripts/library_ui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions ui_enhancer/source/scripts/library_util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
13 changes: 12 additions & 1 deletion ui_enhancer/source/scripts/screen_vehicle_control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ba4dc8b

Please sign in to comment.