diff --git a/control.lua b/control.lua index ed86135b..778b590c 100644 --- a/control.lua +++ b/control.lua @@ -2354,6 +2354,13 @@ local function adjust_cursor_size(pindex, direction) local say_size = new_size * 2 + 1 Speech.speak(pindex, { "fa.cursor-size", tostring(say_size), tostring(say_size) }) sounds.play_close_inventory(pindex) + Graphics.draw_large_cursor({ + cursor_pos.x - new_size, + cursor_pos.y - new_size, + }, { + cursor_pos.x + new_size + 1, + cursor_pos.y + new_size + 1, + }, pindex) end --We have cursor sizes 1,3,5,11,21,51,101,251 diff --git a/scripts/graphics.lua b/scripts/graphics.lua index 69f1a441..9de01f0c 100644 --- a/scripts/graphics.lua +++ b/scripts/graphics.lua @@ -18,11 +18,10 @@ function mod.sync_build_cursor_graphics(pindex) if player == nil or player.player.character == nil then return end local p = game.get_player(pindex) local stack = game.get_player(pindex).cursor_stack - if player.building_direction == nil then player.building_direction = dirs.north end turn_to_cursor_direction_cardinal(pindex) - local dir = player.building_direction local dir_indicator = player.building_dir_arrow local vp = Viewpoint.get_viewpoint(pindex) + local dir = vp:get_hand_direction() local cursor_pos = vp:get_cursor_pos() local cursor_size = vp:get_cursor_size() local width = nil @@ -213,8 +212,8 @@ function mod.draw_cursor_highlight(pindex, ent, box_type, skip_mouse_movement) end --Highlight the currently focused ground tile. - if math.floor(c_pos.x) == math.ceil(c_pos.x) then c_pos.x = c_pos.x - 0.01 end - if math.floor(c_pos.y) == math.ceil(c_pos.y) then c_pos.y = c_pos.y - 0.01 end + if math.floor(c_pos.x) == math.ceil(c_pos.x) then c_pos.x = c_pos.x + 0.01 end + if math.floor(c_pos.y) == math.ceil(c_pos.y) then c_pos.y = c_pos.y + 0.01 end h_tile = rendering.draw_rectangle({ color = { 0.75, 1, 1, 0.75 }, surface = p.surface,