Fixed Button texture swapping. Fixed Button scripts on scene change. Added buttons to scenes. Added SHEDITOR define for Managed #341

Merged
maverickdgg merged 17 commits from SP3-20-UI-System into main 2023-02-04 00:32:29 +08:00
5 changed files with 74 additions and 7 deletions
Showing only changes of commit fdacaf5036 - Show all commits

View File

@ -15,7 +15,7 @@
- EID: 1
Name: Canvas
IsActive: true
NumberOfChildren: 2
NumberOfChildren: 3
Components:
Canvas Component:
Canvas Width: 1920
@ -43,7 +43,7 @@
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 0, z: 0}
Translate: {x: 0, y: 75, z: 0}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 400, y: 200, z: 1}
IsActive: true
@ -60,6 +60,28 @@
- Type: ChangeSceneButton
Enabled: true
sceneID: 97158628
- EID: 6
Name: Quit Button
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: -200, z: 0}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 400, y: 200, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 129340704
IsActive: true
Button Component:
Default Texture: 66477839
Hovered Texture: 65045286
Clicked Texture: 58607560
IsActive: true
Scripts:
- Type: QuitButton
Enabled: true
- EID: 3
Name: Camera
IsActive: true

View File

@ -45,7 +45,7 @@
Scripts:
- Type: ChangeSceneButton
Enabled: true
sceneID: 86098106
sceneID: 96668835
- EID: 6
Name: Quit Game Button
IsActive: true

View File

@ -15,7 +15,7 @@
- EID: 1
Name: Canvas
IsActive: true
NumberOfChildren: 1
NumberOfChildren: 3
Components:
Canvas Component:
Canvas Width: 1920
@ -23,7 +23,7 @@
IsActive: true
Scripts: ~
- EID: 2
Name: Default
Name: Background
IsActive: true
NumberOfChildren: 0
Components:
@ -37,6 +37,51 @@
Material: 129138332
IsActive: true
Scripts: ~
- EID: 5
Name: Main Menu Button
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: 75, z: 0}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 400, y: 200, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 129340704
IsActive: true
Button Component:
Default Texture: 65788519
Hovered Texture: 55999018
Clicked Texture: 66382894
IsActive: true
Scripts:
- Type: ChangeSceneButton
Enabled: true
sceneID: 97158628
- EID: 6
Name: Quit Button
IsActive: true
NumberOfChildren: 0
Components:
Transform Component:
Translate: {x: 0, y: -200, z: 0}
Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 400, y: 200, z: 1}
IsActive: true
Renderable Component:
Mesh: 141771688
Material: 129340704
IsActive: true
Button Component:
Default Texture: 66477839
Hovered Texture: 65045286
Clicked Texture: 58607560
IsActive: true
Scripts:
- Type: QuitButton
Enabled: true
- EID: 3
Name: Camera
IsActive: true

View File

@ -6,7 +6,7 @@ public class ChangeSceneButton : Script
public uint sceneID = 0;
protected override void awake()
protected override void start()
{
UIElement ui = GetComponent<UIElement>();
ui.OnClick.RegisterAction(() =>

View File

@ -3,7 +3,7 @@ using SHADE;
public class QuitButton : Script
{
protected override void awake()
protected override void start()
{
UIElement ui = GetComponent<UIElement>();
ui.OnClick.RegisterAction(() =>