Added Sliders. Added Level Select, How To Play,. Credits Options Canvases layout for in main menu. Added Tweening Manager(Script) #369

Merged
maverickdgg merged 7 commits from SP3-20-UI-System into main 2023-02-27 12:00:24 +08:00
6 changed files with 16 additions and 8 deletions
Showing only changes of commit 984473bdab - Show all commits

View File

@ -21,8 +21,8 @@ namespace SHADE_Scripting.UI
TextRenderable text = GetComponent<TextRenderable>(); TextRenderable text = GetComponent<TextRenderable>();
if(slider != null && text != null) if(slider != null && text != null)
{ {
Debug.Log("SETTING TEXT");
text.Text = (slider.GetValue() * (maxValue - minValue) + minValue).ToString(); text.Text = ((int)(slider.GetValue() * (maxValue - minValue) + minValue)).ToString();
} }
} }

View File

@ -30,18 +30,24 @@ of DigiPen Institute of Technology is prohibited.
#include "Graphics\MiddleEnd\Interface\SHRenderable.h" #include "Graphics\MiddleEnd\Interface\SHRenderable.h"
#include "Graphics\MiddleEnd\TextRendering\SHTextRenderableComponent.h" #include "Graphics\MiddleEnd\TextRendering\SHTextRenderableComponent.h"
#include "UI\SHUIComponent.h" #include "UI\SHUIComponent.h"
#include "UI\SHSliderComponent.h"
#include "UI\SHCanvasComponent.h"
// Project Headers // Project Headers
#include "Utility/Convert.hxx" #include "Utility/Convert.hxx"
#include "Utility/Debug.hxx" #include "Utility/Debug.hxx"
#include "Components/Transform.hxx" #include "Components\Transform.hxx"
#include "Components/RigidBody.hxx" #include "Components\RigidBody.hxx"
#include "Components/Collider.hxx" #include "Components\Collider.hxx"
#include "Components/Camera.hxx" #include "Components\Camera.hxx"
#include "Components/CameraArm.hxx" #include "Components\CameraArm.hxx"
#include "Components/Light.hxx" #include "Components\Light.hxx"
#include "Components\Renderable.hxx" #include "Components\Renderable.hxx"
#include "Components\TextRenderable.hxx" #include "Components\TextRenderable.hxx"
#include "Components\UIElement.hxx" #include "Components\UIElement.hxx"
#include "Components\Canvas.hxx"
#include "Components\Slider.hxx"
namespace SHADE namespace SHADE
{ {
@ -327,6 +333,8 @@ namespace SHADE
componentMap.Add(createComponentSet<SHLightComponent, Light>()); componentMap.Add(createComponentSet<SHLightComponent, Light>());
componentMap.Add(createComponentSet<SHTextRenderableComponent, TextRenderable>()); componentMap.Add(createComponentSet<SHTextRenderableComponent, TextRenderable>());
componentMap.Add(createComponentSet<SHUIComponent, UIElement>()); componentMap.Add(createComponentSet<SHUIComponent, UIElement>());
componentMap.Add(createComponentSet<SHCanvasComponent, Canvas>());
componentMap.Add(createComponentSet<SHSliderComponent, Slider>());
} }
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/