XWidgetSoft Forum https://bbs.xwidget.com/ |
|
Curiosity: ESC key https://bbs.xwidget.com/viewtopic.php?f=7&t=4838 |
Page 1 of 1 |
Author: | Jimking [ July 23rd, 2014, 7:43 am ] |
Post subject: | Curiosity: ESC key |
I was thinking... We can control a layer (hide-fade out) using the "ESC" key..? Like many pc programs that use esc to close a window. I make a full screen widget and I'm wondering if I can use the "ESC" to hide/fade out the layer, instead of use the click on function using a ΧW "button".. |
Author: | hamid [ July 23rd, 2014, 1:10 pm ] |
Post subject: | Re: Curiosity: ESC key |
Author: | Jimking [ July 23rd, 2014, 1:24 pm ] |
Post subject: | Re: Curiosity: ESC key |
Thanks a lot man!!! I will test it after finish my full screen weather widget... |
Author: | Jimking [ July 23rd, 2014, 1:51 pm ] |
Post subject: | Re: Curiosity: ESC key |
Tested hamid but doesn't work.. What I'm doing wrong... |
Author: | hamid [ July 23rd, 2014, 2:34 pm ] |
Post subject: | Re: Curiosity: ESC key |
problems: 1. first of all, you add an extra } at the end of script 2. your layer that you make "can focused" enabled is in back of other objects, so it can't be focused 3. your "main" Image Object is on the top of all of the objects, so if you want to make focus you can use this object for it, not the layer that behind them also remember that: to make mouse focus [for layers]: it should be visible to be clickable (it means you need a color for it to make it available for mouse) you can make a clickable layer transparent by making its alpha to 1% here's the example: weather_pro_full_screen [test2].xwp [710.3 KiB] Downloaded 254 times |
Author: | Jimking [ July 23rd, 2014, 3:23 pm ] |
Post subject: | Re: Curiosity: ESC key |
Author: | Jimking [ July 23rd, 2014, 3:26 pm ] |
Post subject: | Re: Curiosity: ESC key |
Author: | hamid [ July 23rd, 2014, 3:35 pm ] |
Post subject: | Re: Curiosity: ESC key |
1. the child objects will be on the top of parent object > this means when you put objects inside another, those objects will be on the top of that object 2. it is not needed to focus the layer you want to get invisible, you should focus one object to make the function execute (that object that will call the function should be on the top), the function will do the job and it doesn't matter what it does (it can hide other objects,...) |
Author: | Jimking [ July 24th, 2014, 4:24 pm ] |
Post subject: | Re: Curiosity: ESC key |
Here is the final widget using the esc function: viewtopic.php?f=11&t=4846 |
Page 1 of 1 | All times are UTC - 8 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |