Skip to content

GitLab Next

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • solarus solarus
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 222
    • Issues 222
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 8
    • Merge requests 8
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Solarus Games
  • solarussolarus
  • Issues
  • #734

Closed
Open
Created Aug 18, 2015 by Christopho@christophoOwner

sol.input.get_mouse_position ignores the window zoom factor

Created by: Maxs1789

the events on_mouse_pressed() and on_mouse_release() take into account the window zoom factor but not the function sol.input.get_mouse_position().

example:

function menu:on_mouse_pressed(button, x, y)
  print("mouse pressed!")
  print("  event:", x, y)
  print("  sol.input:", sol.input.get_mouse_position())
end

outputs (with zoom factor of 2 and a quest size of 320x240):

mouse pressed!
  event:        23      17
  sol.input:    46      34
mouse pressed!
  event:        134     55
  sol.input:    268     110
mouse pressed!
  event:        176     131
  sol.input:    nil
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking