Skip to content

Commit 0af103a

Browse files
committed
skillwindow using slotmanagers
1 parent f3409b6 commit 0af103a

File tree

15 files changed

+361
-251
lines changed

15 files changed

+361
-251
lines changed

l2-unity/Assets/Resources/Data/UI/_Elements/Components/L2Slot/ActionSlot.uxml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<Style src="project://database/Assets/Resources/Data/UI/_Elements/L2StyleSheet.uss?fileID=7433441132597879392&amp;guid=72e99cc94b130bf4ba100dceaa830b13&amp;type=3#L2StyleSheet" />
33
<Style src="project://database/Assets/Resources/Data/UI/_Elements/Components/L2Slot/L2Slot.uss?fileID=7433441132597879392&amp;guid=5cebba6f4b1058048870da7302ad5971&amp;type=3#L2Slot" />
44
<ui:Button name="slot" class="l2-slot action-slot empty">
5-
<ui:VisualElement name="BgContainer" picking-mode="Ignore" class="slot-bg-container" style="-unity-background-image-tint-color: rgb(255, 255, 255);">
6-
<ui:VisualElement name="SlotBg" picking-mode="Ignore" class="slot-bg" style="background-color: rgba(0, 0, 0, 0.05); border-left-color: rgba(0, 0, 0, 0.65); border-right-color: rgba(0, 0, 0, 0.65); border-top-color: rgba(0, 0, 0, 0.65); border-bottom-color: rgba(0, 0, 0, 0.65);" />
5+
<ui:VisualElement name="BgContainer" picking-mode="Ignore" class="slot-bg-container">
6+
<ui:VisualElement name="SlotBg" picking-mode="Ignore" class="slot-bg" />
77
</ui:VisualElement>
88
</ui:Button>
99
</ui:UXML>

l2-unity/Assets/Resources/Data/UI/_Elements/Components/L2Slot/L2Slot.uss

Lines changed: 59 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,6 @@
8383
border-color: rgba(0, 0, 0, 0);
8484
}
8585

86-
.skillbar-slot .slot-bg-container {
87-
border-width: 0;
88-
padding: 1px;
89-
}
90-
9186
.l2-slot.disabled .slot-bg {
9287
border-width: 0;
9388
background-image: resource('Data/UI/Assets/Inventory/ItemWindow_DF_SlotBox_Disable');
@@ -105,24 +100,45 @@
105100
display: flex;
106101
}
107102

