This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
built_in:layouts [2016/12/24 11:22] 37.205.117.38 [Backgrounds] |
built_in:layouts [2018/07/21 20:19] 90.216.254.199 [Example - Vertical] |
||
---|---|---|---|
Line 35: | Line 35: | ||
lay.AddChild( btnB ); | lay.AddChild( btnB ); | ||
- | btnC = app.CreateButton( "C", 0.2, 0.1 ); | + | btnC = app.CreateButton( "mf yeet on those despacito depressed niBBas", 0.2, 0.1 ); |
lay.AddChild( btnC ); | lay.AddChild( btnC ); | ||
Line 155: | Line 155: | ||
< | < | ||
Using Linear layouts and setting margins on child objects is usually the best way to position your App's graphical objects. | Using Linear layouts and setting margins on child objects is usually the best way to position your App's graphical objects. | ||
+ | |||
+ | =====Backgrounds===== | ||
+ | The background of a layout will be transparent by default, but you can set a color using the **SetBackColor** function. | ||
+ | < | ||
+ | Colors are given as hex **color codes** which can be copied from various graphics programs or simply exprimented with until you get the color you want. The format is (# | ||
+ | For example "# | ||
+ | You can also use a gradient background for a layout using the **SetBackGradient** and **SetBackGradientRadial** functions. | ||
+ | < | ||
+ | < | ||
=====Visibility===== | =====Visibility===== | ||
Line 165: | Line 174: | ||
^ Method | ^ Method | ||
| Layout.AddChild( child,order ) | child is the object to add to the Layout. Order is the rang option to make an object behind an other Object. | | Layout.AddChild( child,order ) | child is the object to add to the Layout. Order is the rang option to make an object behind an other Object. | ||
- | | Layout.Animate( type, | + | | Layout.Animate( type, callback, time ) | known types: SlideFromLeft,SlideFromRight,SlideFromTop,SlideFromBottom, |
| Layout.ChildToFront( child ) | | Layout.ChildToFront( child ) | ||
| Layout.Destroy() | | Layout.Destroy() |