XWidgetSoft Forum https://bbs.xwidget.com/ |
|
Zoom in/out With Mouse Wheel? https://bbs.xwidget.com/viewtopic.php?f=8&t=5422 |
Page 1 of 1 |
Author: | kabott1 [ January 21st, 2015, 11:46 am ] |
Post subject: | Zoom in/out With Mouse Wheel? |
Hey-all, just got some cool ideas for a theme,but need to know if they r doable, so here is the thing: Is there way to Zoom in/out using mouse wheel? Same with Opacity? Thanks! |
Author: | meme [ January 21st, 2015, 3:36 pm ] |
Post subject: | Re: Zoom in/out With Mouse Wheel? |
Do you mean zoom an object like a button or image, or zoom the whole widget ? |
Author: | kabott1 [ January 21st, 2015, 5:50 pm ] |
Post subject: | Re: Zoom in/out With Mouse Wheel? |
Hi meme, i mean the whole widget |
Author: | meme [ January 21st, 2015, 8:17 pm ] |
Post subject: | Re: Zoom in/out With Mouse Wheel? |
Probably not what you are after but you can zoom a layer from mouse wheel with function layer1OnMouseWheelUp(Sender) { var LX = layer1.Scale.X; var LY = layer1.Scale.Y; LX = LX + .1; LY = LY + .1; layer1.ScaleTo(LX,LY); } function layer1OnMouseWheelDown(Sender) { var LX = layer1.Scale.X; var LY = layer1.Scale.Y; LX = LX - .1; LY = LY - .1; layer1.ScaleTo(LX,LY); } |
Author: | kabott1 [ January 22nd, 2015, 5:47 am ] |
Post subject: | Re: Zoom in/out With Mouse Wheel? |
Daang, so there isn't a way to zoomIn/Out a widget with the mouse wheel? I was thinking on doing something like this, using a combination of Zoom and Opacity to create the "behind" effect Attachment:
|
Author: | meme [ January 23rd, 2015, 1:12 am ] |
Post subject: | Re: Zoom in/out With Mouse Wheel? |
If the widget has a full background layer the zoom script will zoom everything on the layer down to nothing and up to the actual size of the layer. Maybe worth a try. The below script will let you adjust the opacity of the layer and all that is on the layer. function button1OnMouseWheelUp(Sender) { var LO = layer1.Opacity; LO = LO + .1; layer1.Opacity = LO; } function button1OnMouseWheelDown(Sender) { var LO = layer1.Opacity; LO = LO - .1; layer1.Opacity = LO; } |
Author: | kabott1 [ January 23rd, 2015, 8:17 am ] |
Post subject: | Re: Zoom in/out With Mouse Wheel? |
Good idea, worth experimenting with, ill post the result for those interested, thanks meme! |
Author: | kabott1 [ January 23rd, 2015, 9:38 am ] |
Post subject: | Re: Zoom in/out With Mouse Wheel? |
Looking good! Attachment: is there a way to add progressive blur to the "Zoom" layer? that way the effect will be complete ![]() Attachment: Default.png [ 9.03 KiB | Viewed 9312 times ] Attachment:
|
Author: | kabott1 [ January 25th, 2015, 8:39 am ] |
Post subject: | Re: Zoom in/out With Mouse Wheel? |
Done! //=================== Zoom , Opacity & Blur function setFrontLayer(Sender) { ZoomLayer.ScaleTo(1,1); ZoomLayer.Opacity = 1; ZoomLayer.Effect.Blur.Softness = 0; SaveAsDefIni() ZoomLayer.update; } function setBackLayer(Sender) { ZoomLayer.ScaleTo(0.7,0.7); ZoomLayer.Opacity = 0.7; ZoomLayer.Effect.Blur.Softness = 0.07; SaveAsDefIni() ZoomLayer.update; } function SetFarBackLayer(Sender) { ZoomLayer.ScaleTo(0.5,0.5); ZoomLayer.Opacity = 0.5; ZoomLayer.Effect.Blur.Softness = 0.17; SaveAsDefIni() ZoomLayer.update; } // ================ Zoom End Attachment:
|
Page 1 of 1 | All times are UTC - 8 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |