Skip to content

Commit

Permalink
Merge pull request #5 from kurone-kito/migrate-the-lo-dpi
Browse files Browse the repository at this point in the history
v0.3.0: Migration to scaling according to uGUI standard skin
  • Loading branch information
kurone-kito authored May 6, 2024
2 parents 2f22c48 + 3ff643b commit b4c6cc9
Show file tree
Hide file tree
Showing 140 changed files with 24,835 additions and 18,602 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ indent_size = 4
[*.{asset,md,meta,prefab,unity}]
trim_trailing_whitespace = false

[*.cs]
[Packages/black.kit.*/**/Runtime/**/*.cs]
dotnet_diagnostic.IDE0066.severity = none

[Assets/UdonSharp/**.txt]
Expand Down
4 changes: 4 additions & 0 deletions .imgbotconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"compressWiki": true,
"ignoredFiles": ["*.svg"]
}
2 changes: 1 addition & 1 deletion .tool-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dotnet 6.0.420
dotnet 6.0.421
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"*.prefab": "yaml",
"*.unity": "yaml",
"*.uss": "css",
".imgbotconfig": "json",
"LICENSE": "plaintext"
},
"files.readonlyInclude": {
Expand Down
Empty file removed Assets/.gitkeep
Empty file.
9 changes: 4 additions & 5 deletions Packages/black.kit.vrcui/Editor/Concreted/IconToggleEditor.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
using UnityEditor;
using UnityEngine;
using UnityEngine.UI;
using black.kit.toybox.Editor;

namespace black.kit.vrcui.Editor
{
/// <summary>
/// The inspector of the <see cref="IconToggleEditor"/>.
/// </summary>
/// <summary>The inspector of the <see cref="IconToggle"/>.</summary>
[CustomEditor(typeof(IconToggle))]
public sealed class IconToggleEditor : SelectEditorBase<IconToggle>
public sealed class IconToggleEditor : EditorBase<IconToggle>
{
/// <summary>The usage of the target.</summary>
private readonly string[] usage = new[]
Expand All @@ -31,7 +30,7 @@ public override void OnInspectorGUI()
var style = defaultStyle.Value;
EditorGUILayout.LabelField(L10n.Tr(T.USAGE_COMPONENT), style);
EditorGUILayout.Space();
DrawList(usage);
DrawList(usage, new ListOptions());
EditorGUILayout.EndVertical();
base.OnInspectorGUI();

Expand Down

This file was deleted.

This file was deleted.

27 changes: 15 additions & 12 deletions Packages/black.kit.vrcui/Editor/EditorBase.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using UdonSharp;
using UnityEditor;
using black.kit.toybox.Editor;

namespace black.kit.vrcui.Editor
Expand All @@ -21,17 +22,19 @@ public EditorBase(string details) : base(details, bannerInit)
{
}

/// <summary>
/// Draw the Udon event of the inspector.
/// </summary>
/// <param name="argument">The argument of the Udon event.</param>
protected void DrawUdonEvent(string argument) =>
EditorUtils.DrawUdonEvent(argument, style: defaultStyle.Value);

/// <summary>Draw the list of the inspector.</summary>
/// <param name="list">The list to draw.</param>
/// <param name="selectable">The list is selectable.</param>
protected void DrawList(string[] list, ListOptions options = new ()) =>
EditorUtils.DrawList(list, style: defaultStyle.Value, options);
/// <summary>Get the property of the array.</summary>
/// <param name="name">The name of the property.</param>
/// <param name="index">The index of the array.</param>
/// <returns>The property of the array.</returns>
protected (SerializedProperty, int, int) GetArrayProperty(
string name, int index)
{
var property = serializedObject.FindProperty(name);
var s = property.arraySize;
return (
property,
s == 0 ? -1 : ((index < 0 ? s + index % s : index) % s),
s);
}
}
}
30 changes: 0 additions & 30 deletions Packages/black.kit.vrcui/Editor/SelectEditorBase.cs

This file was deleted.

11 changes: 0 additions & 11 deletions Packages/black.kit.vrcui/Editor/SelectEditorBase.cs.meta

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,28 @@ AnimationClip:
m_Curve:
- serializedVersion: 3
time: 0
value: 0.19
inSlope: 0
outSlope: 0
tangentMode: 136
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_AnchorMax.x
path: CategoryButtonContainer/WidthContainer
classID: 224
script: {fileID: 0}
attribute: m_Interactable
path: Collapse
classID: 114
script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
flags: 0
- serializedVersion: 2
curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
value: 0.24
inSlope: 0
outSlope: 0
tangentMode: 136
Expand All @@ -54,8 +54,8 @@ AnimationClip:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_AnchorMax.y
path: CategoryButtonContainer/WidthContainer
attribute: m_AnchorMax.x
path: CategoryItemPane/WidthContainer
classID: 224
script: {fileID: 0}
flags: 0
Expand All @@ -65,20 +65,20 @@ AnimationClip:
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Interactable
path: Collapse
classID: 114
script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
attribute: m_AnchorMax.y
path: CategoryItemPane/WidthContainer
classID: 224
script: {fileID: 0}
flags: 0
m_PPtrCurves: []
m_SampleRate: 60
Expand All @@ -98,7 +98,7 @@ AnimationClip:
isIntCurve: 0
isSerializeReferenceCurve: 0
- serializedVersion: 2
path: 3671839271
path: 3400449812
attribute: 2711263438
script: {fileID: 0}
typeID: 224
Expand All @@ -107,7 +107,7 @@ AnimationClip:
isIntCurve: 0
isSerializeReferenceCurve: 0
- serializedVersion: 2
path: 3671839271
path: 3400449812
attribute: 3600656472
script: {fileID: 0}
typeID: 224
Expand Down Expand Up @@ -143,28 +143,28 @@ AnimationClip:
m_Curve:
- serializedVersion: 3
time: 0
value: 0.19
inSlope: 0
outSlope: 0
tangentMode: 136
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_AnchorMax.x
path: CategoryButtonContainer/WidthContainer
classID: 224
script: {fileID: 0}
attribute: m_Interactable
path: Collapse
classID: 114
script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
flags: 0
- serializedVersion: 2
curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
value: 0.24
inSlope: 0
outSlope: 0
tangentMode: 136
Expand All @@ -174,8 +174,8 @@ AnimationClip:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_AnchorMax.y
path: CategoryButtonContainer/WidthContainer
attribute: m_AnchorMax.x
path: CategoryItemPane/WidthContainer
classID: 224
script: {fileID: 0}
flags: 0
Expand All @@ -185,20 +185,20 @@ AnimationClip:
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Interactable
path: Collapse
classID: 114
script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
attribute: m_AnchorMax.y
path: CategoryItemPane/WidthContainer
classID: 224
script: {fileID: 0}
flags: 0
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
Expand Down
Loading

0 comments on commit b4c6cc9

Please sign in to comment.