Questions tagged [mouse-position]

197 questions
1
vote
1 answer

Rectangular hole dimensions isn't equals to real mouse position on my computer screen

I had searching on internet about how draw a rectangular hole on Form, and I found this good example in Delphi language, then I have tried reproduce this example in VB.NET, until now I had success in draw the rectangle hole on Form, but the…
user5329618
1
vote
1 answer

How to calculate the mouse position from the center of an element in Jquery

I'm trying to find a way of calculating the mouse position from the center of an element. I've got as far as e.pageX and e.pageY on the mouse over event, but I can't get my head around calculating its position relative to the elements center. I…
SamesJeabrook
  • 1,387
  • 5
  • 17
  • 27
1
vote
2 answers

elevatezoom mouse position — the struggle is real

I am using elevatezoom for a project and I need to get the mouse position while the picture is zoomed in. I tried a lot of different ideas but I always get undefined or NaN. Can you tell me why? Look at this example: $('#zoomPicture').elevateZoom({ …
a1xon
  • 85
  • 1
  • 1
  • 6
1
vote
1 answer

Drag 3d object using fingers in unity3d

I create a scene has an AR camera and a 3d object. When application starts, I see the object on the screen. I want to move this object using fingers. I tried many codes. But I couldn't find a nice solution for me. AR camera is tagged MainCamera. I…
zakjma
  • 2,030
  • 12
  • 40
  • 81
1
vote
1 answer

How can I access protected member in QMouseEvent to get a float value of mouse position ? [Qt developers]

QMouseEvent stores an integer value of the mouse position. However, it has a protect member "s" which stores a float value of the mouse position. How can I get the float value? I have tried inheriting the QMouseEvent, but unfortunately I get this…
Nai
  • 71
  • 7
1
vote
1 answer

How to get mouse position in pdf?

Is it possible to get mouse position or coordinates when I click anywhere in PDF (axAcroPdflib), because I want highlight area horizontally once I get coordinates using C#.
Sheeba
  • 25
  • 2
  • 18
1
vote
1 answer

Unity: collider2D.bounds.Contains not working properly

I've got a GameController object with a square 2D collider that covers the whole screen. Inside that GameController there are 7 objects (Zones), each one with their own polygon collider. Here's the setup: View Hierarchy What I'm trying to do is to…
GMaiolo
  • 4,207
  • 1
  • 21
  • 37
1
vote
0 answers

How do I get the delta theta for rotation?

Currently, I can draw two line segments and have them intersect. What I want to do: I would like to be able to rotate either of the two intersecting line segments about the intersection point by clicking on the endpoint of the line or the line…
Kala J
  • 2,040
  • 4
  • 45
  • 85
1
vote
1 answer

leaflet maps zoom at the current mouse position

I would like to zoom into the mouseposition with leaflet maps. Like a doubleclick on the map. Usually the zoom uses the center of the map, but I would like to zoom around the mousepos..
Jo Pfeffer
  • 65
  • 1
  • 8
1
vote
1 answer

Mouse position at end of textbox on Mouse Click event

I have a textbox that when the user clicks on it the cursor position should always be at the end of the text. So far I have the following code under the textbox_mouseClick event Private Sub RTextBox_MouseClick(sender As Object, e As…
Dman
  • 553
  • 1
  • 11
  • 33
1
vote
1 answer

How to have pygame check when mouse is held down

So currently my code is import pygame def main(): pygame.init() size = width, height = 800,700 backgroundColor = [0, 0, 255] screen = pygame.display.set_mode(size) screen.fill(backgroundColor) pygame.display.flip() …
tysonsmiths
  • 485
  • 1
  • 8
  • 19
1
vote
0 answers

Mouse position shifting after binding click event

I am binding a click event to generate a content-editable textbox. Following is the code which I use to achieve that $('.clickable-div').bind('click', function(ev) { …
Rakhi
  • 135
  • 9
1
vote
2 answers

CUITe/Coded UI : mouse.Click position wrong (Screen resolutions)

I'm using CUITe to automate the testing of a UI piece (captured as a Page Object model). I have a class that captures the buttons in my UI, like so: class Navigators : CUITe_BrowserWindow { public new string sWindowTitle = "Window"; public…
notauser
  • 33
  • 5
1
vote
0 answers

Scrolling only works when mouse is over content

I am working on a special blog for a client. The posts are aligned next to each other and you can navigate to them with javascript. The user can scroll up and down if the content exceeds the window height. Therefore I put the posts inside a big…
Raapwerk
  • 619
  • 7
  • 15
1
vote
1 answer

Window position with respect to screen and width and height of window in Qt

I am Using Qt 4.8 I am trying to bind mouse cursor to the center of my application. If application is in fullscreen it works with following code int middleX = QApplication::desktop()->width() >> 1; int middleY = QApplication::desktop()->height()…
Adorn
  • 1,403
  • 1
  • 23
  • 46