-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSceneTitle.composer.cs
178 lines (145 loc) · 5.62 KB
/
SceneTitle.composer.cs
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
// AUTOMATICALLY GENERATED CODE
using System;
using System.Collections.Generic;
using Sce.PlayStation.Core;
using Sce.PlayStation.Core.Imaging;
using Sce.PlayStation.Core.Environment;
using Sce.PlayStation.HighLevel.UI;
namespace ShootingApp
{
partial class SceneTitle
{
ImageBox ImageBox_1;
Label Label_1;
Button Button_1;
Button Button_2;
Button Button_3;
private void InitializeWidget()
{
InitializeWidget(LayoutOrientation.Horizontal);
}
private void InitializeWidget(LayoutOrientation orientation)
{
ImageBox_1 = new ImageBox();
ImageBox_1.Name = "ImageBox_1";
Label_1 = new Label();
Label_1.Name = "Label_1";
Button_1 = new Button();
Button_1.Name = "Button_1";
Button_2 = new Button();
Button_2.Name = "Button_2";
Button_3 = new Button();
Button_3.Name = "Button_3";
// ImageBox_1
ImageBox_1.Image = new ImageAsset("/Application/assets/title.jpg");
// Label_1
Label_1.TextColor = new UIColor(255f / 255f, 27f / 255f, 157f / 255f, 255f / 255f);
Label_1.Font = new UIFont(FontAlias.System, 68, FontStyle.Bold);
Label_1.LineBreak = LineBreak.Character;
Label_1.HorizontalAlignment = HorizontalAlignment.Center;
Label_1.TextShadow = new TextShadowSettings()
{
Color = new UIColor(128f / 255f, 128f / 255f, 128f / 255f, 127f / 255f),
HorizontalOffset = 2f,
VerticalOffset = 2f,
};
// Button_1
Button_1.TextColor = new UIColor(253f / 255f, 211f / 255f, 2f / 255f, 255f / 255f);
Button_1.TextFont = new UIFont(FontAlias.System, 25, FontStyle.Regular);
// Button_2
Button_2.TextColor = new UIColor(253f / 255f, 211f / 255f, 2f / 255f, 255f / 255f);
Button_2.TextFont = new UIFont(FontAlias.System, 25, FontStyle.Regular);
// Button_3
Button_3.TextColor = new UIColor(253f / 255f, 211f / 255f, 2f / 255f, 255f / 255f);
Button_3.TextFont = new UIFont(FontAlias.System, 25, FontStyle.Regular);
// SceneTitle
this.RootWidget.AddChildLast(ImageBox_1);
this.RootWidget.AddChildLast(Label_1);
this.RootWidget.AddChildLast(Button_1);
this.RootWidget.AddChildLast(Button_2);
this.RootWidget.AddChildLast(Button_3);
this.Transition = new CrossFadeTransition();
SetWidgetLayout(orientation);
UpdateLanguage();
}
private LayoutOrientation _currentLayoutOrientation;
public void SetWidgetLayout(LayoutOrientation orientation)
{
switch (orientation)
{
case LayoutOrientation.Vertical:
this.DesignWidth = 544;
this.DesignHeight = 960;
ImageBox_1.SetPosition(362, 158);
ImageBox_1.SetSize(200, 200);
ImageBox_1.Anchors = Anchors.None;
ImageBox_1.Visible = true;
Label_1.SetPosition(349, 104);
Label_1.SetSize(214, 36);
Label_1.Anchors = Anchors.None;
Label_1.Visible = true;
Button_1.SetPosition(600, 342);
Button_1.SetSize(214, 56);
Button_1.Anchors = Anchors.None;
Button_1.Visible = true;
Button_2.SetPosition(600, 310);
Button_2.SetSize(214, 50);
Button_2.Anchors = Anchors.None;
Button_2.Visible = true;
break;
default:
this.DesignWidth = 960;
this.DesignHeight = 544;
ImageBox_1.SetPosition(0, 0);
ImageBox_1.SetSize(960, 544);
ImageBox_1.Anchors = Anchors.None;
ImageBox_1.Visible = true;
Label_1.SetPosition(19, 46);
Label_1.SetSize(566, 125);
Label_1.Anchors = Anchors.None;
Label_1.Visible = true;
Button_1.SetPosition(650, 300);
Button_1.SetSize(214, 50);
Button_1.Anchors = Anchors.None;
Button_1.Visible = true;
Button_2.SetPosition(650, 370);
Button_2.SetSize(214, 50);
Button_2.Anchors = Anchors.None;
Button_2.Visible = true;
Button_3.SetPosition(650, 440);
Button_3.SetSize(214, 50);
Button_3.Anchors = Anchors.None;
Button_3.Visible = true;
break;
}
_currentLayoutOrientation = orientation;
}
public void UpdateLanguage()
{
Label_1.Text = "";
Button_1.Text = "スタート";
Button_2.Text = "ステータス";
Button_3.Text = "クレジット";
}
private void onShowing(object sender, EventArgs e)
{
switch (_currentLayoutOrientation)
{
case LayoutOrientation.Vertical:
break;
default:
break;
}
}
private void onShown(object sender, EventArgs e)
{
switch (_currentLayoutOrientation)
{
case LayoutOrientation.Vertical:
break;
default:
break;
}
}
}
}