Skip to content

Commit

Permalink
Merge pull request #1 from o-tr/master
Browse files Browse the repository at this point in the history
v0.2.0をリリース
  • Loading branch information
o-tr authored Sep 3, 2024
2 parents ffcd11d + 51936ba commit 6721234
Show file tree
Hide file tree
Showing 17 changed files with 556 additions and 308 deletions.
6 changes: 4 additions & 2 deletions Runtime/Editor/ImageTabEditor.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
#if UNITY_EDITOR
using System;
using jp.ootr.common;
using jp.ootr.ImageDeviceController.Editor;
using UnityEditor;
Expand Down Expand Up @@ -89,4 +90,5 @@ private void BuildBookmark(ImageTab script)
EditorGUILayout.EndHorizontal();
}
}
}
}
#endif
2 changes: 1 addition & 1 deletion Runtime/jp.ootr.ImageTab/Scripts/00_Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ public static ImageSlideSyncAction ToSyncAction(this URLType type)
}
}
}
}
}
6 changes: 4 additions & 2 deletions Runtime/jp.ootr.ImageTab/Scripts/11_AutoRotateDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public class AutoRotateDevice : CommonDevice
[Header("アニメーション用定数")] private readonly int _animatorDirection = Animator.StringToHash("Direction");

private readonly int _animatorLockRotation = Animator.StringToHash("LockRotation");

private readonly string[] _autoRotateDevicePrefix = { "AutoRotateDevice" };
[UdonSynced] private TabletDirection _arDirection = TabletDirection.Bottom;
private bool _arIsHolding;

Expand Down Expand Up @@ -74,7 +76,7 @@ protected virtual void UpdateTabletDirection()
protected virtual void ApplyDirectionToAnimator()
{
if (_arLocalDirection == _arDirection) return;
ConsoleDebug($"[ApplyDirectionToAnimator] current: {_arLocalDirection}, new: {_arDirection}");
ConsoleDebug($"direction changed: {_arLocalDirection} -> {_arDirection}", _autoRotateDevicePrefix);
_arLocalDirection = _arDirection;
animator.SetInteger(_animatorDirection, (int)_arDirection);
SendCustomEventDelayedSeconds(nameof(OnDirectionChanged), UIAnimationDuration, EventTiming.LateUpdate);
Expand Down Expand Up @@ -107,4 +109,4 @@ public virtual void OnDirectionChanged()
{
}
}
}
}
2 changes: 1 addition & 1 deletion Runtime/jp.ootr.ImageTab/Scripts/12_LogicDeviceList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ public virtual void UpdateDeviceList()
uIDeviceListContainer.ToListChildrenVertical(adjustHeight: true);
}
}
}
}
2 changes: 1 addition & 1 deletion Runtime/jp.ootr.ImageTab/Scripts/13_UIFooter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ private void UpdateFooterButton()
base.InitController();
}
}
}
}
2 changes: 1 addition & 1 deletion Runtime/jp.ootr.ImageTab/Scripts/14_UIDeviceName.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ public override void InitController()
uIDeviceNameInputField.text = deviceName;
}
}
}
}
8 changes: 6 additions & 2 deletions Runtime/jp.ootr.ImageTab/Scripts/21_UIBookmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ public class UIBookmark : UIDeviceName
[SerializeField] private GameObject uIOriginalBookmarkButton;

private readonly int _animatorHasBookmark = Animator.StringToHash("HasBookmark");

private readonly string[] _uiBookmarkPrefix = { "UIBookmark" };
private Toggle[] _uiBookmarkButtonToggles = new Toggle[0];

public override void InitController()
Expand All @@ -32,7 +34,9 @@ protected virtual void UpdateBookmark()
{
if (uIBookmarkUrls.Length != uIBookmarkNames.Length)
{
ConsoleError("[UpdateBookmark] Bookmark URLとBookmark Nameの数が一致しません");
ConsoleError(
$"bookmark urls and names length mismatch: {uIBookmarkUrls.Length} != {uIBookmarkNames.Length}",
_uiBookmarkPrefix);
return;
}

Expand Down Expand Up @@ -66,4 +70,4 @@ public void OnBookmarkListClicked()
LoadImage(urlStr, urlStr, true);
}
}
}
}
7 changes: 5 additions & 2 deletions Runtime/jp.ootr.ImageTab/Scripts/23_UIHistory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ namespace jp.ootr.ImageTab
public class UIHistory : UIBookmark
{
[SerializeField] private GameObject uIOriginalHistoryButton;

private readonly string[] _uiHistoryPrefix = { "UIHistory" };
private InputField[] _uiHistoryButtonInputFields = new InputField[0];
private GameObject[] _uiHistoryButtons = new GameObject[0];
private Toggle[] _uiHistoryButtonToggles = new Toggle[0];
Expand All @@ -16,7 +18,8 @@ public virtual void UpdateHistoryUI(string[] urls, string[] filenames)
{
if (urls.Length != filenames.Length)
{
ConsoleError("[UpdateHistoryUI] History URLとHistory Nameの数が一致しません");
ConsoleError($"history urls and filenames length mismatch: {urls.Length} != {filenames.Length}",
_uiHistoryPrefix);
return;
}

Expand Down Expand Up @@ -76,4 +79,4 @@ protected virtual string[] GetHistoryByIndex(int index)
return new string[0];
}
}
}
}
2 changes: 1 addition & 1 deletion Runtime/jp.ootr.ImageTab/Scripts/24_UIDeviceList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ public virtual void ShowScreenNameOnScreen()
}
}
}
}
}
2 changes: 1 addition & 1 deletion Runtime/jp.ootr.ImageTab/Scripts/25_LogicHistory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ protected override string[] GetHistoryByIndex(int index)
};
}
}
}
}
2 changes: 1 addition & 1 deletion Runtime/jp.ootr.ImageTab/Scripts/26_UIAnimatorHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ public virtual void OpenErrorModal()
animator.SetInteger(_animatorErrorModalState, 1);
}
}
}
}
2 changes: 1 addition & 1 deletion Runtime/jp.ootr.ImageTab/Scripts/27_UIError.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ public override void OnFilesLoadFailed(LoadError error)
OpenErrorModal();
}
}
}
}
4 changes: 2 additions & 2 deletions Runtime/jp.ootr.ImageTab/Scripts/ImageTab.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public override void _OnDeserialization()

SetLoading(true);
controller.CcReleaseTexture(_localSource, _localFileName);
controller.UnloadFilesFromUrl((IControlledDevice)this, _localSource);
controller.UnloadFilesFromUrl(this, _localSource);
_localSource = _syncSource;
_localFileName = _syncFileName;
LLIFetchImage(_localSource, _syncSource == _syncFileName ? URLType.Image : URLType.TextZip);
Expand Down Expand Up @@ -126,4 +126,4 @@ public override bool IsCastableDevice()
return true;
}
}
}
}
Loading

0 comments on commit 6721234

Please sign in to comment.