XWidgetSoft Forum

XWidget & XLaunchpad , Desktop customization
It is currently 2017年 Jun 23日 16:17

All times are UTC - 8 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: 2016年 Jun 4日 14:24 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 480
In the IDE the opacity of an object can be expressed from 1-100 in percentage terms. That is good.

However, in the use of code there is a massive inconsistency, the object's opacity can only be set at two values, either 0 or 1. Transparent or opaque.

It is as if Tony has forgotten that opacity is different from visibility. Visibility is correctly expressed as a boolean whilst opacity is a gradient from 1-100 or 0-255.

Most other engines and languages will allow opacity to be expressed in values from 0-255. The Xwidget IDE having only a percentage available is limited but just acceptable but the code limitation of an opacity limited to 0 or 1 is unacceptable. This, without a doubt - is a BUG.


Last edited by yereverluvinuncleber on 2016年 Jun 5日 07:25, edited 1 time in total.

Top
 Profile  
 
PostPosted: 2016年 Jun 4日 15:40 
Offline
User avatar

Joined: 2012年 Dec 5日 17:52
Posts: 4494
I know what do you mean and if through the js doesn't work properly I agree that something is wrong. But I have the same question: When you want a certain function that you can simply use through the designer's menu, why you try to do all through the script..?! There is already the opacity meter for all the components and works perfectly! Why don't use it..? I will never understand you on this.... :lol:

I can understand that as a prof designer you are used to do it, but I checked all your widgets and none of them uses neither one of the designer's functions.. This is crazy man..! :?

(friendly speaking of course, so don't take my comment as an accusation. You're free to do it as you want)

_________________
Image
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/


Top
 Profile  
 
PostPosted: 2016年 Jun 4日 17:49 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 480
No, you have it all wrong. I am changing the opacity in code because I have a function that simply requires it. Changing it in the IDE is not relevant to this function so it has to be done in code. The function that I am coding no longer operates when I tried to implement it because of the inconsistency in xwidget's handling of opacity in scripts.


Top
 Profile  
 
PostPosted: 2016年 Jun 4日 18:21 
Offline
User avatar

Joined: 2012年 Dec 5日 17:52
Posts: 4494
You know better. It's your work after all. I will see it in practice then..

_________________
Image
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/


Top
 Profile  
 
PostPosted: 2016年 Jun 4日 18:53 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 480
Go to bed!


Top
 Profile  
 
PostPosted: 2016年 Jun 4日 22:15 
Offline

Joined: 2012年 Jun 18日 00:07
Posts: 267
Try
edit1sensor1.Opacity = 0.5
The range appears to be 0 to 1
Seems to work for me.


Top
 Profile  
 
PostPosted: 2016年 Jun 5日 03:58 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 480
Wow, the instructions expressed an int boolean - I'll check and see, thankyou!


Top
 Profile  
 
PostPosted: 2016年 Jun 5日 07:24 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 480
Meme, your suggestion worked - perfectly.

To have a percentage expressed as a decimal value below 1 is quite bizarre when the IDE expresses it as you would expect as an integer value between 1 and 100. Other engines express it as a value from 0-255 but base javascript does express it in the same way as Xwidgets. I suppose I should have guessed it but what led me astray is that the auto-completion suggest is purely an integer value of either 0 or 1 (I won't trust that anymore).

Thanks again.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB® Forum Software © phpBB Group