33namespace COM3D2 . DressCode ;
44
55internal class DressCodeControl : MonoBehaviour {
6- private ScopeSelectTabBar _scopeSelectTabBar ;
7- private MaidSelectPanel _maidSelectPanel ;
6+ private const int UiWidth = 1920 ;
7+
8+ private static readonly Vector3 PanelMargin = new ( 15 , 0 ) ;
9+ private static readonly Vector2 SceneListSize = new ( 184 , 925 ) ;
10+ private static readonly Vector2 ScopeListSize = new ( 144 , 925 ) ;
11+ private static readonly Vector2 MaidListSize = new ( 502 , 925 ) ;
12+
813 private SceneList _sceneList ;
14+ private ScopeList _scopeList ;
15+ private MaidSelectPanel _maidSelectPanel ;
916 private ProfilePanel _profilePanel ;
1017
1118 private DressCodeManager m_mgr ;
1219 private GameObject m_goPanel ;
1320
14- public ProfileScope SelectedScope {
15- get => _scopeSelectTabBar . SelectedScope ;
16- set => _scopeSelectTabBar . SelectScope ( value ) ;
17- }
1821
1922 public CostumeScene SelectedScene {
2023 get => _sceneList . SelectedValue ;
2124 set => _sceneList . SelectValue ( value ) ;
2225 }
2326
27+ public ProfileScope SelectedScope {
28+ get => _scopeList . SelectedValue ;
29+ set => _scopeList . SelectValue ( value ) ;
30+ }
31+
2432 public Maid SelectedMaid {
2533 get => _maidSelectPanel . SelectedMaid ;
2634 set => _maidSelectPanel . SelectMaid ( value ) ;
@@ -37,14 +45,22 @@ public void Init(DressCodeManager manager, CanvasComponent panel) {
3745 panel . AddComponent < uGUICanvas > ( ) ;
3846 panel . AddComponent < GraphicRaycaster > ( ) ;
3947
40- _scopeSelectTabBar = new ScopeSelectTabBar ( panel ) ;
41- _scopeSelectTabBar . ScopeSelected += ( o , e ) => UpdateScopeSelection ( ) ;
48+ _sceneList = new SceneList ( panel ) ;
49+ _sceneList . Position = new ( - ( UiWidth / 2 ) + SceneListSize . x / 2 + 41 , 0 ) ;
50+ _sceneList . Size = SceneListSize ;
51+ _sceneList . ValueSelected += ( o , e ) => UpdateProfileSelection ( ) ;
52+
53+ _scopeList = new ScopeList ( panel ) ;
54+ _scopeList . Position = _sceneList . Position + PanelMargin + new Vector3 ( SceneListSize . x / 2 + ScopeListSize . x / 2 , 0 ) ;
55+ _scopeList . Size = ScopeListSize ;
56+ _scopeList . ValueSelected += ( o , e ) => UpdateScopeSelection ( ) ;
4257
4358 _maidSelectPanel = new MaidSelectPanel ( panel ) ;
59+ _maidSelectPanel . Position = _scopeList . Position + PanelMargin + new Vector3 ( ScopeListSize . x / 2 + MaidListSize . x / 2 , 0 ) ;
60+ _maidSelectPanel . Size = MaidListSize ;
4461 _maidSelectPanel . MaidSelected += ( o , e ) => UpdateMaidSelection ( ) ;
4562
46- _sceneList = new SceneList ( panel ) ;
47- _sceneList . ValueSelected += ( o , e ) => UpdateProfileSelection ( ) ;
63+ _maidSelectPanel . ScrollChild . Position = new ( 0 , MaidListSize . y / 2 - 112.5f ) ;
4864
4965 _profilePanel = new ProfilePanel ( panel , this ) ;
5066 _profilePanel . ProfileSelected += OnProfileChanged ;
@@ -76,13 +92,11 @@ public void CreateSelector() {
7692
7793 private void SetSceneMode ( ) {
7894 _maidSelectPanel . SetActive ( false ) ;
79- _sceneList . Position = new ( - 832 , 0 ) ;
8095 _profilePanel . SetSceneMode ( ) ;
8196 }
8297
8398 private void SetMaidMode ( ) {
8499 _maidSelectPanel . SetActive ( true ) ;
85- _sceneList . Position = new ( - 337 , 0 ) ;
86100 _profilePanel . SetMaidMode ( ) ;
87101 }
88102
0 commit comments