diff --git a/Assets/Materials/UI/UIMat_MainMenu.shmat b/Assets/Materials/UI/UIMat_MainMenu.shmat index ba2069e9..8aefe36e 100644 --- a/Assets/Materials/UI/UIMat_MainMenu.shmat +++ b/Assets/Materials/UI/UIMat_MainMenu.shmat @@ -3,6 +3,6 @@ SubPass: UI Properties: data.color: {x: 1, y: 1, z: 1, w: 1} - data.textureIndex: 54429632 + data.textureIndex: 58181851 data.alpha: 1 data.beta: {x: 1, y: 1, z: 1} \ No newline at end of file diff --git a/Assets/Scenes/Level1.shade b/Assets/Scenes/Level1.shade index e608af6b..340e0c8d 100644 --- a/Assets/Scenes/Level1.shade +++ b/Assets/Scenes/Level1.shade @@ -5202,10 +5202,10 @@ Scripts: - Type: SHADE_Scripting.UI.ButtonFX Enabled: true - onHoverEnterSound: event:/Music/player_undetected - onHoverExitSound: event:/Music/player_undetected - onClickSound: event:/Music/player_undetected - onReleaseSound: event:/Music/player_undetected + onHoverEnterSound: Empty + onHoverExitSound: Empty + onClickSound: event:/UI/mouse_down_element + onReleaseSound: Empty hoverScale: 1.10000002 clickScale: 0.899999976 - EID: 456 @@ -5235,10 +5235,10 @@ Scripts: - Type: SHADE_Scripting.UI.ButtonFX Enabled: true - onHoverEnterSound: event:/Music/player_undetected - onHoverExitSound: event:/Music/player_undetected - onClickSound: event:/Music/player_undetected - onReleaseSound: event:/Music/player_undetected + onHoverEnterSound: Empty + onHoverExitSound: Empty + onClickSound: event:/UI/mouse_down_element + onReleaseSound: Empty hoverScale: 1.10000002 clickScale: 0.899999976 - EID: 455 @@ -5268,10 +5268,10 @@ Scripts: - Type: SHADE_Scripting.UI.ButtonFX Enabled: true - onHoverEnterSound: event:/Music/player_undetected - onHoverExitSound: event:/Music/player_undetected - onClickSound: event:/Music/player_undetected - onReleaseSound: event:/Music/player_undetected + onHoverEnterSound: Empty + onHoverExitSound: Empty + onClickSound: event:/UI/mouse_down_element + onReleaseSound: Empty hoverScale: 1.10000002 clickScale: 0.899999976 - EID: 454 diff --git a/Assets/Scenes/Level2.shade b/Assets/Scenes/Level2.shade index b66af5c2..1d47aa62 100644 --- a/Assets/Scenes/Level2.shade +++ b/Assets/Scenes/Level2.shade @@ -5450,10 +5450,10 @@ Scripts: - Type: SHADE_Scripting.UI.ButtonFX Enabled: true - onHoverEnterSound: event:/Music/player_undetected - onHoverExitSound: event:/Music/player_undetected - onClickSound: event:/Music/player_undetected - onReleaseSound: event:/Music/player_undetected + onHoverEnterSound: Empty + onHoverExitSound: Empty + onClickSound: event:/UI/mouse_down_element + onReleaseSound: Empty hoverScale: 1.10000002 clickScale: 0.899999976 - EID: 0 @@ -5483,10 +5483,10 @@ Scripts: - Type: SHADE_Scripting.UI.ButtonFX Enabled: true - onHoverEnterSound: event:/Music/player_undetected - onHoverExitSound: event:/Music/player_undetected - onClickSound: event:/Music/player_undetected - onReleaseSound: event:/Music/player_undetected + onHoverEnterSound: Empty + onHoverExitSound: Empty + onClickSound: event:/UI/mouse_down_element + onReleaseSound: Empty hoverScale: 1.10000002 clickScale: 0.899999976 - EID: 458 @@ -5516,10 +5516,10 @@ Scripts: - Type: SHADE_Scripting.UI.ButtonFX Enabled: true - onHoverEnterSound: event:/Music/player_undetected - onHoverExitSound: event:/Music/player_undetected - onClickSound: event:/Music/player_undetected - onReleaseSound: event:/Music/player_undetected + onHoverEnterSound: Empty + onHoverExitSound: Empty + onClickSound: event:/UI/mouse_down_element + onReleaseSound: Empty hoverScale: 1.10000002 clickScale: 0.899999976 - EID: 11 diff --git a/Assets/Scenes/LoseScene.shade b/Assets/Scenes/LoseScene.shade index f7c01b1d..fa0191f4 100644 --- a/Assets/Scenes/LoseScene.shade +++ b/Assets/Scenes/LoseScene.shade @@ -73,10 +73,10 @@ sceneID: 97158628 - Type: SHADE_Scripting.UI.ButtonFX Enabled: true - onHoverEnterSound: event:/Music/player_undetected - onHoverExitSound: event:/Music/player_undetected - onClickSound: event:/Music/player_undetected - onReleaseSound: event:/Music/player_undetected + onHoverEnterSound: Empty + onHoverExitSound: Empty + onClickSound: event:/UI/mouse_down_element + onReleaseSound: Empty hoverScale: 1.10000002 clickScale: 0.899999976 - EID: 6 @@ -108,10 +108,10 @@ Enabled: true - Type: SHADE_Scripting.UI.ButtonFX Enabled: true - onHoverEnterSound: event:/Music/player_undetected - onHoverExitSound: event:/Music/player_undetected - onClickSound: event:/Music/player_undetected - onReleaseSound: event:/Music/player_undetected + onHoverEnterSound: Empty + onHoverExitSound: Empty + onClickSound: event:/UI/mouse_down_element + onReleaseSound: Empty hoverScale: 1.10000002 clickScale: 0.899999976 - EID: 3 @@ -153,4 +153,40 @@ Components: ~ Scripts: - Type: SHADE_Scripting.UI.TweenManager - Enabled: true \ No newline at end of file + Enabled: true +- EID: 450 + Name: TransitionCanvas + IsActive: true + NumberOfChildren: 1 + Components: + Canvas Component: + Canvas Width: 1920 + Canvas Height: 1080 + Scale by canvas width: false + IsActive: true + Scripts: ~ +- EID: 65982 + Name: Transition + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: 0, z: 0.100000001} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 2500, y: 1080, z: 1} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 120016136 + IsActive: true + UI Component: + Canvas ID: 450 + Hovered: false + Clicked: false + IsActive: true + Scripts: + - Type: SHADE_Scripting.UI.SceneFadeInOut + Enabled: true + alphaValue: 1 + fadeInTime: 0.5 + fadeOutTime: 0.5 \ No newline at end of file diff --git a/Assets/Scenes/MainMenu.shade b/Assets/Scenes/MainMenu.shade index 003f7609..0db6e0d7 100644 --- a/Assets/Scenes/MainMenu.shade +++ b/Assets/Scenes/MainMenu.shade @@ -21,7 +21,7 @@ IsActive: true Renderable Component: Mesh: 141771688 - Material: 129138332 + Material: 121834459 IsActive: true UI Component: Canvas ID: 0 @@ -100,10 +100,10 @@ sceneID: 91947920 - Type: SHADE_Scripting.UI.ButtonFX Enabled: true - onHoverEnterSound: event:/Music/player_undetected - onHoverExitSound: "event:/Music/player_undetected\x00���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������" - onClickSound: event:/Music/player_undetected - onReleaseSound: event:/Music/player_undetected + onHoverEnterSound: Empty + onHoverExitSound: Empty + onClickSound: event:/UI/mouse_down_element + onReleaseSound: Empty hoverScale: 1.10000002 clickScale: 0.899999976 - EID: 6 @@ -135,10 +135,10 @@ Enabled: true - Type: SHADE_Scripting.UI.ButtonFX Enabled: true - onHoverEnterSound: event:/Music/player_undetected - onHoverExitSound: event:/Music/player_undetected - onClickSound: event:/Music/player_undetected - onReleaseSound: event:/Music/player_undetected + onHoverEnterSound: Empty + onHoverExitSound: Empty + onClickSound: event:/UI/mouse_down_element + onReleaseSound: Empty hoverScale: 1.10000002 clickScale: 0.899999976 - EID: 7 @@ -168,10 +168,10 @@ Scripts: - Type: SHADE_Scripting.UI.ButtonFX Enabled: true - onHoverEnterSound: event:/Music/player_undetected - onHoverExitSound: event:/Music/player_undetected - onClickSound: event:/Music/player_undetected - onReleaseSound: event:/Music/player_undetected + onHoverEnterSound: Empty + onHoverExitSound: Empty + onClickSound: event:/UI/mouse_down_element + onReleaseSound: Empty hoverScale: 1.10000002 clickScale: 0.899999976 - Type: SHADE_Scripting.UI.ChangeCanvasButton @@ -204,10 +204,10 @@ Scripts: - Type: SHADE_Scripting.UI.ButtonFX Enabled: true - onHoverEnterSound: event:/Music/player_undetected - onHoverExitSound: event:/Music/player_undetected - onClickSound: event:/Music/player_undetected - onReleaseSound: event:/Music/player_undetected + onHoverEnterSound: Empty + onHoverExitSound: Empty + onClickSound: event:/UI/mouse_down_element + onReleaseSound: Empty hoverScale: 1.10000002 clickScale: 0.899999976 - Type: SHADE_Scripting.UI.ChangeCanvasButton @@ -240,10 +240,10 @@ Scripts: - Type: SHADE_Scripting.UI.ButtonFX Enabled: true - onHoverEnterSound: event:/Music/player_undetected - onHoverExitSound: event:/Music/player_undetected - onClickSound: event:/Music/player_undetected - onReleaseSound: event:/Music/player_undetected + onHoverEnterSound: Empty + onHoverExitSound: Empty + onClickSound: event:/UI/mouse_down_element + onReleaseSound: Empty hoverScale: 1.10000002 clickScale: 0.899999976 - Type: SHADE_Scripting.UI.ChangeCanvasButton @@ -276,10 +276,10 @@ Scripts: - Type: SHADE_Scripting.UI.ButtonFX Enabled: true - onHoverEnterSound: event:/Music/player_undetected - onHoverExitSound: event:/Music/player_undetected - onClickSound: event:/Music/player_undetected - onReleaseSound: event:/Music/player_undetected + onHoverEnterSound: Empty + onHoverExitSound: Empty + onClickSound: event:/UI/mouse_down_element + onReleaseSound: Empty hoverScale: 1.10000002 clickScale: 0.899999976 - Type: SHADE_Scripting.UI.ChangeCanvasButton @@ -352,23 +352,23 @@ Scripts: ~ - EID: 14 Name: BackGround - IsActive: false + IsActive: true NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 0, y: 0, z: 0.5} + Translate: {x: 0, y: 0, z: 2.5} Rotate: {x: 0, y: 0, z: 0} Scale: {x: 1920, y: 1080, z: 1} - IsActive: false + IsActive: true Renderable Component: Mesh: 141771688 Material: 121834459 - IsActive: false + IsActive: true UI Component: Canvas ID: 13 Hovered: false Clicked: false - IsActive: false + IsActive: true Scripts: ~ - EID: 15 Name: Instruction Image @@ -378,7 +378,7 @@ Transform Component: Translate: {x: 0, y: 0, z: 0.400000006} Rotate: {x: 0, y: 0, z: 0} - Scale: {x: 1344, y: 756, z: 1} + Scale: {x: 1167.40002, y: 900, z: 1} IsActive: true Renderable Component: Mesh: 141771688 @@ -428,10 +428,10 @@ multiImageList: 15 - Type: SHADE_Scripting.UI.ButtonFX Enabled: true - onHoverEnterSound: event:/Music/player_undetected - onHoverExitSound: event:/Music/player_undetected - onClickSound: event:/Music/player_undetected - onReleaseSound: event:/Music/player_undetected + onHoverEnterSound: Empty + onHoverExitSound: Empty + onClickSound: event:/UI/mouse_down_element + onReleaseSound: Empty hoverScale: 1.10000002 clickScale: 0.899999976 - EID: 17 @@ -465,10 +465,10 @@ multiImageList: 15 - Type: SHADE_Scripting.UI.ButtonFX Enabled: true - onHoverEnterSound: event:/Music/player_undetected - onHoverExitSound: event:/Music/player_undetected - onClickSound: event:/Music/player_undetected - onReleaseSound: event:/Music/player_undetected + onHoverEnterSound: Empty + onHoverExitSound: Empty + onClickSound: event:/UI/mouse_down_element + onReleaseSound: Empty hoverScale: 1.10000002 clickScale: 0.899999976 - EID: 18 @@ -501,18 +501,10 @@ canvasToActivate: 0 - Type: SHADE_Scripting.UI.ButtonFX Enabled: true - onHoverEnterSound: event:/Music/player_undetected - onHoverExitSound: event:/Music/player_undetected - onClickSound: event:/Music/player_undetected - onReleaseSound: event:/Music/player_undetected - hoverScale: 1.10000002 - clickScale: 0.899999976 - - Type: SHADE_Scripting.UI.ButtonFX - Enabled: true - onHoverEnterSound: event:/Music/player_undetected - onHoverExitSound: event:/Music/player_undetected - onClickSound: event:/Music/player_undetected - onReleaseSound: event:/Music/player_undetected + onHoverEnterSound: Empty + onHoverExitSound: Empty + onClickSound: event:/UI/mouse_down_element + onReleaseSound: Empty hoverScale: 1.10000002 clickScale: 0.899999976 - EID: 19 @@ -528,23 +520,23 @@ Scripts: ~ - EID: 20 Name: BackGround - IsActive: false + IsActive: true NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 0, y: 0, z: 1} + Translate: {x: 0, y: 0, z: 1.5} Rotate: {x: 0, y: 0, z: 0} Scale: {x: 1920, y: 1080, z: 1} - IsActive: false + IsActive: true Renderable Component: Mesh: 141771688 Material: 121834459 - IsActive: false + IsActive: true UI Component: Canvas ID: 19 Hovered: false Clicked: false - IsActive: false + IsActive: true Scripts: ~ - EID: 21 Name: BackButton @@ -574,6 +566,14 @@ - Type: SHADE_Scripting.UI.ChangeCanvasButton Enabled: true canvasToActivate: 0 + - Type: SHADE_Scripting.UI.ButtonFX + Enabled: true + onHoverEnterSound: Empty + onHoverExitSound: Empty + onClickSound: event:/UI/mouse_down_element + onReleaseSound: Empty + hoverScale: 1.10000002 + clickScale: 0.899999976 - EID: 22 Name: Options Title Text IsActive: true @@ -587,7 +587,7 @@ Text Renderer Component: Text: Options Font: 174412429 - Color: {x: 1, y: 1, z: 1, w: 1} + Color: {x: 0, y: 0, z: 0, w: 1} Text Size: {x: 1, y: 1, z: 1} IsActive: true UI Component: @@ -609,7 +609,7 @@ Text Renderer Component: Text: Audio Font: 174412429 - Color: {x: 1, y: 1, z: 1, w: 1} + Color: {x: 0, y: 0, z: 0, w: 1} Text Size: {x: 1, y: 1, z: 1} IsActive: true UI Component: @@ -647,7 +647,7 @@ Text Renderer Component: Text: Master Font: 174412429 - Color: {x: 1, y: 1, z: 1, w: 1} + Color: {x: 0, y: 0, z: 0, w: 1} Text Size: {x: 1, y: 1, z: 1} IsActive: true UI Component: @@ -669,7 +669,7 @@ Text Renderer Component: Text: SFX Font: 174412429 - Color: {x: 1, y: 1, z: 1, w: 1} + Color: {x: 0, y: 0, z: 0, w: 1} Text Size: {x: 1, y: 1, z: 1} IsActive: true UI Component: @@ -691,7 +691,7 @@ Text Renderer Component: Text: BGM Font: 174412429 - Color: {x: 1, y: 1, z: 1, w: 1} + Color: {x: 0, y: 0, z: 0, w: 1} Text Size: {x: 1, y: 1, z: 1} IsActive: true UI Component: @@ -798,7 +798,7 @@ Text Renderer Component: Text: Camera Font: 174412429 - Color: {x: 1, y: 1, z: 1, w: 1} + Color: {x: 0, y: 0, z: 0, w: 1} Text Size: {x: 1, y: 1, z: 1} IsActive: true UI Component: @@ -836,7 +836,7 @@ Text Renderer Component: Text: FOV Font: 174412429 - Color: {x: 1, y: 1, z: 1, w: 1} + Color: {x: 0, y: 0, z: 0, w: 1} Text Size: {x: 1, y: 1, z: 1} IsActive: true UI Component: @@ -858,7 +858,7 @@ Text Renderer Component: Text: Sensitivity Font: 174412429 - Color: {x: 1, y: 1, z: 1, w: 1} + Color: {x: 0, y: 0, z: 0, w: 1} Text Size: {x: 1, y: 1, z: 1} IsActive: true UI Component: @@ -958,7 +958,7 @@ Text Renderer Component: Text: 100 Font: 174412429 - Color: {x: 1, y: 1, z: 1, w: 1} + Color: {x: 0, y: 0, z: 0, w: 1} Text Size: {x: 1, y: 1, z: 1} IsActive: true UI Component: @@ -985,7 +985,7 @@ Text Renderer Component: Text: 100 Font: 174412429 - Color: {x: 1, y: 1, z: 1, w: 1} + Color: {x: 0, y: 0, z: 0, w: 1} Text Size: {x: 1, y: 1, z: 1} IsActive: true UI Component: @@ -1012,7 +1012,7 @@ Text Renderer Component: Text: 100 Font: 174412429 - Color: {x: 1, y: 1, z: 1, w: 1} + Color: {x: 0, y: 0, z: 0, w: 1} Text Size: {x: 1, y: 1, z: 1} IsActive: true UI Component: @@ -1055,7 +1055,7 @@ Text Renderer Component: Text: 100 Font: 174412429 - Color: {x: 1, y: 1, z: 1, w: 1} + Color: {x: 0, y: 0, z: 0, w: 1} Text Size: {x: 1, y: 1, z: 1} IsActive: true UI Component: @@ -1082,7 +1082,7 @@ Text Renderer Component: Text: 100 Font: 174412429 - Color: {x: 1, y: 1, z: 1, w: 1} + Color: {x: 0, y: 0, z: 0, w: 1} Text Size: {x: 1, y: 1, z: 1} IsActive: true UI Component: @@ -1099,7 +1099,7 @@ - EID: 46 Name: Credits Canvas IsActive: false - NumberOfChildren: 3 + NumberOfChildren: 4 Components: Canvas Component: Canvas Width: 1920 @@ -1108,12 +1108,12 @@ IsActive: false Scripts: ~ - EID: 47 - Name: BackGround + Name: Scrolling Credits IsActive: true NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 0, y: -3800, z: 0.100000001} + Translate: {x: 0, y: -3800, z: 1.5} Rotate: {x: 0, y: 0, z: 0} Scale: {x: 1920, y: 8026, z: 1} IsActive: true @@ -1159,6 +1159,14 @@ - Type: SHADE_Scripting.UI.ChangeCanvasButton Enabled: true canvasToActivate: 0 + - Type: SHADE_Scripting.UI.ButtonFX + Enabled: true + onHoverEnterSound: Empty + onHoverExitSound: Empty + onClickSound: event:/UI/mouse_down_element + onReleaseSound: Empty + hoverScale: 1.10000002 + clickScale: 0.899999976 - EID: 49 Name: Credits Title Text IsActive: false @@ -1172,7 +1180,7 @@ Text Renderer Component: Text: Credits Font: 174412429 - Color: {x: 1, y: 1, z: 1, w: 1} + Color: {x: 0, y: 0, z: 0, w: 1} Text Size: {x: 1, y: 1, z: 1} IsActive: false UI Component: @@ -1181,6 +1189,26 @@ Clicked: false IsActive: false Scripts: ~ +- EID: 55 + Name: BackGround + IsActive: false + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: 0, z: 1.5} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 1920, y: 1080, z: 1} + IsActive: false + Renderable Component: + Mesh: 141771688 + Material: 121834459 + IsActive: false + UI Component: + Canvas ID: 46 + Hovered: false + Clicked: false + IsActive: false + Scripts: ~ - EID: 50 Name: Level Select Canvas IsActive: false @@ -1194,23 +1222,23 @@ Scripts: ~ - EID: 51 Name: BackGround - IsActive: false + IsActive: true NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 0, y: 0, z: 1} + Translate: {x: 0, y: 0, z: 1.5} Rotate: {x: 0, y: 0, z: 0} Scale: {x: 1920, y: 1080, z: 1} - IsActive: false + IsActive: true Renderable Component: Mesh: 141771688 Material: 121834459 - IsActive: false + IsActive: true UI Component: Canvas ID: 50 Hovered: false Clicked: false - IsActive: false + IsActive: true Scripts: ~ - EID: 52 Name: BackButton @@ -1240,6 +1268,14 @@ - Type: SHADE_Scripting.UI.ChangeCanvasButton Enabled: true canvasToActivate: 0 + - Type: SHADE_Scripting.UI.ButtonFX + Enabled: true + onHoverEnterSound: Empty + onHoverExitSound: Empty + onClickSound: event:/UI/mouse_down_element + onReleaseSound: Empty + hoverScale: 1.10000002 + clickScale: 0.899999976 - EID: 53 Name: Level Select Title Text IsActive: true @@ -1253,7 +1289,7 @@ Text Renderer Component: Text: Level Select Font: 174412429 - Color: {x: 1, y: 1, z: 1, w: 1} + Color: {x: 0, y: 0, z: 0, w: 1} Text Size: {x: 1, y: 1, z: 1} IsActive: true UI Component: diff --git a/Assets/Scenes/WinScene.shade b/Assets/Scenes/WinScene.shade index c6e676c3..8195f716 100644 --- a/Assets/Scenes/WinScene.shade +++ b/Assets/Scenes/WinScene.shade @@ -73,10 +73,10 @@ sceneID: 97158628 - Type: SHADE_Scripting.UI.ButtonFX Enabled: true - onHoverEnterSound: event:/Music/player_undetected - onHoverExitSound: event:/Music/player_undetected - onClickSound: event:/Music/player_undetected - onReleaseSound: event:/Music/player_undetected + onHoverEnterSound: Empty + onHoverExitSound: Empty + onClickSound: event:/UI/mouse_down_element + onReleaseSound: Empty hoverScale: 1.10000002 clickScale: 0.899999976 - EID: 6 @@ -108,10 +108,10 @@ Enabled: true - Type: SHADE_Scripting.UI.ButtonFX Enabled: true - onHoverEnterSound: event:/Music/player_undetected - onHoverExitSound: event:/Music/player_undetected - onClickSound: event:/Music/player_undetected - onReleaseSound: event:/Music/player_undetected + onHoverEnterSound: Empty + onHoverExitSound: Empty + onClickSound: event:/UI/mouse_down_element + onReleaseSound: Empty hoverScale: 1.10000002 clickScale: 0.899999976 - EID: 3 @@ -153,4 +153,40 @@ Components: ~ Scripts: - Type: SHADE_Scripting.UI.TweenManager - Enabled: true \ No newline at end of file + Enabled: true +- EID: 450 + Name: TransitionCanvas + IsActive: true + NumberOfChildren: 1 + Components: + Canvas Component: + Canvas Width: 1920 + Canvas Height: 1080 + Scale by canvas width: false + IsActive: true + Scripts: ~ +- EID: 65982 + Name: Transition + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: 0, z: 0.100000001} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 2500, y: 1080, z: 1} + IsActive: true + Renderable Component: + Mesh: 141771688 + Material: 120016136 + IsActive: true + UI Component: + Canvas ID: 450 + Hovered: false + Clicked: false + IsActive: true + Scripts: + - Type: SHADE_Scripting.UI.SceneFadeInOut + Enabled: true + alphaValue: 1 + fadeInTime: 0.5 + fadeOutTime: 0.5 \ No newline at end of file diff --git a/Assets/Scripts/UI/SC_ButtonFX.cs b/Assets/Scripts/UI/SC_ButtonFX.cs index 52240b28..cf218fbe 100644 --- a/Assets/Scripts/UI/SC_ButtonFX.cs +++ b/Assets/Scripts/UI/SC_ButtonFX.cs @@ -1,4 +1,4 @@ -using SHADE; +using SHADE; using System; using System.Collections.Generic; using System.Linq; @@ -9,10 +9,10 @@ namespace SHADE_Scripting.UI { public class ButtonFX:Script { - public string onHoverEnterSound = "event:/Music/player_undetected"; - public string onHoverExitSound = "event:/Music/player_undetected"; - public string onClickSound = "event:/Music/player_undetected"; - public string onReleaseSound = "event:/Music/player_undetected"; + public string onHoverEnterSound = "Empty"; + public string onHoverExitSound = "Empty"; + public string onClickSound = "event:/UI/mouse_down_element"; + public string onReleaseSound = "Empty"; [NonSerialized] private AudioClipHandler onHoverEnterACHandler; @@ -40,10 +40,16 @@ namespace SHADE_Scripting.UI protected override void awake() { - onHoverEnterACHandler = SHADE.Audio.CreateAudioClip(onHoverEnterSound); - onHoverExitACHandler = SHADE.Audio.CreateAudioClip(onHoverExitSound); - onClickACHandler = SHADE.Audio.CreateAudioClip(onClickSound); - onReleaseACHandler = SHADE.Audio.CreateAudioClip(onReleaseSound); + if(onHoverEnterSound != "Empty") + onHoverEnterACHandler = SHADE.Audio.CreateAudioClip(onHoverEnterSound); + + if(onHoverExitSound != "Empty") + onHoverExitACHandler = SHADE.Audio.CreateAudioClip(onHoverExitSound); + + if (onClickSound != "Empty") + onClickACHandler = SHADE.Audio.CreateAudioClip(onClickSound); + if (onReleaseSound != "Empty") + onReleaseACHandler = SHADE.Audio.CreateAudioClip(onReleaseSound); } protected override void start() @@ -64,7 +70,7 @@ namespace SHADE_Scripting.UI ui.OnClick.RegisterAction(() => { - if (onClickSound != "") + if (onClickSound != "Empty") onClickACHandler.Play(); tweening = true; if(thread != null) @@ -73,8 +79,10 @@ namespace SHADE_Scripting.UI ui.OnRelease.RegisterAction(() => { - if (onReleaseSound != "") + if (onReleaseSound != "Empty") onReleaseACHandler.Play(); + + tweening = true; if (thread != null) thread.Reset(currentScale, 1.0f); @@ -82,8 +90,12 @@ namespace SHADE_Scripting.UI ui.OnHoverEnter.RegisterAction(() => { - if (onHoverEnterSound != "") + if (onHoverEnterSound!="Empty") + { + onHoverEnterACHandler.Play(); + } + tweening = true; if (thread != null) thread.Reset(currentScale, hoverScale); @@ -91,7 +103,7 @@ namespace SHADE_Scripting.UI ui.OnHoverExit.RegisterAction(() => { - if (onHoverExitSound != "") + if (onHoverExitSound != "Empty") onHoverExitACHandler.Play(); tweening = true; if (thread != null) diff --git a/Assets/Texture/UI/MainMenuBG.dds b/Assets/Texture/UI/MainMenuBG.dds new file mode 100644 index 00000000..fa40488f Binary files /dev/null and b/Assets/Texture/UI/MainMenuBG.dds differ diff --git a/Assets/Texture/UI/MainMenuBG.shtex b/Assets/Texture/UI/MainMenuBG.shtex new file mode 100644 index 00000000..f0fc221e Binary files /dev/null and b/Assets/Texture/UI/MainMenuBG.shtex differ diff --git a/Assets/Texture/UI/MainMenuBG.shtex.shmeta b/Assets/Texture/UI/MainMenuBG.shtex.shmeta new file mode 100644 index 00000000..d3a8fa9c --- /dev/null +++ b/Assets/Texture/UI/MainMenuBG.shtex.shmeta @@ -0,0 +1,3 @@ +Name: MainMenuBG +ID: 58181851 +Type: 3 diff --git a/SHADE_Engine/src/Camera/SHCameraSystem.cpp b/SHADE_Engine/src/Camera/SHCameraSystem.cpp index 85f3b1b1..20d44201 100644 --- a/SHADE_Engine/src/Camera/SHCameraSystem.cpp +++ b/SHADE_Engine/src/Camera/SHCameraSystem.cpp @@ -272,6 +272,13 @@ namespace SHADE if (arm->isActive == true) { camera.offset = arm->GetOffset(); + + SHVec3 tOffset = arm->GetTargetOffset(); + + + tOffset = SHVec3::RotateY(tOffset, SHMath::DegreesToRadians(arm->GetYaw())); + + if (arm->lookAtCameraOrigin) CameraLookAt(camera, camera.position + arm->GetTargetOffset()); diff --git a/SHADE_Engine/src/Editor/SHEditorUI.cpp b/SHADE_Engine/src/Editor/SHEditorUI.cpp index b9783020..45cf0f6c 100644 --- a/SHADE_Engine/src/Editor/SHEditorUI.cpp +++ b/SHADE_Engine/src/Editor/SHEditorUI.cpp @@ -308,7 +308,7 @@ namespace SHADE const bool CHANGED = ImGui::InputText("##", &buffer[0], TEXT_FIELD_MAX_LENGTH); if (CHANGED) { - value = std::string(buffer.data(), buffer.data() + TEXT_FIELD_MAX_LENGTH); + value = std::string(buffer.data(), buffer.data() + std::strlen(buffer.data())); } return CHANGED; } diff --git a/SHADE_Managed/src/Utility/Convert.cxx b/SHADE_Managed/src/Utility/Convert.cxx index 590a3cf0..4ff5dd43 100644 --- a/SHADE_Managed/src/Utility/Convert.cxx +++ b/SHADE_Managed/src/Utility/Convert.cxx @@ -91,12 +91,17 @@ namespace SHADE { if (str == nullptr) return ""; - return msclr::interop::marshal_as(str); + std::string s = msclr::interop::marshal_as(str); + s.substr(0, str->Length); + return s; } System::String^ Convert::ToCLI(const std::string& str) { - return msclr::interop::marshal_as(str); + if (str.empty()) + return ""; + + return msclr::interop::marshal_as(str)->Substring(0, str.length()); } /*---------------------------------------------------------------------------------*/