DEG-86 [Feat] 팝업 및 설정 UI 화면 구성 구현

유니티상 UI화면 구성 완료
This commit is contained in:
Lim0_C 2025-04-29 09:56:02 +09:00
parent 2ebeccfa69
commit c436a73f5c
7 changed files with 239 additions and 52 deletions

File diff suppressed because one or more lines are too long

BIN
Assets/LYM/Scenes/MainUI.unity (Stored with Git LFS)

Binary file not shown.

View File

@ -15,7 +15,7 @@ public class PopupPanelController : PanelController
private OnContradictDelegate _onContradictDelegate;
private void Start()
{
Show(false, "", () => {});
Show(false, "수면에 들 시간입니다.", () => {});
}
public void Show(bool isNeed2Contradict, string message, OnConfirmDelegate onConfirm)

View File

@ -0,0 +1,18 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SettingsPanelController : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3b8049d4c0267dd4481865a0eb1d5c3e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,39 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using DG.Tweening;
public class SliderButton : MonoBehaviour
{
[SerializeField] private Image backgroundImage;
[SerializeField] private GameObject handle;
public bool IsActive { get; private set; }
private int _offXLocation = -15;
private int _onXLocation = 15;
private Color32 _offColor = new Color32(125, 125, 125, 255);
private Color32 _onColor = new Color32(70, 255, 90, 255);
public void Init(bool isActive)
{
IsActive = isActive;
var xLocation = IsActive ? _onXLocation : _offXLocation;
handle.transform.localPosition = new Vector3(xLocation, handle.transform.localPosition.y, 0);
}
public void OnClicked()
{
if (IsActive)
{
handle.transform.DOLocalMoveX(_offXLocation, 0.2f);
backgroundImage.DOColor()
}
else
{
handle.transform.DOLocalMoveX(_onXLocation, 0.2f);
}
IsActive = !IsActive;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0da16f0ed11a3b14b9cf497a46f7abba
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: