Home › Forums › General › Using Ctrlr › Copying cursor is displayed as normal cursor
Tagged: copyingcursor
- This topic has 38 replies, 2 voices, and was last updated 9 years, 3 months ago by dasfaker.
-
AuthorPosts
-
August 17, 2014 at 8:38 pm #27647
When I select the “copyingCursor” cursor for a component, a normal cursor is displayed instead. The same with LUA
comp:setPropertyString (“componentMouseCursor”, “6”)Windows XP, rev. 5.2.102
August 17, 2014 at 8:58 pm #27649I get the same behavior on windows 7, i think it’s how the OS reports that cursor, i can’t do anything about it i tried to set the cursor in a different app, same result.
August 17, 2014 at 11:25 pm #27653Thanks, I think I can fake it with some drawing.
Another thing, I’m trying to use the key down callback but nothing happens, the method is not been called, or I’m doing something wrong?
August 18, 2014 at 12:50 pm #27669Can you be more specific what keyboard callback you are using ?
August 18, 2014 at 1:27 pm #27670Yes, sorry
I have a customComponent with this keyDown callback
--
-- Called when the a key is pressed and the component has focus
--
BROWSER_KeyDown = function(comp, event)
console("Hi")
endI expected to see “Hi” on the console when I press any key, but the text is not displayed.
How can the component have focus?August 18, 2014 at 2:48 pm #27674Well this was a piece of code that was never implemented for some reason, but again i filled in the blanks and added a small DEMO panel.
Not much changed but the callback argument list has changed, also you get 2 calls for keyboard events and 2 options for a component (if it wants keyboard focus, and if the focus should be grabbed on mouse click). This is all in now i’ll post the builds today for all platforms with the example.
August 18, 2014 at 2:55 pm #27675Cool, thanks.
August 18, 2014 at 10:34 pm #27678I added the missing stuff you can test it now.
August 19, 2014 at 10:53 am #27692Fantastic, it works.
I’ve replaced in my panel patch browser all listboxes with a custom component, so now I display a bank of 128 patches in this custom component and can drag patches from slot to slot, and move thru the list with cursor keys.
But there is something I’m unable to do: I have two custom components, each one with a bank of patches loaded, and I can’t drag from one component to the other. At the moment I drag in one of them, the other doesn’t catch if I enter or move inside it. Is this possible?
August 19, 2014 at 9:08 pm #27715Well to do drag and drop between components i’d have to add at least two more options for the custom component so that it can be both a drag and drop target and a source, and you’ll have to write your own methods to handle those events. I’ll try to add that asap and let you know when it’s ready.
August 19, 2014 at 9:31 pm #27719Superb, thanks Atom.
September 2, 2014 at 4:35 pm #28335Hi Atom
I’m testing the new drag&drop features, and found some issues:
· When I try to create a new method for “Called when dragging happend over this component” I get the following warning message:
CtrlrLuaMethodManager::getTemplateForProperty failed to find template for this method “myMethod” propertyName “uiCustomItemDragMoveCallback”
The method is created but when I try to edit the method, it is empty and the warning message appears again.
The same happens with method “Called when dragging exits this component”.
· If I remove the option to show the funny chomp icon in method dragStart, when I start dragging the whole component is drawn under the mouse. It is possible to draw nothing under the mouse when I’m dragging?
September 2, 2014 at 4:39 pm #28336I’ll add the missing templates asap.
Just set the icon to an empty image, Juce should pick this up and draw mothing
icon = Image()September 2, 2014 at 4:43 pm #28337Thanks for your fast reply.
I tried what you suggest, but the whole customComponent is still drawn under the mouse, even tried with icon = resources:getResourceAsImage(“”) but had the same result.
September 2, 2014 at 4:53 pm #28338Yeah i missed something here, i thing the Image object has to be not invalid (Image() creates an invalid image), so you would have to create a valid image, i forgot to bind some handy constructor for the Image() object to do that quickly, try adding a simple transparent PNG image that’s 1×1 pixel and use that. I’ll add the Image() constructors asap and fix the example.
September 2, 2014 at 5:16 pm #28340Yeah, easy fix, I’ll do it, thanks.
September 2, 2014 at 10:51 pm #28356Did you try the OPenGL rendering engine ? Any performance improvement ?
September 3, 2014 at 12:09 am #28392Not in depth, but with different results.
I tested your render demo and it seems to improve performance a lot, maybe 50% faster with openGL enabled.
But with the little Pong game I posted recently the result is inverted; with openGL enabled performance decays a lot. I have to look at this better because it’s odd.
I did a quick test with the custom components panel and I didn’t saw any obvious change in performance, I’ll dig on it tomorrow and tell you.♦
September 3, 2014 at 12:17 am #28393I doubt you will see performance bumps in drawing itself, unless you would render the frame in a timer i think that’s how opengl does it anyway.
I fixed the missing templates for drag and drop so you can test it now.
I’m doing LookAndFeel stuff now, but it’s a lot of typing, i’ll prepare that and a demo soon.
September 3, 2014 at 3:41 pm #28415I’ve tried with a timer and I get a similar result as with your demo render panel activating openGL.
Unfortunately, a timer is valid only for components that need a continuous repaint, but not when I need a repaint on a lot of mods at the same time as is the case with the custom components panel when switching tabs. In this case I get no benefit with OpenGL.At lest the lag problem when dragging a window over a big custom component is gone with openGL, so I think it’s worthy activating it.
I’m awaiting with great interest this Look&Feel demo and the fixed templates. Thanks.
-
AuthorPosts
- The forum ‘Using Ctrlr’ is closed to new topics and replies.