-
Notifications
You must be signed in to change notification settings - Fork 151
Expand file tree
/
Copy pathPanelManager.cs
More file actions
45 lines (27 loc) · 1.15 KB
/
PanelManager.cs
File metadata and controls
45 lines (27 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using UnityEngine;
using System.Collections;
public class PanelManager : MonoBehaviour
{
void Start()
{
Debug.LogError("PanelManager.Start()");
// IMPORTANT: depth is 1 on top higher numbers on the bottom. This means the lower the number is the closer it gets to the camera.
var playButton = UIButton.create( "playUp.png", "playDown.png", 0, 0 );
// Scores button
var scores = UIContinuousButton.create( "scoresUp.png", "scoresDown.png", 0, 0 );
// Options button
var optionsButton = UIZoomButton.create( "optionsUp.png", "optionsDown.png", 0, 0 );
optionsButton.animationDuration = 0.2f;
optionsButton.animationTargetScale = new Vector3( 1.4f, 1.4f, 1.4f );
// Scores button
var scores2 = UIContinuousButton.create("scoresUp.png", "scoresDown.png", 0, 0 );
// Vertical panel
var vPanel = UIVerticalPanel.create( "vertPanelTop.png", "vertPanelMiddle.png", "vertPanelBottom.png" );
vPanel.beginUpdates();
vPanel.spacing = 20;
vPanel.edgeInsets = new UIEdgeInsets( 30, 10, 20, 10 );
vPanel.addChild( playButton, scores, optionsButton, scores2 );
vPanel.endUpdates();
vPanel.positionCenter();
}
}