function DynamicThumbstick.GetIsJumping(y)local k=y.isJumping y.isJumping=false return k end function DynamicThumbstick.Enable(S,y,k)if y==nil then return false end y=y and true or false if S.enabled==y then return true end if y then if not S.thumbstickFrame then S:Create(k)end S:BindContextActions()else ContextActionService:UnbindAction(DYNAMIC_THUMBSTICK_ACTION_NAME)S:OnInputEnded()end S.enabled=y S.thumbstickFrame.Visible=y end
-- Note: Overrides base class GetIsJumping with get-and-clear behavior to do a single jump
-- rather than sustained jumping. This is only to preserve the current behavior through the refactor.
function DynamicThumbstick:GetIsJumping()
	local wasJumping = self.isJumping
	self.isJumping = false
	return wasJumping
end

function DynamicThumbstick:Enable(enable, uiParentFrame)
	if enable == nil then
		return false
	end -- If nil, return false (invalid argument)
	enable = enable and true or false -- Force anything non-nil to boolean before comparison
	if self.enabled == enable then
		return true
	end -- If no state change, return true indicating already in requested state

	if enable then
		-- Enable
		if not self.thumbstickFrame then
			self:Create(uiParentFrame)
		end

		self:BindContextActions()
	else
		ContextActionService:UnbindAction(DYNAMIC_THUMBSTICK_ACTION_NAME)
		-- Disable
		self:OnInputEnded() -- Cleanup
	end

	self.enabled = enable
	self.thumbstickFrame.Visible = enable
end
