There's something I don't understand how skin anchors work. I read through the skin tutorials, and i know that they're use to resize controls relative to the window size.
But, if you select "Other" for the anchors and directly set the value percents, what does that change?
ID:157069
May 30 2010, 1:59 pm
|
|
Anchor X and Anchor Y ? What the heck is that ?
Anchor X = is meant to be Top Left of the Control
Anchor Y = is meant to beBottom Right of the Control
Anchors Format = (x%,y%)
x = the x axis or horizontal aligning //starts from 0(left) and ends with 100(right)
y = the y axis or vertical aligning //starts from 0(top) and ends with 100(bottom)
//to some extent BYOND can interpret what you are trying to say, but beyond that BYOND can't understand.
Use a bit more logic.
Condition: Use One Anchor --> Position Control
Condition: Use Two Anchors --> Size Control
From the Reference:
anchor1=50,100
The control will stay positioned in the same place relative to the bottom center of the window. This is a good place for an OK button.
Condition: Position Conrtol // since only one anchor is used
x=50% and y=100%
Horizontal Axis = 50% // will be placed in the center(center bcz its 50%) on the Horizontal Axis(Horizontal axis bcz its x).
Vertical Axis = 100% // will be placed in the bottom(bottom bcz its 100%) of the Vertical Axis(Vertical bcz its y).
anchor1=0,0 and anchor2=100,0
0,0 is the top left and 100,0 is the top right. The control will stretch left and right, but its height will not change.
Condition: Size Conrtol // since two anchors are used
1_x=0% and 1_y=0% // the top_left corner
1_Horizontal Axis = 0% // will be placed on the left (left bcz its 0%) on the Horizontal Axis(Horizontal axis bcz its x).
1_Vertical Axis = 0% // will be placed in the top(top bcz its 0%) of the Vertical Axis(Vertical bcz its y).
2_x=100% and 2_y=0% // the bottom_right corner
2_Horizontal Axis = 100% // will be placed on the right (right bcz its 100%) on the Horizontal Axis(Horizontal axis bcz its x).
2_Vertical Axis = 0% // will be placed in the top(top bcz its 0%) of the Vertical Axis(Vertical bcz its y).
anchor1=0,0 and anchor2=25,25
0,0 is the top left and 25,25 is the top right. The control will stretch left and right and top and down, but its width and height will be 1/4 of the window.
Condition: Size Conrtol // since two anchors are used
1_x=0% and 1_y=0% // the top_left corner
1_Horizontal Axis = 0% // will be placed on the left (left bcz its 0%) of the Horizontal Axis(Horizontal axis bcz its x).
1_Vertical Axis = 0% // will be placed in the top(top bcz its 0%) of the Vertical Axis(Vertical bcz its y).
2_x=25% and 2_y=25% // the bottom_right corner
2_Horizontal Axis = 25% // will be placed on the 1/4th (1/4 bcz its 25/100 =1/4) of the Horizontal Axis(Horizontal axis bcz its x).
2_Vertical Axis = 25% // will be placed in the 1/4(1/4 bcz its 25/100 =1/4) of the Vertical Axis(Vertical bcz its y).
NOTE:- Anchors are RELATIVE to their Position!Summing up all this you should understand.
I don't know how exactly BYOND calculates Anchors and Position but I can probably guess out how, but its not of my concern.Since % is more than enough.