Skip to content

Commit

Permalink
kurone-kito/add-new-partsからプルリクエスト#9をマージする
Browse files Browse the repository at this point in the history
v0.5.0: Added some UI prefabs and cumulative updates
  • Loading branch information
kurone-kito authored Jul 10, 2024
2 parents b475943 + e94a3b9 commit 5826712
Show file tree
Hide file tree
Showing 143 changed files with 81,482 additions and 4,873 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ jobs:
text: ${{ steps.version.outputs.value }}
- name: Configure the Environment Variables needed for releasing the Package
run: |
echo "stableVersion=${{ steps.stable-match.outputs.match }}" >> $GITHUB_ENV
echo "unityPackage=${{ vars.PACKAGE_NAME }}-${{ steps.version.outputs.value }}.unitypackage" >> $GITHUB_ENV
echo "version=${{ steps.version.outputs.value }}" >> $GITHUB_ENV
echo "zipFile=${{ vars.PACKAGE_NAME }}-${{ steps.version.outputs.value }}".zip >> $GITHUB_ENV
Expand Down
4 changes: 3 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"recommendations": [
"editorconfig.editorconfig",
"fernandoescolar.vscode-solution-explorer",
"redhat.vscode-yaml",
"streetsidesoftware.code-spell-checker",
"visualstudiotoolsforunity.vstuc"
"visualstudiotoolsforunity.vstuc",
"zbecknell.t4-support"
]
}
56 changes: 54 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,53 @@
{
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.expand": false,
"explorer.fileNesting.patterns": {
"*": "${capture}.meta, ${capture}.md5",
"*.dll": "${capture}.pdb",
"*.md": "${capture}.*.md",
".gitconfig": ".gitattributes, .gitignore",
".tool-versions": "global.json",
"*.sln": "*.csproj",
"LICENSE": "LICENSE.*.txt",
"LICENSE*": "LICENSE${capture}.meta",
"T.cs": "*.po"
},
"files.associations": {
"*.anim": "yaml",
"*.asmdef": "json",
"*.asmref": "json",
"*.asset": "yaml",
"*.buildreport": "yaml",
"*.config": "xml",
"*.controller": "yaml",
"*.dwlt": "yaml",
"*.info": "json",
"*.index": "json",
"*.inputactions": "json",
"*.lighting": "yaml",
"*.mat": "yaml",
"*.meta": "yaml",
"*.outputdata": "json",
"*.physicmaterial": "yaml",
"*.playable": "yaml",
"*.prefab": "yaml",
"*.renderTexture": "yaml",
"*.scenetemplate": "yaml",
"*.signal": "yaml",
"*.terrainlayer": "yaml",
"*.tlh": "c",
"*.traceevents": "jsonl",
"*.unity": "yaml",
"*.uss": "css",
".imgbotconfig": "json",
"LICENSE": "plaintext"
".settings": "plist",
".signature": "json",
"LastSceneManagerSetup.txt": "yaml",
"LibraryFormatVersion.txt": "yaml",
"LICENSE": "plaintext",
"ProjectVersion.txt": "yaml",
"XRPackageSettings.asset": "json",
"XRSettings.asset": "json"
},
"files.readonlyInclude": {
"Packages/com.*/**": true,
Expand Down Expand Up @@ -44,7 +82,9 @@
"tag:unity3d.com,2011:13 mapping",
"tag:unity3d.com,2011:19 mapping",
"tag:unity3d.com,2011:20 mapping",
"tag:unity3d.com,2011:21 mapping",
"tag:unity3d.com,2011:23 mapping",
"tag:unity3d.com,2011:28 mapping",
"tag:unity3d.com,2011:29 mapping",
"tag:unity3d.com,2011:30 mapping",
"tag:unity3d.com,2011:33 mapping",
Expand All @@ -54,31 +94,43 @@
"tag:unity3d.com,2011:74 mapping",
"tag:unity3d.com,2011:78 mapping",
"tag:unity3d.com,2011:81 mapping",
"tag:unity3d.com,2011:84 mapping",
"tag:unity3d.com,2011:91 mapping",
"tag:unity3d.com,2011:95 mapping",
"tag:unity3d.com,2011:104 mapping",
"tag:unity3d.com,2011:108 mapping",
"tag:unity3d.com,2011:114 mapping",
"tag:unity3d.com,2011:126 mapping",
"tag:unity3d.com,2011:129 mapping",
"tag:unity3d.com,2011:134 mapping",
"tag:unity3d.com,2011:157 mapping",
"tag:unity3d.com,2011:159 mapping",
"tag:unity3d.com,2011:162 mapping",
"tag:unity3d.com,2011:196 mapping",
"tag:unity3d.com,2011:222 mapping",
"tag:unity3d.com,2011:223 mapping",
"tag:unity3d.com,2011:224 mapping",
"tag:unity3d.com,2011:236 mapping",
"tag:unity3d.com,2011:310 mapping",
"tag:unity3d.com,2011:1001 mapping",
"tag:unity3d.com,2011:1002 mapping",
"tag:unity3d.com,2011:1045 mapping",
"tag:unity3d.com,2011:1101 mapping",
"tag:unity3d.com,2011:1102 mapping",
"tag:unity3d.com,2011:1107 mapping",
"tag:unity3d.com,2011:1125 mapping",
"tag:unity3d.com,2011:1126 mapping",
"tag:unity3d.com,2011:382020655 mapping",
"tag:unity3d.com,2011:387306366 mapping",
"tag:unity3d.com,2011:641289076 mapping",
"tag:unity3d.com,2011:668709126 mapping",
"tag:unity3d.com,2011:850595691 mapping",
"tag:unity3d.com,2011:890905787 mapping",
"tag:unity3d.com,2011:937362698 mapping",
"tag:unity3d.com,2011:1386491679 mapping",
"tag:unity3d.com,2011:1660057539 mapping"
"tag:unity3d.com,2011:1521398425 mapping",
"tag:unity3d.com,2011:1660057539 mapping",
"tag:unity3d.com,2011:1953259897 mapping"
],
"yaml.schemas": {
"https://coderabbit.ai/integrations/coderabbit-overrides.v2.json": [
Expand Down
62 changes: 62 additions & 0 deletions Packages/black.kit.vrcui/Editor/Concreted/HeroEditor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
using UnityEditor;
using UnityEngine;
using UnityEngine.UI;
using black.kit.toybox.Editor;

namespace black.kit.vrcui.Editor
{
/// <summary>The inspector of the <see cref="Hero"/>.</summary>
[CustomEditor(typeof(Hero))]
public sealed class HeroEditor : EditorBase<Hero>
{
/// <summary>The usage of the target.</summary>
private readonly string[] usage = new string[]
{
T.USAGE_REGIST_SPRITES,
T.USAGE_HERO_1,
};

/// <summary>Initialize the editor.</summary>
public HeroEditor() : base(L10n.Tr(T.DETAIL_HERO))
{
}

/// <summary>The callback to draw the inspector GUI.</summary>
public override void OnInspectorGUI()
{
DrawBanner();
DrawDetails();
EditorGUILayout.BeginVertical(GUI.skin.box);
var style = defaultStyle.Value;
EditorGUILayout.LabelField(L10n.Tr(T.USAGE_COMPONENT), style);
EditorGUILayout.Space();
DrawList(
usage,
new ListOptions(ordered: true, tr: (t) => L10n.Tr(t)));
EditorGUILayout.EndVertical();
base.OnInspectorGUI();

serializedObject.Update();
var image = AutoCompleteObject<Image>(Hero.NAME_IMAGE);
if (image)
{
image.sprite = GetSprite();
}
serializedObject.ApplyModifiedProperties();
}

/// <summary>Get the sprite of the icon.</summary>
/// <returns>The sprite of the icon.</returns>
private Sprite GetSprite()
{
var (sprites, index, _) = GetArrayProperty(
Hero.NAME_SPRITES, TypedTarget.Index);
if (index < 0)
{
return null; // 'sprites' is empty
}
var element = sprites.GetArrayElementAtIndex(index);
return element.objectReferenceValue as Sprite;
}
}
}
11 changes: 11 additions & 0 deletions Packages/black.kit.vrcui/Editor/Concreted/HeroEditor.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 43 additions & 0 deletions Packages/black.kit.vrcui/Editor/Concreted/SelectEditor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
using TMPro;
using UnityEditor;
using UnityEngine;

namespace black.kit.vrcui.Editor
{
/// <summary>The inspector of the <see cref="Select"/>.</summary>
[CustomEditor(typeof(Select))]
public sealed class SelectEditor : EditorBase<Select>
{
/// <summary>Initialize the editor.</summary>
public SelectEditor() : base(L10n.Tr(T.DETAIL_SELECT))
{
}

/// <summary>The callback to draw the inspector GUI.</summary>
public override void OnInspectorGUI()
{
DrawBanner();
DrawDetails();
EditorGUILayout.BeginVertical(GUI.skin.box);
var style = defaultStyle.Value;
EditorGUILayout.LabelField(L10n.Tr(T.USAGE_COMPONENT), style);
EditorGUILayout.Space();
EditorGUILayout.LabelField(L10n.Tr(T.USAGE_EVENT_BUTTON), style);
DrawUdonEvent(L10n.Tr(T.USAGE_DECREMENT));
DrawUdonEvent(L10n.Tr(T.USAGE_INCREMENT));
EditorGUILayout.EndVertical();
base.OnInspectorGUI();

serializedObject.Update();
var (values, index, size) =
GetArrayProperty(Select.NAME_VALUES, TypedTarget.Index);
var text = AutoCompleteObject<TextMeshProUGUI>(Select.NAME_TEXT);
if (text && size > 0)
{
text.text =
values.GetArrayElementAtIndex(index).stringValue;
}
serializedObject.ApplyModifiedProperties();
}
}
}
11 changes: 11 additions & 0 deletions Packages/black.kit.vrcui/Editor/Concreted/SelectEditor.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Packages/black.kit.vrcui/Editor/T.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,18 @@ namespace black.kit.vrcui.Editor
/// <summary>The uniques of the localization.</summary>
public static class T
{
public const string DETAIL_HERO = nameof(DETAIL_HERO);
public const string DETAIL_ICON_TOGGLE = nameof(DETAIL_ICON_TOGGLE);
public const string DETAIL_SELECT = nameof(DETAIL_SELECT);
public const string DETAIL_TOGGLE_WITH_ANIMATION =
nameof(DETAIL_TOGGLE_WITH_ANIMATION);
public const string USAGE_COMPONENT = nameof(USAGE_COMPONENT);
public const string USAGE_DECREMENT = nameof(USAGE_DECREMENT);
public const string USAGE_EVENT_BUTTON = nameof(USAGE_EVENT_BUTTON);
public const string USAGE_EVENT_TOGGLE = nameof(USAGE_EVENT_TOGGLE);
public const string USAGE_HERO_1 = nameof(USAGE_HERO_1);
public const string USAGE_ICON_TOGGLE_1 = nameof(USAGE_ICON_TOGGLE_1);
public const string USAGE_INCREMENT = nameof(USAGE_INCREMENT);
public const string USAGE_LINK_ANIMATOR = nameof(USAGE_LINK_ANIMATOR);
public const string USAGE_LINK_TOGGLE = nameof(USAGE_LINK_TOGGLE);
public const string USAGE_ON_VALUE_CHANGED =
Expand Down
2 changes: 2 additions & 0 deletions Packages/black.kit.vrcui/Editor/black.kit.vrcui.Editor.asmdef
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"name": "black.kit.vrcui.Editor",
"rootNamespace": "black.kit.vrcui.Editor",
"references": [
"Unity.TextMeshPro",
"Unity.TextMeshPro.Editor",
"VRC.SDK3",
"VRC.SDK3.Editor",
"VRC.SDKBase",
Expand Down
18 changes: 18 additions & 0 deletions Packages/black.kit.vrcui/Editor/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,39 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Language: en\n"

msgid "DETAIL_HERO"
msgstr "This component is the toggle switch helper for the hero section."

msgid "DETAIL_ICON_TOGGLE"
msgstr "This component switches the specified icon image in order each time the user presses it."

msgid "DETAIL_SELECT"
msgstr "This component switches the specified value in order each time the user presses it."

msgid "DETAIL_TOGGLE_WITH_ANIMATION"
msgstr "This component works with the Toggle component to perform animation when toggling on and off."

msgid "USAGE_COMPONENT"
msgstr "For this component to work correctly, please follow these steps:"

msgid "USAGE_DECREMENT"
msgstr "Argument: <b>Decrement</b>"

msgid "USAGE_EVENT_BUTTON"
msgstr "Set the following to <b>OnClick ()</b> of the Button component."

msgid "USAGE_EVENT_TOGGLE"
msgstr "Set the following to <b>OnValueChanged (Boolean)</b> of the Toggle component."

msgid "USAGE_HERO_1"
msgstr "DO NOT CHANGE the <b>image</b>"

msgid "USAGE_ICON_TOGGLE_1"
msgstr "DO NOT CHANGE the <b>images</b>"

msgid "USAGE_INCREMENT"
msgstr "Argument: <b>Increment</b>"

msgid "USAGE_LINK_ANIMATOR"
msgstr "Deploy this component on the same object as the Animator component or manually link it."

Expand Down
18 changes: 18 additions & 0 deletions Packages/black.kit.vrcui/Editor/ja.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,39 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Language: ja\n"

msgid "DETAIL_HERO"
msgstr "このコンポーネントは、ヒーローセクションのためにトグルスイッチを制御します。"

msgid "DETAIL_ICON_TOGGLE"
msgstr "このコンポーネントは、押下するたびに指定したアイコン画像を順番に切り替えます。"

msgid "DETAIL_SELECT"
msgstr "このコンポーネントは、押下するたびに値を順番に切り替えます。"

msgid "DETAIL_TOGGLE_WITH_ANIMATION"
msgstr "このコンポーネントは、Toggleコンポーネントと連携して、オン・オフの切り替え時にアニメーションを実行します。"

msgid "USAGE_COMPONENT"
msgstr "このコンポーネントを正しく動作するために、以下の手順を全て実行してください。"

msgid "USAGE_DECREMENT"
msgstr "引数: <b>Decrement</b>"

msgid "USAGE_EVENT_BUTTON"
msgstr "Buttonコンポーネントの<b>クリック時()</b>へ、以下を設定してください。"

msgid "USAGE_EVENT_TOGGLE"
msgstr "Toggleコンポーネントの<b>値の変更時(Boolean)</b>へ、以下を設定してください。"

msgid "USAGE_HERO_1"
msgstr "<b>image</b>は変更しないでください。"

msgid "USAGE_ICON_TOGGLE_1"
msgstr "<b>images</b>は変更しないでください。"

msgid "USAGE_INCREMENT"
msgstr "引数: <b>Increment</b>"

msgid "USAGE_LINK_ANIMATOR"
msgstr "Animatorコンポーネントと同一のオブジェクトに配置するか、手動でコンポーネントを紐づけてください。"

Expand Down
8 changes: 8 additions & 0 deletions Packages/black.kit.vrcui/Examples/Images.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 5826712

Please sign in to comment.