108-
.action-slot .slot-bg-container {
109-
border-width: 0;
110-
padding: 1px;
103+
.toggle-effect {
104+
position: absolute;
105+
width: 32px;
106+
height: 32px;
111107
}
112108

113-
.skillbar-slot .slot-bg {
114-
border-width: 1px;
115-
border-color: rgba(0, 0, 0, 0);
109+
.shortcut-key {
110+
flex-grow: 1;
111+
position: absolute;
112+
height: 16px;
113+
width: 32px;
114+
top: 2px;
115+
left: 2px;
116+
flex-direction: row;
117+
-unity-background-scale-mode: scale-to-fit;
116118
}
117119

118-
.skillbar-slot.empty .slot-bg-container {
120+
.skill-slot.empty .slot-bg-container {
119121
border-width: 0;
120122
padding: 0;
121123
background-image: none;
122124
}
123125

124-
.skillbar-slot.empty .shortcut-key {
125-
display: none;
126+
.skill-slot .slot-bg-container {
127+
border-width: 0;
128+
padding: 1px;
129+
background-image: resource('Data/UI/Assets/Inventory/ItemWindow_DF_Frame');
130+
}
131+
132+
.skill-slot .slot-bg {
133+
border-width: 1px;
134+
border-left-color: rgba(0, 0, 0, 0.65);
135+
border-right-color: rgba(0, 0, 0, 0.65);
136+
border-top-color: rgba(0, 0, 0, 0.65);
137+
border-bottom-color: rgba(0, 0, 0, 0.65);
138+
}
139+
140+
.skill-slot.active .slot-bg-container {
141+
background-image: resource('Data/UI/Assets/Inventory/ItemWindow_DF_Frame_Down');
126142
}
127143

128144
.action-slot.empty .slot-bg-container {
@@ -135,8 +151,10 @@
135151
background-image: none;
136152
}
137153

138-
.skillbar-slot.empty.active .slot-bg-container {
139-
background-image: none;
154+
.action-slot .slot-bg-container {
155+
-unity-background-image-tint-color: rgb(255, 255, 255);
156+
border-width: 0;
157+
padding: 1px;
140158
}
141159

142160
.action-slot .slot-bg-container {
@@ -147,51 +165,43 @@
147165
background-image: resource('Data/UI/Assets/Inventory/ItemWindow_DF_Frame_Down');
148166
}
149167

150-
.skillbar-slot .slot-bg-container {
151-
background-image: resource('Data/UI/Assets/Inventory/ItemWindow_DF_Frame');
152-
}
153-
154-
.skillbar-slot.active .slot-bg-container {
155-
background-image: resource('Data/UI/Assets/Inventory/ItemWindow_DF_Frame_Down');
156-
}
157-
158-
.toggle-effect {
159-
position: absolute;
160-
width: 34px;
161-
height: 34px;
162-
}
163-
164-
.shortcut-key {
165-
flex-grow: 1;
166-
position: absolute;
167-
height: 16px;
168-
width: 32px;
169-
top: 2px;
170-
left: 2px;
171-
flex-direction: row;
172-
-unity-background-scale-mode: scale-to-fit;
168+
.action-slot .slot-bg {
169+
background-color: rgba(0, 0, 0, 0.05);
170+
border-left-color: rgba(0, 0, 0, 0.65);
171+
border-right-color: rgba(0, 0, 0, 0.65);
172+
border-top-color: rgba(0, 0, 0, 0.65);
173+
border-bottom-color: rgba(0, 0, 0, 0.65);
173174
}
174175

175-
.skill-slot.empty .slot-bg-container {
176+
.skillbar-slot.empty .slot-bg-container {
176177
border-width: 0;
177178
padding: 0;
178179
background-image: none;
179180
}
180181

181-
.skill-slot .slot-bg-container {
182-
border-width: 0;
183-
padding: 1px;
182+
.skillbar-slot.empty .shortcut-key {
183+
display: none;
184184
}
185185

186-
.skill-slot .slot-bg {
187-
border-width: 1px;
188-
border-color: rgba(0, 0, 0, 0);
186+
.skillbar-slot .slot-bg-container {
187+
border-width: 0;
188+
padding: 1px;
189+
background-image: resource('Data/UI/Assets/Inventory/ItemWindow_DF_Frame');
189190
}
190191

191-
.skill-slot .slot-bg-container {
192-
background-image: resource('Data/UI/Assets/Inventory/ItemWindow_DF_Frame');
192+
.skillbar-slot.empty.active .slot-bg-container {
193+
background-image: none;
193194
}
194195

195-
.skill-slot.active .slot-bg-container {
196+
.skillbar-slot.active .slot-bg-container {
196197
background-image: resource('Data/UI/Assets/Inventory/ItemWindow_DF_Frame_Down');
197198
}
199+
200+
.skillbar-slot .slot-bg {
201+
border-width: 1px;
202+
background-color: rgba(0, 0, 0, 0.05);
203+
border-left-color: rgba(0, 0, 0, 0.65);
204+
border-right-color: rgba(0, 0, 0, 0.65);
205+
border-top-color: rgba(0, 0, 0, 0.65);
206+
border-bottom-color: rgba(0, 0, 0, 0.65);
207+
}

l2-unity/Assets/Resources/Data/UI/_Elements/Components/L2Slot/SkillSlot.uxml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<Style src="project://database/Assets/Resources/Data/UI/_Elements/Components/L2Slot/L2Slot.uss?fileID=7433441132597879392&amp;guid=5cebba6f4b1058048870da7302ad5971&amp;type=3#L2Slot" />
44
<ui:Button name="slot" class="l2-slot empty skill-slot">
55
<ui:VisualElement name="BgContainer" picking-mode="Ignore" class="slot-bg-container">
6-
<ui:VisualElement name="SlotBg" picking-mode="Ignore" class="slot-bg" style="background-color: rgba(0, 0, 0, 0.05); border-left-color: rgba(0, 0, 0, 0.65); border-right-color: rgba(0, 0, 0, 0.65); border-top-color: rgba(0, 0, 0, 0.65); border-bottom-color: rgba(0, 0, 0, 0.65);" />
7-
<ui:VisualElement name="Effect" picking-mode="Ignore" class="toggle-effect" style="width: 32px; height: 32px;" />
6+
<ui:VisualElement name="SlotBg" picking-mode="Ignore" class="slot-bg" />
7+
<ui:VisualElement name="Effect" picking-mode="Ignore" class="toggle-effect" />
88
</ui:VisualElement>
99
</ui:Button>
1010
</ui:UXML>

l2-unity/Assets/Resources/Data/UI/_Elements/Components/L2Slot/SkillbarSlot.uxml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<Style src="project://database/Assets/Resources/Data/UI/_Elements/Components/L2Slot/L2Slot.uss?fileID=7433441132597879392&amp;guid=5cebba6f4b1058048870da7302ad5971&amp;type=3#L2Slot" />
44
<ui:Button name="slot" class="l2-slot skillbar-slot empty">
55
<ui:VisualElement name="BgContainer" picking-mode="Ignore" class="slot-bg-container">
6-
<ui:VisualElement name="SlotBg" picking-mode="Ignore" class="slot-bg" style="background-color: rgba(0, 0, 0, 0.05); border-left-color: rgba(0, 0, 0, 0.65); border-right-color: rgba(0, 0, 0, 0.65); border-top-color: rgba(0, 0, 0, 0.65); border-bottom-color: rgba(0, 0, 0, 0.65);" />
7-
<ui:VisualElement name="Effect" picking-mode="Ignore" class="toggle-effect" style="width: 32px; height: 32px;" />
6+
<ui:VisualElement name="SlotBg" picking-mode="Ignore" class="slot-bg" />
7+
<ui:VisualElement name="Effect" picking-mode="Ignore" class="toggle-effect" />
88
<ui:VisualElement name="Key" picking-mode="Ignore" class="shortcut-key" />
99
</ui:VisualElement>
1010
</ui:Button>
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="False">
2+
<ui:Template name="L2SlotContainer" src="project://database/Assets/Resources/Data/UI/_Elements/Components/L2SlotContainer/L2SlotContainer.uxml?fileID=9197481963319205126&amp;guid=67f2ae460501d60439fd529481631728&amp;type=3#L2SlotContainer" />
23
<Style src="project://database/Assets/Resources/Data/UI/_Elements/L2StyleSheet.uss?fileID=7433441132597879392&amp;guid=72e99cc94b130bf4ba100dceaa830b13&amp;type=3#L2StyleSheet" />
34
<Style src="project://database/Assets/Resources/Data/UI/_Elements/Components/L2Button/L2Button.uss?fileID=7433441132597879392&amp;guid=b1d2114f9ed155f45a3eb16e5ef02441&amp;type=3#L2Button" />
45
<Style src="project://database/Assets/Resources/Data/UI/_Elements/Game/SkillWindow/SkillWindow.uss?fileID=7433441132597879392&amp;guid=3d1507b2b56445989f31adb160ec9b21&amp;type=3#SkillWindow" />
@@ -7,6 +8,10 @@
78
<ui:Button name="PlusMinusBtn" class="l2-plus-minus-button" style="margin: 0 4px 0 0; padding: 0;" />
89
<ui:Label name="SkillsSectionHeaderLabel" text="Physical Skills" class="l2-color-3" style="margin: 0; padding: 0;" />
910
</ui:VisualElement>
10-
<ui:VisualElement name="SkillsSectionBarContainer" class="skills-bar-container" style="margin-top: 4px;" />
11+
<ui:VisualElement name="SkillsSectionBarContainer" class="skills-bar-container" style="margin-top: 4px;">
12+
<ui:Instance template="L2SlotContainer" name="SkillSectionInner">
13+
<AttributeOverrides element-name="ScrollView" vertical-scroller-visibility="Hidden" />
14+
</ui:Instance>
15+
</ui:VisualElement>
1116
</ui:VisualElement>
1217
</ui:UXML>

l2-unity/Assets/Resources/Data/UI/_Elements/Game/SkillWindow/SkillWindow.uss

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,8 +420,7 @@
420420

421421
.skills-bar-container {
422422
height: auto;
423-
padding: 2px 0 0 2px;
424-
background-color: rgba(0, 0, 0, 0.28);
423+
padding-top: 2px;
425424
flex-grow: 1;
426425
flex-direction: row;
427426
display: flex;
@@ -445,3 +444,20 @@
445444
-unity-slice-top: 2;
446445
-unity-slice-scale: 0.1;
447446
}
447+
448+
.skills-section-container #SkillSectionInner {
449+
flex-grow: 1;
450+
}
451+
452+
.skills-section-container #SkillSectionInner #TabLabel {
453+
display: none;
454+
}
455+
456+
.skills-section-container #SkillSectionInner #ScrollView {
457+
background-color: transparent;
458+
border-width: 0;
459+
}
460+
461+
.skills-section-container #SkillSectionInner #unity-content-viewport {
462+
margin: 0;
463+
}

0 commit comments

Comments
 (0)