Aniak
Topic Author
Posts: 10
Joined: 27 Nov 2018, 14:41

Custom cursor

25 Mar 2019, 11:21

Hi,
what is the best way to create custom mouse cursor in Noesis. I saw the viewtopic.php?f=3&t=256&p=1296&hilit=cursor#p1296 disscusion. Have something changed since then?
 
User avatar
sfernandez
Site Admin
Posts: 3152
Joined: 22 Dec 2011, 19:20

Re: Custom cursor

25 Mar 2019, 13:40

We have support for FrameworkElement.Cursor property since 2.1 version, allowing you to specify different cursors for specific UI elements. The available values are defined in the Cursor enumeration.

To be notified when cursor should be changed you can register a callback with Noesis.GUI.SetCursorCallback().
 
Gosha
Posts: 8
Joined: 27 Jul 2021, 16:06

Re: Custom cursor

26 Oct 2021, 18:31

Hey! Do you have any plans to add support for custom cursors to noesis?
 
User avatar
sfernandez
Site Admin
Posts: 3152
Joined: 22 Dec 2011, 19:20

Re: Custom cursor

26 Oct 2021, 18:53

Yes, issue #1109 is planned for next 3.1.2 release, and implemented already.
This will allow you to use a .cur/.ani resource as cursor for any UI element:
<Grid Cursor="Path/To/CustomCursor.cur"/>
 
Gosha
Posts: 8
Joined: 27 Jul 2021, 16:06

Re: Custom cursor

26 Oct 2021, 21:37

Cool! This is exactly what I need.
Do you have an ETA?
 
User avatar
sfernandez
Site Admin
Posts: 3152
Joined: 22 Dec 2011, 19:20

Re: Custom cursor

27 Oct 2021, 10:55

3.1.2 version will be released probably next week.

Something I want to remark is that we implemented the support in the core library for specifying a custom cursor, but how they are loaded and set in the operating system are part of the integration layer that the client must implement. For example, our application framework will provide the code to set the custom cursor for Windows in the Win32Display. You could use that as reference for your own implementation.

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 2 guests