14 March 2015, 13:59 | #1 |
XoXo/Tasko Developer
Join Date: Dec 2013
Location: Munich
Age: 48
Posts: 450
|
Custom Drag and Drop misc Questions
Hi,
as you can see in the image, there is an icon hovering above a track. The track is drawn blue to signify that it would accept a drop. But the icon is not an Amiga OS icon, but a custom gfx that is blitted there after saving the background. In addition to this the track is drawn blue before saving the background. Everytimes the icon enters the track or leaves it, the track is refreshed in blue or gray. Now this works, but it is maybe not fast enough. I can see the track and the icon flashing when the track is refreshed. So my first question is, if there can be something done, maybe a kind of doublebuffering? And second question: When I press the right mouse button (menu) while holding the left one, and then release the left one before the right one, the window does not get the SELECTUP event and the icon continues moving even that the left button is not held any more. Third: I must lock the LayerInfo of the screen to avoid artefacts while drawing. If I don't, under OS 4.1 (native) parts of the tracks stay blue or gray where the icon was. But when I lock the layers and press the right mouse button everthing freezes. I guess this is because the OS needs to draw the menu bar and somehow can't. Is there a solution for this? I could use RMBTRAP, but then the menus won't work anymore (I can use my custom window menus though). Thanks for reading, maybe there are solutions which I am not yet aware of. |
15 March 2015, 12:50 | #2 |
Registered User
Join Date: Aug 2004
Location:
Posts: 3,333
|
Have you experimented with using IDCMP_MENUVERIFY?
http://amigadev.elowar.com/read/ADCD.../node00C9.html http://amigadev.elowar.com/read/ADCD.../node0195.html Also, how are you biltting your icon? Are you using QBSBlit()? That's what Workbench uses when icons are dragged. It looks like your icon is quite small. As an alternative you could experiment with using a sprite instead. Either change the mouse pointer to a different image, or have a sprite follow the pointer as the user moves it. |
15 March 2015, 13:20 | #3 |
XoXo/Tasko Developer
Join Date: Dec 2013
Location: Munich
Age: 48
Posts: 450
|
Thanks. When I do not refresh the track to blue or gray then the icon does not flash. Further the icon is drawn by my custom pngflux.library with respect to alpha-channel. And further the GUI engine allows any object to be dragged, this means also buttons or other content. It's only a special case that the dragged thing is an icon. Actually it is a "symbol object". I now go and try your qbsblit.
Wait a minute, does that blit-function make sense on gfxcard/emulator and such? And for OS 4+ on native ppc? And with flat monitors? Last edited by AGS; 15 March 2015 at 13:31. |
18 March 2015, 17:30 | #4 | |
Registered User
Join Date: Aug 2004
Location:
Posts: 3,333
|
Quote:
On real Amiga hardware, graphics.library knows where the raster beam is and can arrange for an interrupt when it reaches a given point. [If I recall correctly, it does that by reading the current beam position and setting up a CIA interrupt to trigger after a certain number of scanlines.] On an emulator it matters as much as for real hardware: you see flickering for non-beam-synchronised blits. For an example of that see this posting. (That was back when WinUAE didn't properly emulate half-rate CIA TOD counting when a genlock is connected, so beam-synced blits weren't happening at the right time.) RTG systems have to provide/emulate/intercept QBSBlit() for compatibility, otherwise Workbench wouldn't work properly. However whether the RTG system can do beam-synchronised blits would depend on whether the developer bothered implementing that and whether the graphics card supports it. It may be that for RTG screens QBSBlit() is effectively the same as QBlit(). |
|
18 March 2015, 17:51 | #5 |
XoXo/Tasko Developer
Join Date: Dec 2013
Location: Munich
Age: 48
Posts: 450
|
Tanks so far. I have often read this but don't know: What does RTG mean?
Last edited by AGS; 18 March 2015 at 23:05. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Drag & Drop Implementation howto | AGS | Coders. General | 3 | 10 September 2014 00:14 |
Adf Drag and Drop and association problem? | kern | support.WinUAE | 5 | 17 September 2012 17:37 |
Drag and drop opening of adf files? | zardoz | support.OtherUAE | 3 | 08 May 2012 23:19 |
Drag and Drop HDF mounting? | killergorilla | request.UAE Wishlist | 5 | 02 July 2008 12:12 |
Odd request - ADFs drag and drop | BippyM | request.UAE Wishlist | 9 | 23 April 2006 00:36 |
|
|