Skip to content

Commit

Permalink
Merge branch 'DFHack:master' into c3r341-global-necronomicon
Browse files Browse the repository at this point in the history
  • Loading branch information
c3r341 authored Oct 8, 2024
2 parents 22b1fa5 + 036ddb3 commit 4a1c14f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ci:
repos:
# shared across repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand All @@ -20,7 +20,7 @@ repos:
args: ['--fix=lf']
- id: trailing-whitespace
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.29.2
rev: 0.29.3
hooks:
- id: check-github-workflows
- repo: https://github.com/Lucas-C/pre-commit-hooks
Expand All @@ -34,6 +34,6 @@ repos:
- json
# specific to scripts:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: forbid-new-submodules
2 changes: 1 addition & 1 deletion gui/autodump.lua
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ function Autodump:onInput(keys)
end
local now_ms = dfhack.getTickCount()
if same_xyz(pos, self.last_map_click_pos) and
now_ms - self.last_map_click_ms <= widgets.DOUBLE_CLICK_MS then
now_ms - self.last_map_click_ms <= widgets.getDoubleClickMs() then
self:reset_double_click()
self:do_dump(pos)
self.mark = nil
Expand Down
2 changes: 1 addition & 1 deletion gui/teleport.lua
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ function Teleport:onInput(keys)
end
local now_ms = dfhack.getTickCount()
if same_xyz(pos, self.last_map_click_pos) and
now_ms - self.last_map_click_ms <= widgets.DOUBLE_CLICK_MS then
now_ms - self.last_map_click_ms <= widgets.getDoubleClickMs() then
self:reset_double_click()
self:do_teleport(pos)
self.mark = nil
Expand Down
12 changes: 6 additions & 6 deletions internal/control-panel/registry.lua
Original file line number Diff line number Diff line change
Expand Up @@ -202,26 +202,26 @@ PREFERENCES_BY_IDX = {
desc='How long to wait for the second click of a double click, in ms.',
default=500,
min=50,
get_fn=function() return widgets.DOUBLE_CLICK_MS end,
set_fn=function(val) widgets.DOUBLE_CLICK_MS = val end,
get_fn=widgets.getDoubleClickMs,
set_fn=widgets.setDoubleClickMs,
},
{
name='SCROLL_DELAY_MS',
label='Mouse scroll repeat delay (ms)',
desc='The delay between events when holding the mouse button down on a scrollbar, in ms.',
default=20,
min=5,
get_fn=function() return widgets.SCROLL_DELAY_MS end,
set_fn=function(val) widgets.SCROLL_DELAY_MS = val end,
get_fn=widgets.getScrollDelayMs,
set_fn=widgets.setScrollDelayMs,
},
{
name='SCROLL_INITIAL_DELAY_MS',
label='Mouse initial scroll repeat delay (ms)',
desc='The delay before scrolling quickly when holding the mouse button down on a scrollbar, in ms.',
default=300,
min=5,
get_fn=function() return widgets.SCROLL_INITIAL_DELAY_MS end,
set_fn=function(val) widgets.SCROLL_INITIAL_DELAY_MS = val end,
get_fn=widgets.getScrollInitialDelayMs,
set_fn=widgets.setScrollInitialDelayMs,
},
}

Expand Down
2 changes: 1 addition & 1 deletion internal/journal/text_editor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ function TextEditorView:getMultiLeftClick(x, y)
if (
self.last_click.x ~= x or
self.last_click.y ~= y or
from_last_click_ms > widgets.DOUBLE_CLICK_MS
from_last_click_ms > widgets.getDoubleClickMs()
) then
self.clicks_count = 0;
end
Expand Down

0 comments on commit 4a1c14f

Please sign in to comment.