|
Post by larrybtoys on Oct 30, 2022 0:19:33 GMT 1
Can anyone give me some code help. I am writing another game and would like to change the mouse pointer to a .PNG I have created. Currently it is 120 pixels x 120 pixels however I can change the size as well as make it another image format if needed however I like the .PNG because I need the background to show through some of the rectangle. TIA
|
|
|
Post by Roger Cabo on Oct 30, 2022 20:56:11 GMT 1
Hi,
did you work in Direct2D or in normal gfa basic mode? In gfabasic normal mode its a bit tricky. You need to flip 2 screens to have a smooth transition. Otherwise your mouse cursor will flickering like hell.
There are some other possibilities, but all depends on how you build your game. I'm not if a transparent PNG will work.
Further do you want to use alpha blending or masking? Alpha blending works with smooth transparency means, with a 256 grey scale mask. Alpha masking with a simple black & white mask.
|
|
webu
Full Member
Posts: 149
|
Post by webu on Oct 30, 2022 21:51:20 GMT 1
I am looking for a way to display an additional small graphic with where the mouse is located. I have AnyDesk (A program like Team-Viewer) and sometimes my mouse position is just not shown to my counterpart. I would like to compensate for this by drawing my mouse again myself. --------------- Ich suche nach einer Möglichkeit, an der Stelle, an der sich die Maus befindet, eine zusätzliche kleine Grafik mit anzuzeigen.
Ich habe AnyDesk (ein Programm wie Team-Viewer) und manchmal wird meine Mausposition einfach meinem Gegenüber nicht angezeigt. Das möchte ich ausgleichen, in dem ich meine Maus praktisch selbst auch nochmal zeichne.
|
|
|
Post by dragonjim on Oct 30, 2022 21:55:06 GMT 1
Try adapting this code from the help file:
OpenW 1 Local mc As MouseCursor If Exist(WinDir & "\Cursors\hourglas.ani") // Only included up to WinXP Set mc = LoadCursor(WinDir & "\Cursors\hourglas.Ani") Else Set mc = LoadCursor(WinDir & "\Cursors\aero_busy.ani") EndIf Set Win_1.MouseCursor = mc Win_1.MousePointer = 98 // basCursor Do Sleep Until IsNothing(Me) Set mc = Nothing
|
|
|
Post by larrybtoys on Oct 31, 2022 16:19:04 GMT 1
I am working in regular GB32 mode. I tried to adapt the Help File code but so far have not been able to get it to work...
|
|
|
Post by (X) on Oct 31, 2022 17:11:43 GMT 1
I am working in regular GB32 mode. I tried to adapt the Help File code but so far have not been able to get it to work... '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Used this software to edit a .cur file ' https://download.cnet.com/RealWorld-Cursor-Editor/3000-2094_4-10550991.html ' OpenW 1 Set Win_1.MouseCursor = LoadCursor(":Hidden Mouse") : Win_1.MousePointer = basCursor Do : Sleep : Until IsNothing(Me)
|
|