Home › Forums › General › Programming › mouse over UiImageSlider [SOLVED]
- This topic has 11 replies, 2 voices, and was last updated 9 years, 5 months ago by zeoka.
-
AuthorPosts
-
September 25, 2014 at 8:35 pm #29536
Hi
is there a way to do a “mouse over” action on image sliders
Since nearly rev1600 the imagesliders doesn’t change their image by LUA
I still need to put the mouse over the component to change the imageCan I replace mouse action by LUA lines ?
Or please Atom could you check this “issue” ?Thank you
- This topic was modified 9 years, 5 months ago by zeoka.
September 25, 2014 at 10:55 pm #29545You can’t, at least for now. I might add mouse events for all components, but there is a risk it might break some things so i need to be careful. But i’ll try my best.
September 25, 2014 at 11:25 pm #29546Oh bad !
Or can I repaint the whole panel ?May be is it possible to add on image sliders and buttons
an IsPropertyChanged() methods and PropertyRepaint() or at panel level ?
I think about “mouseOver” and may be not needed and complicated..September 26, 2014 at 12:23 am #29549I added a test property for all components, that will be triggered on a mouse move event, you can try if it will help you.
This is a test because i need to find out if it won’t cause problems. I uploaded a nightly build for windows to test.
September 26, 2014 at 12:50 am #29551Thank you !
I trySeptember 26, 2014 at 1:17 am #29552Sorry to make you lose your time
i’have bad explained my problem
actually I need my mouse is over the component to change the image
That means the mouse over action on imageSliders does something that “repaint” the component so the mouse over method is not really useful or I miss something . I will check the ccp if by chance I can see something….September 26, 2014 at 1:23 am #29553Within that method you can repaint your component using the repaint() method on it.
September 26, 2014 at 11:57 am #29576Yes Atom but what I mean it already does the repaint when the mouse is over.
I saw the cpp’s yesterday there is image ,there is component but not image slider
I wondered if may be you could write lines that repaint directly the property “uiImageButtonResource” or “uiImageSliderResource”
repaint the frame or repaint with new image I don’t know
this is what happened when my mouse is over the component
However “componentLuaMouseMoved” could be useful for other purposesAttachments:
You must be logged in to view attached files.September 26, 2014 at 1:33 pm #29582“I still need to put the mouse over the component to change the image”
this is my bad English : in French must et need are the same word in this context 🙂September 30, 2014 at 10:25 pm #29838So were you able to repaint your component when you need to ?
Remember that any UI element in Ctrlr (panel, canvas, component) can be repainted individually. Also if you repaint a component holding more child components (like a group component that has sliders in it), you will repaint it and all it’s children. So repainting the entire panel is a bad idea because it will eat CPU (a lot of it).
October 1, 2014 at 3:55 am #29855I never got the repaint() with components
Only with graphics() and because you put the callback at a right place.
Is there some examples ?
..I look at Look&feel panel…
My images resources are very big : there will be 16*1,4mb + 16*0,7 mb
If I could economize image loading and use 2 resources images instead of 32.
The better is use the knob base as image in my custom comp(can’t get it for now) and use look&feel sliders if I can repaint them to change circles colour
Many things to learnOctober 24, 2014 at 1:28 am #31130Ok I’ve found finally how to repaint() the uiImageSlider
It is the child 0`
myMethod2 = function(mod, value)k = panel:getComponent(“modulator-3”)
cust = k:getChildComponent (0)if value == 0 then
k:setPropertyString(“uiImageSliderResource”,”Knob1″)
else
k:setPropertyString(“uiImageSliderResource”,”Knob3″)
end
cust:repaint()
end
` -
AuthorPosts
- The forum ‘Programming’ is closed to new topics and replies.