Copying cursor is displayed as normal cursor

Home Forums General Using Ctrlr Copying cursor is displayed as normal cursor

Tagged: 

Viewing 20 posts - 1 through 20 (of 39 total)
  • Author
    Posts
  • #27647
    dasfaker
    Keymaster
    • Topics: 80
    • Replies: 793
    • Total: 873
    • ★★★

    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

    #27649
    atom
    Keymaster
    • Topics: 159
    • Replies: 2945
    • Total: 3104
    • ★★★★★

    I 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.

    #27653
    dasfaker
    Keymaster
    • Topics: 80
    • Replies: 793
    • Total: 873
    • ★★★

    Thanks, 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?

    #27669
    atom
    Keymaster
    • Topics: 159
    • Replies: 2945
    • Total: 3104
    • ★★★★★

    Can you be more specific what keyboard callback you are using ?

    #27670
    dasfaker
    Keymaster
    • Topics: 80
    • Replies: 793
    • Total: 873
    • ★★★

    Yes, 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")
    end

    I expected to see “Hi” on the console when I press any key, but the text is not displayed.
    How can the component have focus?

    #27674
    atom
    Keymaster
    • Topics: 159
    • Replies: 2945
    • Total: 3104
    • ★★★★★

    Well 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.

    #27675
    dasfaker
    Keymaster
    • Topics: 80
    • Replies: 793
    • Total: 873
    • ★★★

    Cool, thanks.

    #27678
    atom
    Keymaster
    • Topics: 159
    • Replies: 2945
    • Total: 3104
    • ★★★★★

    I added the missing stuff you can test it now.

    #27692
    dasfaker
    Keymaster
    • Topics: 80
    • Replies: 793
    • Total: 873
    • ★★★

    Fantastic, 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?

    #27715
    atom
    Keymaster
    • Topics: 159
    • Replies: 2945
    • Total: 3104
    • ★★★★★

    Well 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.

    #27719
    dasfaker
    Keymaster
    • Topics: 80
    • Replies: 793
    • Total: 873
    • ★★★

    Superb, thanks Atom.

    #28335
    dasfaker
    Keymaster
    • Topics: 80
    • Replies: 793
    • Total: 873
    • ★★★

    Hi 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?

    #28336
    atom
    Keymaster
    • Topics: 159
    • Replies: 2945
    • Total: 3104
    • ★★★★★

    I’ll add the missing templates asap.

    Just set the icon to an empty image, Juce should pick this up and draw mothing
    icon = Image()

    #28337
    dasfaker
    Keymaster
    • Topics: 80
    • Replies: 793
    • Total: 873
    • ★★★

    Thanks 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.

    #28338
    atom
    Keymaster
    • Topics: 159
    • Replies: 2945
    • Total: 3104
    • ★★★★★

    Yeah 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.

    #28340
    dasfaker
    Keymaster
    • Topics: 80
    • Replies: 793
    • Total: 873
    • ★★★

    Yeah, easy fix, I’ll do it, thanks.

    #28356
    atom
    Keymaster
    • Topics: 159
    • Replies: 2945
    • Total: 3104
    • ★★★★★

    Did you try the OPenGL rendering engine ? Any performance improvement ?

    #28392
    dasfaker
    Keymaster
    • Topics: 80
    • Replies: 793
    • Total: 873
    • ★★★

    Not 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.♦

    #28393
    atom
    Keymaster
    • Topics: 159
    • Replies: 2945
    • Total: 3104
    • ★★★★★

    I 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.

    #28415
    dasfaker
    Keymaster
    • Topics: 80
    • Replies: 793
    • Total: 873
    • ★★★

    I’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.

Viewing 20 posts - 1 through 20 (of 39 total)
  • The forum ‘Using Ctrlr’ is closed to new topics and replies.
There is currently 0 users and 55 guests online
No users are currently active
Forum Statistics
Threads: 2,495, Posts: 17,374, Members: 77,605
Most users ever online was 12 on January 22, 2019 3:47 pm
Ctrlr