Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions scripts/graphics.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down