HomefieldOfView | SPi-V dev

Navigation

user

Read pointer X and Y

Hello,
can it's possible to read the X and Yposition of pointer into the SPIV window.

because i want to create a popup menu for mobile point into the panorama.

Thanks

Geoffrey

_mouse object

You can use getProperty("_mouse", "x") and getProperty("_mouse", "y") in an action or through the API

whaooo! very good, i can

whaooo!

very good, i can create my popup menu now :-)

thanks a lot :-)

Geoffrey

small problem

hello,
i try a test with this command, but it's freeze the spi-v viewer when "loading xml"

<uigroup id="zone-infobulle" width="140" height="156" halign="left" valign="top" hoffset="0" voffset="0" zorder="0" >
  <uielement blend="80">
  <image id="infobulle">
<layer class="base" type="bitmap" src="interface/infobulle.png" />
</image>
<behavior>
  <action event="press" type="setProperty" property="hoffset" target="_this" value="=getProperty("_mouse","X")"/>
  <action event="press" type="setProperty" property="voffset" target="_this" value="=getProperty("_mouse","Y")"/>
  </behavior>

  </uielement>
</uigroup>

I have try a test with a number to remplace =getProperty("_mouse","Y"), and it's work well.

thanks

Geoffrey

Sorry,

Sorry,

I have post this very quickly.

The error due to this ponctuation :
this form is good

value='=getproperty("_mouse","Y")'

and this not
value="=getproperty("_mouse","Y")"

Geoffrey Morelle

tip

Here's a good tip: use a text-editor with syntax highlighting. Even if it's just generic XML highlighting (the app does not have to know about SPi-V), it will show thing like non-terminated strings