3 reference
string m_ChildName;
4 reference
float m_HorizontalOffset;
5 reference
float m_VerticalOffset;
12 protected static bool m_IgnoredBool;
18 m_Child =
m_Root.FindAnyWidget( m_ChildName );
21 ResizeParentToChild();
25 bool ResizeParentToChild()
27 return ResizeParentToChild( m_IgnoredBool, -1,
true );
30 bool ResizeParentToChild( out
bool changed_size,
int limit = -1,
bool immedUpdate =
true )
32 float x,
y, o_x, o_y, new_x, new_y;
36 m_Child.GetScreenSize(
x,
y );
37 m_Root.GetScreenSize( new_x, new_y );
38 m_Root.GetSize( o_x, o_y );
41 bool hit_limit =
false;
45 new_x =
x + m_HorizontalOffset;
53 new_y =
y + m_VerticalOffset;
59 if ( limit > 0 && new_y > limit )
67 m_Root.SetSize( new_x, new_y, immedUpdate );
70 changed_size = changed;
75 m_Child =
m_Root.FindAnyWidget( m_ChildName );
78 Print(
"Error in size to child, " +
m_Root.GetName() +
" has no child named " + m_ChildName );
110 float x,
y, o_x, o_y, new_x, new_y;
113 m_Root.GetScreenSize( new_x, new_y );
114 m_Root.GetSize( o_x, o_y );
116 bool changed =
false;
135 m_Root.SetSize( new_x, new_y );