Skip to content

Commit 5a4b02f

Browse files
committed
Version 1.2.6
Fixed panel registration/unregistration issues by making UI panel active/deactive a child object. You must let all panels be active all the time.
0 parents  commit 5a4b02f

32 files changed

+735
-0
lines changed

.icon.png

6.3 KB
Loading

GameWorkstore.ProtocolUI.asmdef

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "GameWorkstore.ProtocolUI",
3+
"references": [
4+
"GUID:c32d36751e998d74999be5c29b033d6e"
5+
],
6+
"includePlatforms": [],
7+
"excludePlatforms": [],
8+
"allowUnsafeCode": false,
9+
"overrideReferences": false,
10+
"precompiledReferences": [],
11+
"autoReferenced": true,
12+
"defineConstraints": [],
13+
"versionDefines": [],
14+
"noEngineReferences": false
15+
}

GameWorkstore.ProtocolUI.asmdef.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSE.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
MIT License
2+
3+
Copyright (c) 2015, Unity Technologies
4+
5+
Copyright (c) 2020 Game Workstore
6+
7+
Permission is hereby granted, free of charge, to any person obtaining a copy
8+
of this software and associated documentation files (the "Software"), to deal
9+
in the Software without restriction, including without limitation the rights
10+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
copies of the Software, and to permit persons to whom the Software is
12+
furnished to do so, subject to the following conditions:
13+
14+
The above copyright notice and this permission notice shall be included in all
15+
copies or substantial portions of the Software.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
SOFTWARE.

LICENSE.md.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Game Workstore Protocol UI
2+
3+
Protocol UI is a small framework to work with multiple screens on a easy and organized way and manage layered panels on Unity.
4+
Use it your own risk!
5+
6+
# How to install
7+
8+
At package.json, add these lines of code:
9+
```json
10+
"com.gameworkstore.protocolui": "https://github.com/GameWorkstore/protocolui.git#1.2.4"
11+
"com.gameworkstore.patterns": "https://github.com/GameWorkstore/patterns.git#1.3.2"
12+
```
13+
14+
And wait for unity to download and compile the package.
15+
16+
you can upgrade your version by including the release version at end of the link:
17+
```json
18+
"com.gameworkstore.protocolui": "https://github.com/GameWorkstore/protocolui.git#1.2.4"
19+
```
20+
21+
# Contributions
22+
23+
If you are using this library and want to submit a change, go ahead! Overall, this project accepts contributions if:
24+
- Is a bug fix;
25+
- Or, is a generalization of a well-known issue;
26+
- Or is performance improvement;
27+
- Or is an improvement to already supported feature.
28+
29+
Also, you can donate to allow us to drink coffee while we improve it for you!

README.md.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Runtime.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Runtime/AspectRatio.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
using System;
2+
using UnityEngine;
3+
4+
namespace GameWorkstore.ProtocolUI
5+
{
6+
public enum AspectRatioTarget
7+
{
8+
A4X3,
9+
A16X9
10+
}
11+
12+
[Serializable]
13+
public struct AspectRatioGroup
14+
{
15+
public AspectRatioTarget Target;
16+
public float Min;
17+
public float Max;
18+
19+
public bool IsInRange(float value) => value >= Min && value < Max;
20+
}
21+
22+
[CreateAssetMenu(fileName=nameof(AspectRatioConfig),menuName="ProtocolUI/"+nameof(AspectRatioConfig))]
23+
public class AspectRatioConfig : ScriptableObject
24+
{
25+
public AspectRatioGroup[] AspectRatioGroup = new AspectRatioGroup[]
26+
{
27+
new AspectRatioGroup()
28+
{
29+
Min = 1,
30+
Max = 1.45f,
31+
Target = AspectRatioTarget.A4X3
32+
},
33+
new AspectRatioGroup()
34+
{
35+
Min = 1.45f,
36+
Max = 100000,
37+
Target = AspectRatioTarget.A16X9
38+
}
39+
};
40+
public AspectRatioTarget Default = AspectRatioTarget.A16X9;
41+
}
42+
}

0 commit comments

Comments
 (0)