XWidgetSoft Forum

XWidget & XLaunchpad , Desktop customization
It is currently 2017年 Oct 18日 06:51

All times are UTC - 8 hours




Post new topic Reply to topic  [ 13 posts ] 
Author Message
PostPosted: 2012年 Jun 16日 08:15 
Offline
User avatar

Joined: 2012年 Jun 10日 05:57
Posts: 315
use least controls and code to show you the animate effect clearly

1.scaleto function example
show the scaleto() function of XWidget. More details in the code

2.move controls example
you can drag the control in the widget window

3.controls go with mouse example
the circle will follow your mouse when your mouse move over the widget

Attachment:
3 cool animate effect examples.rar [9.54 KiB]
Downloaded 775 times


Top
 Profile  
 
PostPosted: 2012年 Aug 25日 09:46 
Offline
User avatar

Joined: 2012年 Jul 9日 13:14
Posts: 112
Used your animation script here http://dagestuff.deviantart.com/art/Min ... -323313669 - thank you for sharing it! :D


Top
 Profile  
 
PostPosted: 2012年 Sep 2日 02:49 
Offline
User avatar

Joined: 2012年 Aug 29日 02:34
Posts: 56
qiancang Could you write more scale & matrix transformation & twinning functions ?.

_________________
Image


Top
 Profile  
 
PostPosted: 2013年 Apr 15日 04:48 
Offline
User avatar

Joined: 2013年 Apr 12日 15:56
Posts: 10
Location: Iran
What if I need ScaleTo for entire widget?
It say : Object doesn't support this property or method.


Top
 Profile  
 
PostPosted: 2013年 Apr 16日 05:19 
Offline
User avatar

Joined: 2012年 Jun 10日 05:57
Posts: 315
BijaN-R wrote:
What if I need ScaleTo for entire widget?
It say : Object doesn't support this property or method.


put all controls into a layer, and then scale the layer.


Top
 Profile  
 
PostPosted: 2016年 Feb 21日 03:47 
Online
User avatar

Joined: 2012年 Dec 5日 17:52
Posts: 4549
Move controls and save position example by qiancang.


Attachments:
move_controls_and_save_position_example.xwp [7.44 KiB]
Downloaded 163 times

_________________
Image
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/
Top
 Profile  
 
PostPosted: 2016年 Feb 21日 04:49 
Online
User avatar

Joined: 2012年 Dec 5日 17:52
Posts: 4549
Alternative script by @meme

Code:
var md,mdx,mdy;
var Text1X, Text1Y;

function widgetOnLoad()
{
text1.Left = parseInt(getinivalue(WidgetPath+"config.ini","Default","Text1X",""));
text1.Top = parseInt(getinivalue(WidgetPath+"config.ini","Default","Text1Y",""));
}

function text1OnMouseDown(Sender,Button,Shift,X,Y)
{
md = true;
mdx = X;
mdy = Y;

}

function text1OnMouseMove(Sender,Shift,X,Y,Dx,Dy)
{
if(md)
{
Sender.left = Sender.left + X - mdx;
Sender.top = Sender.top + Y - mdy;
}
}

function text1OnMouseUp(Sender,Button,Shift,X,Y)
{
md = false;
Setvalue("Text1X",Sender.left);
Setvalue("Text1Y",Sender.top);
SaveAsDefIni();
}

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


Top
 Profile  
 
PostPosted: 2016年 Mar 16日 05:23 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 563
It would seem that the move code above from meme has no effect on a layer but only works on a discrete control by itself. So far I have not been able to move separately a layer consisting of a number of controls.


Top
 Profile  
 
PostPosted: 2016年 Mar 16日 07:17 
Online
User avatar

Joined: 2012年 Dec 5日 17:52
Posts: 4549
meme' s script works fine. If there is a problem using layers, don't forget that you can drag drop one element into another. Check one of my "3d desktop widgets " to see it by yourself..

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


Top
 Profile  
 
PostPosted: 2016年 Mar 16日 07:41 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 563
Dropping one element/object/component into another creates a 'layer' according to Xwidget terminology. That is what I want to move, the layer, not an element/object/component on its own but a group of them. Meme's scripts works on elements/objects but not layers. I have used this sort of code before on a component and of course it works successfully. However I have tested it on a layer and it seems to do nothing that was my reason for my original post.

If you have managed to move a layer please attach a link or some working code that gives an example, please.


Top
 Profile  
 
PostPosted: 2016年 Mar 16日 08:05 
Online
User avatar

Joined: 2012年 Dec 5日 17:52
Posts: 4549
Quote:
Dropping one element/object/component into another creates a 'layer' according to Xwidget terminology.

No yereverluvinuncleber. When I talk about "layer" I mean the designer's component!
It's different the "layer" from drag-drop components.

Image

And yes, when I made the "3D Desktop" widgets I noticed that there is a problem using "layer" and these scripts (one by meme and two by qiancang). So I think that maybe it is a bug of the designer and that simply doesn't work with the layers. The scrpits are ok.
That's why I used the drag-drop method because 1) works and 2) you can have the same result.

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


Top
 Profile  
 
PostPosted: 2016年 Mar 16日 12:46 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 563
Got it!


Top
 Profile  
 
PostPosted: 2016年 Mar 16日 13:55 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 563
That works perfectly. I think you are correct about there being a bug with respect to moving genuine layers.

What you have done is create pseudo-layers. Those pseudo-layers can then be moved as all objects can be moved.

Thank you!


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

All times are UTC - 8 hours


Who is online

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

Powered by phpBB® Forum Software © phpBB Group