XWidgetSoft Forum

XWidget & XLaunchpad , Desktop customization
It is currently May 10th, 2025, 2:01 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: February 24th, 2014, 4:46 pm 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887
The widget is the BodClock3d and I would like to make it full colour customization:
Image

Quote:
function image1OnDblClick(Sender)
{
var color = selectColor(ampm.font.fill.color);
setcolor(color);
Setvalue("color",ampm.font.fill.color);
SaveIni();
}

function widgetOnLoad()
{
setcolor(GetValue("color",ampm.font.fill.color));
}

function setcolor(color)
{
hour.font.fill.color = color;
ampm.font.fill.color = color;
day.font.fill.color = color;
month.font.fill.color = color;
}


I would like to control/change the colour of two more components: "line" and "min".
How should be the additional script to have the same colour control (for these two other components "line" and "min")?

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


Top
 Profile  
 
PostPosted: March 7th, 2014, 11:23 pm 
Offline

Joined: October 26th, 2013, 8:17 am
Posts: 362
just you need to add those components like others:
Code:
function setcolor(color)
{
hour.font.fill.color = color;
ampm.font.fill.color = color;
day.font.fill.color = color;
month.font.fill.color = color;
//new components:
line.font.fill.color = color;
min.font.fill.color = color;
}


Top
 Profile  
 
PostPosted: March 8th, 2014, 6:18 am 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887
Thanks for the reply hamid! But I can't find the right place to put your script, and the doudle click function/script doesn't support it..
could you pls take a look from the "inside", for check better what I want to do..

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


Top
 Profile  
 
PostPosted: March 8th, 2014, 11:21 am 
Offline

Joined: October 26th, 2013, 8:17 am
Posts: 362
my old code would change the color of all components with one color
i rewrite the code to have 2 color selections
Attachment:
bobclockd3_original_test[2014.03.08].xwp [200.32 KiB]
Downloaded 258 times


Top
 Profile  
 
PostPosted: March 8th, 2014, 3:02 pm 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887
hamid wrote:
my old code would change the color of all components with one color
i rewrite the code to have 2 color selections

Now it's perfect! :D
Thanks for your precious help hamid!

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


Top
 Profile  
 
PostPosted: March 8th, 2014, 3:53 pm 
Offline
User avatar

Joined: December 5th, 2012, 5:52 pm
Posts: 4887
Posted: :)
viewtopic.php?f=11&t=4224

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


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

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 38 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