|
|
@ -334,7 +334,7 @@ function EditField:onInput(keys)
|
|
|
|
elseif keys._MOUSE_L then
|
|
|
|
elseif keys._MOUSE_L then
|
|
|
|
local mouse_x, mouse_y = self:getMousePos()
|
|
|
|
local mouse_x, mouse_y = self:getMousePos()
|
|
|
|
if mouse_x then
|
|
|
|
if mouse_x then
|
|
|
|
self:setCursor(self.start_pos + mouse_x)
|
|
|
|
self:setCursor(self.start_pos + mouse_x - self.text_offset)
|
|
|
|
return true
|
|
|
|
return true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
elseif keys._STRING then
|
|
|
|
elseif keys._STRING then
|
|
|
@ -496,7 +496,7 @@ function Scrollbar:onRenderBody(dc)
|
|
|
|
if self.is_dragging then
|
|
|
|
if self.is_dragging then
|
|
|
|
scrollbar_do_drag(self)
|
|
|
|
scrollbar_do_drag(self)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
if df.global.enabler.mouse_lbut_down == 0 then
|
|
|
|
if df.global.enabler.mouse_lbut == 0 then
|
|
|
|
self.last_scroll_ms = 0
|
|
|
|
self.last_scroll_ms = 0
|
|
|
|
self.is_dragging = false
|
|
|
|
self.is_dragging = false
|
|
|
|
self.scroll_spec = nil
|
|
|
|
self.scroll_spec = nil
|
|
|
@ -928,7 +928,7 @@ end
|
|
|
|
function HotkeyLabel:onInput(keys)
|
|
|
|
function HotkeyLabel:onInput(keys)
|
|
|
|
if HotkeyLabel.super.onInput(self, keys) then
|
|
|
|
if HotkeyLabel.super.onInput(self, keys) then
|
|
|
|
return true
|
|
|
|
return true
|
|
|
|
elseif keys._MOUSE_L and self:getMousePos() then
|
|
|
|
elseif keys._MOUSE_L_DOWN and self:getMousePos() then
|
|
|
|
self.on_activate()
|
|
|
|
self.on_activate()
|
|
|
|
return true
|
|
|
|
return true
|
|
|
|
end
|
|
|
|
end
|
|
|
@ -1009,7 +1009,7 @@ end
|
|
|
|
function CycleHotkeyLabel:onInput(keys)
|
|
|
|
function CycleHotkeyLabel:onInput(keys)
|
|
|
|
if CycleHotkeyLabel.super.onInput(self, keys) then
|
|
|
|
if CycleHotkeyLabel.super.onInput(self, keys) then
|
|
|
|
return true
|
|
|
|
return true
|
|
|
|
elseif keys._MOUSE_L and self:getMousePos() then
|
|
|
|
elseif keys._MOUSE_L_DOWN and self:getMousePos() then
|
|
|
|
self:cycle()
|
|
|
|
self:cycle()
|
|
|
|
return true
|
|
|
|
return true
|
|
|
|
end
|
|
|
|
end
|
|
|
@ -1274,7 +1274,7 @@ function List:onInput(keys)
|
|
|
|
elseif self.on_submit2 and keys.SEC_SELECT then
|
|
|
|
elseif self.on_submit2 and keys.SEC_SELECT then
|
|
|
|
self:submit2()
|
|
|
|
self:submit2()
|
|
|
|
return true
|
|
|
|
return true
|
|
|
|
elseif keys._MOUSE_L then
|
|
|
|
elseif keys._MOUSE_L_DOWN then
|
|
|
|
local idx = self:getIdxUnderMouse()
|
|
|
|
local idx = self:getIdxUnderMouse()
|
|
|
|
if idx then
|
|
|
|
if idx then
|
|
|
|
self:setSelected(idx)
|
|
|
|
self:setSelected(idx)
|
|
|
|