Skip to content

Commit

Permalink
Merge pull request #61 from kirurobo/dev_mac
Browse files Browse the repository at this point in the history
v0.9.2
  • Loading branch information
kirurobo authored Sep 18, 2023
2 parents 6ce6dd9 + 029cd62 commit cda28fc
Show file tree
Hide file tree
Showing 13 changed files with 790 additions and 226 deletions.
5 changes: 3 additions & 2 deletions README-ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ B. UnityPackage を利用する手順
## Unity プロジェクトでの利用
1. Runtime/Prefabs にある `UniWindowController` プレハブをシーンに追加
2. そこで配置された `UniWindowController` をインスペクターで確認
- Player Settings を適切に直す(緑のボタンでまとめて設定が変更されます)
- `IsTransparent` 等、設定をお好みに合わせる
- Player Settings を適切に直す(緑のボタンでまとめて設定が変更されます)
- `IsTransparent` 等、設定をお好みに合わせる
3. 左ドラッグでウィンドウ自体を動かしたい場合、 Runtime/Prefabs の `DragMoveCanvas` プレハブも追加
- 動作には EventSystem が必要です。もしシーンに無ければ UI → Event System を追加してください。
4. PC / Mac スタンドアローンでビルドする
5. ビルドしたものを起動

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ B. Using an UnityPackage
- Fix the Player Settings appropriately (the green button will change all settings at once)
- Adjust the settings such as `IsTransparent` to your liking
3. Add `DragMoveCanvas` prefab in the Runtime/Prefabs if you want to move the window by mouse dragging.
- An EventSystem is required for this to work. If it is not present in your scene, add UI → Event System.
4. Build for PC / Mac standalone
5. Launch the build

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>22E261</string>
<string>22G91</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
Expand All @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>0.9.1</string>
<string>0.9.2</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
Expand All @@ -37,9 +37,9 @@
<key>DTSDKName</key>
<string>macosx13.3</string>
<key>DTXcode</key>
<string>1430</string>
<string>1431</string>
<key>DTXcodeBuild</key>
<string>14E222b</string>
<string>14E300c</string>
<key>LSMinimumSystemVersion</key>
<string>10.14.6</string>
<key>NSHumanReadableCopyright</key>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace Kirurobo
{
public class UniWindowMoveHandle : MonoBehaviour, IDragHandler, IBeginDragHandler, IEndDragHandler
public class UniWindowMoveHandle : MonoBehaviour, IDragHandler, IBeginDragHandler, IEndDragHandler, IPointerUpHandler
{
private UniWindowController _uniwinc;

Expand Down Expand Up @@ -69,11 +69,6 @@ void Start()
//Input.simulateMouseWithTouches = false;
}

// Update is called once per frame
void Update()
{
}

/// <summary>
/// ドラッグ開始時の処理
/// </summary>
Expand Down Expand Up @@ -113,6 +108,18 @@ public void OnEndDrag(PointerEventData eventData)
EndDragging();
}

/// <summary>
/// マウスが上がった際もドラッグ終了とみなす
/// </summary>
/// <param name="eventData"></param>
public void OnPointerUp(PointerEventData eventData)
{
EndDragging();
}

/// <summary>
/// ドラッグ終了とする
/// </summary>
private void EndDragging()
{
if (_isDragging)
Expand Down
Loading

0 comments on commit cda28fc

Please sign in to comment.