feat: rounded corners for display
This commit is contained in:
parent
a47aee1561
commit
e4ad9cc2f1
23 changed files with 337 additions and 282 deletions
|
@ -600,15 +600,15 @@ MonoBehaviour:
|
||||||
HasValue: 0
|
HasValue: 0
|
||||||
displaySortOrder: 0
|
displaySortOrder: 0
|
||||||
childIdentifiers:
|
childIdentifiers:
|
||||||
- 52eb9df5db46521439908db3a29a1bbb
|
- e7a046c753c3c3d4aacc91f6597f310d
|
||||||
- b7716510a1f36934c87976f3a81dbf3d
|
|
||||||
- 0f8eb3f400726694eb47beb1a9f94ce8
|
|
||||||
- 2fea114e74ecf3c4f920e1d5cc1c4c40
|
|
||||||
- fd7c55dab0fce234b8c25f6ffca523c1
|
- fd7c55dab0fce234b8c25f6ffca523c1
|
||||||
- 2c5177b11d81d824dbb064f9ac8527da
|
- 2c5177b11d81d824dbb064f9ac8527da
|
||||||
- c88d16e5272a4e241b0ef0ac2e53b73d
|
- b7716510a1f36934c87976f3a81dbf3d
|
||||||
|
- 52eb9df5db46521439908db3a29a1bbb
|
||||||
- 46fbfdf3fc43db0458918377fd40293e
|
- 46fbfdf3fc43db0458918377fd40293e
|
||||||
- e7a046c753c3c3d4aacc91f6597f310d
|
- 2fea114e74ecf3c4f920e1d5cc1c4c40
|
||||||
|
- 0f8eb3f400726694eb47beb1a9f94ce8
|
||||||
|
- c88d16e5272a4e241b0ef0ac2e53b73d
|
||||||
codecChannels:
|
codecChannels:
|
||||||
Value: []
|
Value: []
|
||||||
HasValue: 0
|
HasValue: 0
|
||||||
|
|
|
@ -74,8 +74,8 @@ SpriteRenderer:
|
||||||
m_SortingLayerID: 0
|
m_SortingLayerID: 0
|
||||||
m_SortingLayer: 0
|
m_SortingLayer: 0
|
||||||
m_SortingOrder: 0
|
m_SortingOrder: 0
|
||||||
m_Sprite: {fileID: 21300000, guid: 7f14bf47782e5564ea486633b6b3f504, type: 3}
|
m_Sprite: {fileID: 21300000, guid: 623c2050f13889e4fa065a0f5ed3d46b, type: 3}
|
||||||
m_Color: {r: 1, g: 0.18510345, b: 0, a: 1}
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
m_FlipX: 0
|
m_FlipX: 0
|
||||||
m_FlipY: 0
|
m_FlipY: 0
|
||||||
m_DrawMode: 0
|
m_DrawMode: 0
|
||||||
|
|
|
@ -613,7 +613,6 @@ MonoBehaviour:
|
||||||
musicToggle: {fileID: 557112855}
|
musicToggle: {fileID: 557112855}
|
||||||
sfxToggle: {fileID: 1000034091}
|
sfxToggle: {fileID: 1000034091}
|
||||||
alwaysOnTopToggle: {fileID: 2076377159}
|
alwaysOnTopToggle: {fileID: 2076377159}
|
||||||
mainMixer: {fileID: 24100000, guid: fd8d4f04926f4a641b45bf06667f3761, type: 2}
|
|
||||||
--- !u!1 &379057220
|
--- !u!1 &379057220
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -930,7 +929,6 @@ GameObject:
|
||||||
- component: {fileID: 501733678}
|
- component: {fileID: 501733678}
|
||||||
- component: {fileID: 501733677}
|
- component: {fileID: 501733677}
|
||||||
- component: {fileID: 501733679}
|
- component: {fileID: 501733679}
|
||||||
- component: {fileID: 501733680}
|
|
||||||
- component: {fileID: 501733681}
|
- component: {fileID: 501733681}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Main Camera
|
m_Name: Main Camera
|
||||||
|
@ -949,7 +947,7 @@ Camera:
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_ClearFlags: 2
|
m_ClearFlags: 2
|
||||||
m_BackGroundColor: {r: 0.5686275, g: 0.57254905, b: 0.5686275, a: 0}
|
m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0}
|
||||||
m_projectionMatrixMode: 1
|
m_projectionMatrixMode: 1
|
||||||
m_GateFitMode: 2
|
m_GateFitMode: 2
|
||||||
m_FOVAxisMode: 0
|
m_FOVAxisMode: 0
|
||||||
|
@ -1018,20 +1016,6 @@ MonoBehaviour:
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
mouseButton: 0
|
mouseButton: 0
|
||||||
--- !u!114 &501733680
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 501733675}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 0d779b53ae5c4644b516e84fdc31fcdc, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
mouseButton: 0
|
|
||||||
aspectRatio: {x: 10, y: 15}
|
|
||||||
--- !u!114 &501733681
|
--- !u!114 &501733681
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -1318,6 +1302,81 @@ CanvasGroup:
|
||||||
m_Interactable: 1
|
m_Interactable: 1
|
||||||
m_BlocksRaycasts: 1
|
m_BlocksRaycasts: 1
|
||||||
m_IgnoreParentGroups: 0
|
m_IgnoreParentGroups: 0
|
||||||
|
--- !u!1 &767862262
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 767862263}
|
||||||
|
- component: {fileID: 767862265}
|
||||||
|
- component: {fileID: 767862264}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Image
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &767862263
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 767862262}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 1650688415}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!114 &767862264
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 767862262}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 0.043137256, g: 0.078431375, b: 0.11764706, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_Sprite: {fileID: 21300000, guid: 4610f229d90028b409340b3f89a93e6c, type: 3}
|
||||||
|
m_Type: 1
|
||||||
|
m_PreserveAspect: 0
|
||||||
|
m_FillCenter: 1
|
||||||
|
m_FillMethod: 4
|
||||||
|
m_FillAmount: 1
|
||||||
|
m_FillClockwise: 1
|
||||||
|
m_FillOrigin: 0
|
||||||
|
m_UseSpriteMesh: 0
|
||||||
|
m_PixelsPerUnitMultiplier: 2
|
||||||
|
--- !u!222 &767862265
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 767862262}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
--- !u!1 &902566661
|
--- !u!1 &902566661
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -2737,6 +2796,108 @@ CanvasRenderer:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1640794862}
|
m_GameObject: {fileID: 1640794862}
|
||||||
m_CullTransparentMesh: 1
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!1 &1650688411
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1650688415}
|
||||||
|
- component: {fileID: 1650688414}
|
||||||
|
- component: {fileID: 1650688413}
|
||||||
|
- component: {fileID: 1650688412}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: MarginCanvas
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!114 &1650688412
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1650688411}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_IgnoreReversedGraphics: 1
|
||||||
|
m_BlockingObjects: 0
|
||||||
|
m_BlockingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
--- !u!114 &1650688413
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1650688411}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_UiScaleMode: 1
|
||||||
|
m_ReferencePixelsPerUnit: 100
|
||||||
|
m_ScaleFactor: 1
|
||||||
|
m_ReferenceResolution: {x: 1000, y: 1500}
|
||||||
|
m_ScreenMatchMode: 0
|
||||||
|
m_MatchWidthOrHeight: 0
|
||||||
|
m_PhysicalUnit: 3
|
||||||
|
m_FallbackScreenDPI: 96
|
||||||
|
m_DefaultSpriteDPI: 96
|
||||||
|
m_DynamicPixelsPerUnit: 1
|
||||||
|
m_PresetInfoIsWorld: 0
|
||||||
|
--- !u!223 &1650688414
|
||||||
|
Canvas:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1650688411}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_RenderMode: 1
|
||||||
|
m_Camera: {fileID: 501733677}
|
||||||
|
m_PlaneDistance: 100
|
||||||
|
m_PixelPerfect: 0
|
||||||
|
m_ReceivesEvents: 1
|
||||||
|
m_OverrideSorting: 0
|
||||||
|
m_OverridePixelPerfect: 0
|
||||||
|
m_SortingBucketNormalizedSize: 0
|
||||||
|
m_VertexColorAlwaysGammaSpace: 0
|
||||||
|
m_AdditionalShaderChannelsFlag: 0
|
||||||
|
m_UpdateRectTransformForStandalone: 0
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingOrder: -32768
|
||||||
|
m_TargetDisplay: 0
|
||||||
|
--- !u!224 &1650688415
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1650688411}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 767862263}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
|
m_Pivot: {x: 0, y: 0}
|
||||||
--- !u!1 &1652443526
|
--- !u!1 &1652443526
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -3427,6 +3588,7 @@ SceneRoots:
|
||||||
- {fileID: 501733678}
|
- {fileID: 501733678}
|
||||||
- {fileID: 311490072}
|
- {fileID: 311490072}
|
||||||
- {fileID: 1050150012}
|
- {fileID: 1050150012}
|
||||||
|
- {fileID: 1650688415}
|
||||||
- {fileID: 1333164888}
|
- {fileID: 1333164888}
|
||||||
- {fileID: 1652443528}
|
- {fileID: 1652443528}
|
||||||
- {fileID: 902566663}
|
- {fileID: 902566663}
|
||||||
|
|
|
@ -9,10 +9,15 @@ namespace View {
|
||||||
#if !UNITY_EDITOR
|
#if !UNITY_EDITOR
|
||||||
AppWindowUtility.AlwaysOnTop = true;
|
AppWindowUtility.AlwaysOnTop = true;
|
||||||
AppWindowUtility.FrameVisibility = false;
|
AppWindowUtility.FrameVisibility = false;
|
||||||
|
AppWindowUtility.Transparent = true;
|
||||||
|
|
||||||
//Vector2Int resolution = new(360, 640);
|
Vector2Int displaySize = new(Screen.currentResolution.width, Screen.currentResolution.height);
|
||||||
Vector2Int resolution = new(360, 540);
|
const float aspect = 10f / 15f;
|
||||||
AppWindowUtility.ResizeWindow(resolution.x, resolution.y);
|
int windowHeight = (int)(displaySize.y * .45f);
|
||||||
|
int windowWidth = (int)(windowHeight * aspect);
|
||||||
|
int margin = (int)(displaySize.x * .01f);
|
||||||
|
AppWindowUtility.ResizeWindow(windowWidth, windowHeight);
|
||||||
|
AppWindowUtility.MoveWindow(displaySize.x - windowWidth - margin, margin);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
BIN
Assets/Sprites/Rosa/Garden/02.png
(Stored with Git LFS)
Normal file
BIN
Assets/Sprites/Rosa/Garden/02.png
(Stored with Git LFS)
Normal file
Binary file not shown.
|
@ -1,5 +1,5 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 7f14bf47782e5564ea486633b6b3f504
|
guid: 623c2050f13889e4fa065a0f5ed3d46b
|
||||||
TextureImporter:
|
TextureImporter:
|
||||||
internalIDToNameTable: []
|
internalIDToNameTable: []
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
|
@ -47,8 +47,8 @@ TextureImporter:
|
||||||
spriteExtrude: 1
|
spriteExtrude: 1
|
||||||
spriteMeshType: 1
|
spriteMeshType: 1
|
||||||
alignment: 7
|
alignment: 7
|
||||||
spritePivot: {x: 0.5, y: 0}
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
spritePixelsToUnits: 192
|
spritePixelsToUnits: 225
|
||||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
spriteGenerateFallbackPhysicsShape: 1
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
alphaUsage: 1
|
alphaUsage: 1
|
||||||
|
@ -113,7 +113,7 @@ TextureImporter:
|
||||||
physicsShape: []
|
physicsShape: []
|
||||||
bones: []
|
bones: []
|
||||||
spriteID: 5e97eb03825dee720800000000000000
|
spriteID: 5e97eb03825dee720800000000000000
|
||||||
internalID: 1537655665
|
internalID: 0
|
||||||
vertices: []
|
vertices: []
|
||||||
indices:
|
indices:
|
||||||
edges: []
|
edges: []
|
Binary file not shown.
Before Width: | Height: | Size: 218 KiB |
BIN
Assets/Sprites/UI/UI_Margin.png
(Stored with Git LFS)
Normal file
BIN
Assets/Sprites/UI/UI_Margin.png
(Stored with Git LFS)
Normal file
Binary file not shown.
127
Assets/Sprites/UI/UI_Margin.png.meta
Normal file
127
Assets/Sprites/UI/UI_Margin.png.meta
Normal file
|
@ -0,0 +1,127 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4610f229d90028b409340b3f89a93e6c
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 12
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 0
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
flipGreenChannel: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
ignoreMipmapLimit: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 1
|
||||||
|
wrapV: 1
|
||||||
|
wrapW: 1
|
||||||
|
nPOTScale: 0
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 1
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 140, y: 140, z: 140, w: 140}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 1
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 8
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
swizzle: 50462976
|
||||||
|
cookieLightType: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
ignorePlatformSupport: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Standalone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
ignorePlatformSupport: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Server
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
ignorePlatformSupport: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID: 5e97eb03825dee720800000000000000
|
||||||
|
internalID: 1537655665
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
nameFileIdTable: {}
|
||||||
|
mipmapLimitGroupName:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Binary file not shown.
Binary file not shown.
|
@ -1,40 +0,0 @@
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace SatorImaging.AppWindowUtility {
|
|
||||||
public static class ResizeHelper {
|
|
||||||
public static Vector2 GetDirection(Vector2 mousePosition, Vector2 screenSize) {
|
|
||||||
float widthPercentage = mousePosition.x / screenSize.x;
|
|
||||||
float heightPercentage = mousePosition.y / screenSize.y;
|
|
||||||
|
|
||||||
const float marginHeightPercentage = 30f / 1920f;
|
|
||||||
const float marginWidthPercentage = 30f / 1280f;
|
|
||||||
|
|
||||||
if (widthPercentage < marginWidthPercentage) {
|
|
||||||
if (heightPercentage > 1 - marginHeightPercentage)
|
|
||||||
return new Vector2(-1, -1);
|
|
||||||
if (heightPercentage < marginHeightPercentage)
|
|
||||||
return new Vector2(-1, 1);
|
|
||||||
|
|
||||||
return new Vector2(-1, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (widthPercentage > 1 - marginWidthPercentage) {
|
|
||||||
if (heightPercentage > 1 - marginHeightPercentage)
|
|
||||||
return new Vector2(1, -1);
|
|
||||||
if (heightPercentage < marginHeightPercentage)
|
|
||||||
return new Vector2(1, 1);
|
|
||||||
|
|
||||||
return new Vector2(1, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (heightPercentage > 1 - marginHeightPercentage)
|
|
||||||
return new Vector2(0, -1);
|
|
||||||
|
|
||||||
if (heightPercentage < marginHeightPercentage)
|
|
||||||
return new Vector2(0, 1);
|
|
||||||
|
|
||||||
return Vector2.zero;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,3 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 4f5b1e31614e4b458c18c903a3934198
|
|
||||||
timeCreated: 1713212603
|
|
|
@ -7,7 +7,6 @@ namespace SatorImaging.AppWindowUtility {
|
||||||
|
|
||||||
private bool _isDragging;
|
private bool _isDragging;
|
||||||
private Vector2 _targetPosition = Vector2.zero;
|
private Vector2 _targetPosition = Vector2.zero;
|
||||||
private Vector2 _resizeDirection = Vector2.zero;
|
|
||||||
|
|
||||||
private void Update() {
|
private void Update() {
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
|
@ -20,12 +19,10 @@ namespace SatorImaging.AppWindowUtility {
|
||||||
|
|
||||||
if (Input.GetMouseButtonDown((int)mouseButton)) {
|
if (Input.GetMouseButtonDown((int)mouseButton)) {
|
||||||
_targetPosition = Event.current.mousePosition;
|
_targetPosition = Event.current.mousePosition;
|
||||||
_resizeDirection =
|
|
||||||
ResizeHelper.GetDirection(_targetPosition, new Vector2(Screen.width, Screen.height));
|
|
||||||
_isDragging = true;
|
_isDragging = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_isDragging && Input.GetMouseButton((int)mouseButton) && _resizeDirection == Vector2.zero) {
|
if (_isDragging && Input.GetMouseButton((int)mouseButton)) {
|
||||||
// do NOT use Event.current.delta. it's sampled in local window coordinate.
|
// do NOT use Event.current.delta. it's sampled in local window coordinate.
|
||||||
// and moving window while mouse dragging changes coordinate sample by sample.
|
// and moving window while mouse dragging changes coordinate sample by sample.
|
||||||
// just remove the gap between current mouse position and drag starting position.
|
// just remove the gap between current mouse position and drag starting position.
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
using UnityEngine;
|
|
||||||
using UnityEngine.EventSystems;
|
|
||||||
|
|
||||||
namespace SatorImaging.AppWindowUtility {
|
|
||||||
public class WindowResizer : MonoBehaviour {
|
|
||||||
public MouseButton mouseButton;
|
|
||||||
|
|
||||||
private bool _isResizing;
|
|
||||||
private Vector2 _targetPosition = Vector2.zero;
|
|
||||||
private Vector2 _resizeDirection = Vector2.zero;
|
|
||||||
|
|
||||||
[SerializeField] private Vector2 aspectRatio = new(10, 15);
|
|
||||||
|
|
||||||
private void Update() {
|
|
||||||
#if UNITY_EDITOR
|
|
||||||
if (_isResizing.Equals(_isResizing)) return; // to avoid CS0162 warning
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (EventSystem.current?.currentSelectedGameObject) return;
|
|
||||||
|
|
||||||
if (Input.GetMouseButtonUp((int)mouseButton)) _isResizing = false;
|
|
||||||
|
|
||||||
if (Input.GetMouseButtonDown((int)mouseButton)) {
|
|
||||||
_targetPosition = Event.current.mousePosition;
|
|
||||||
_resizeDirection =
|
|
||||||
ResizeHelper.GetDirection(_targetPosition, new Vector2(Screen.width, Screen.height));
|
|
||||||
_isResizing = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_isResizing && Input.GetMouseButton((int)mouseButton) && _resizeDirection != Vector2.zero) {
|
|
||||||
float ratio = aspectRatio.x / aspectRatio.y;
|
|
||||||
|
|
||||||
Vector2 delta = new(
|
|
||||||
Event.current.mousePosition.x - _targetPosition.x,
|
|
||||||
Event.current.mousePosition.y - _targetPosition.y
|
|
||||||
);
|
|
||||||
|
|
||||||
AppWindowUtility.ResizeWindowRelative(delta.x, delta.y, _resizeDirection, ratio);
|
|
||||||
|
|
||||||
_targetPosition = Event.current.mousePosition;
|
|
||||||
|
|
||||||
if (_resizeDirection.x < 0)
|
|
||||||
_targetPosition.x -= delta.x;
|
|
||||||
if (_resizeDirection.y > 0)
|
|
||||||
_targetPosition.y -= delta.y;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,3 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 0d779b53ae5c4644b516e84fdc31fcdc
|
|
||||||
timeCreated: 1713211016
|
|
|
@ -1,8 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 95bed7a6ca15f8045b8a333ad25d61f5
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
|
@ -1,77 +0,0 @@
|
||||||
using NUnit.Framework;
|
|
||||||
using SatorImaging.AppWindowUtility;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
public class ResizeTest {
|
|
||||||
[Test]
|
|
||||||
public void CheckCenter() {
|
|
||||||
Vector2 mousePos = new(500, 500);
|
|
||||||
Vector2 screenSize = new(1280, 1920);
|
|
||||||
|
|
||||||
Assert.AreEqual(new Vector2(0, 0), ResizeHelper.GetDirection(mousePos, screenSize));
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void CheckTopLeft() {
|
|
||||||
Vector2 mousePos = new(0, 0);
|
|
||||||
Vector2 screenSize = new(1280, 1920);
|
|
||||||
|
|
||||||
Assert.AreEqual(new Vector2(-1, 1), ResizeHelper.GetDirection(mousePos, screenSize));
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void CheckTop() {
|
|
||||||
Vector2 mousePos = new(500, 0);
|
|
||||||
Vector2 screenSize = new(1280, 1920);
|
|
||||||
|
|
||||||
Assert.AreEqual(new Vector2(0, 1), ResizeHelper.GetDirection(mousePos, screenSize));
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void CheckTopRight() {
|
|
||||||
Vector2 mousePos = new(1280, 0);
|
|
||||||
Vector2 screenSize = new(1280, 1920);
|
|
||||||
|
|
||||||
Assert.AreEqual(new Vector2(1, 1), ResizeHelper.GetDirection(mousePos, screenSize));
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void CheckLeft() {
|
|
||||||
Vector2 mousePos = new(0, 500);
|
|
||||||
Vector2 screenSize = new(1280, 1920);
|
|
||||||
|
|
||||||
Assert.AreEqual(new Vector2(-1, 0), ResizeHelper.GetDirection(mousePos, screenSize));
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void CheckRight() {
|
|
||||||
Vector2 mousePos = new(1280, 500);
|
|
||||||
Vector2 screenSize = new(1280, 1920);
|
|
||||||
|
|
||||||
Assert.AreEqual(new Vector2(1, 0), ResizeHelper.GetDirection(mousePos, screenSize));
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void CheckBottomLeft() {
|
|
||||||
Vector2 mousePos = new(0, 1920);
|
|
||||||
Vector2 screenSize = new(1280, 1920);
|
|
||||||
|
|
||||||
Assert.AreEqual(new Vector2(-1, -1), ResizeHelper.GetDirection(mousePos, screenSize));
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void CheckBottom() {
|
|
||||||
Vector2 mousePos = new(500, 1920);
|
|
||||||
Vector2 screenSize = new(1280, 1920);
|
|
||||||
|
|
||||||
Assert.AreEqual(new Vector2(0, -1), ResizeHelper.GetDirection(mousePos, screenSize));
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void CheckBottomRight() {
|
|
||||||
Vector2 mousePos = new(1280, 1920);
|
|
||||||
Vector2 screenSize = new(1280, 1920);
|
|
||||||
|
|
||||||
Assert.AreEqual(new Vector2(1, -1), ResizeHelper.GetDirection(mousePos, screenSize));
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: ec4a69b0e49f65c4c98675104812c31b
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
|
@ -1,24 +0,0 @@
|
||||||
{
|
|
||||||
"name": "SatorImaging.AppWindowUtility.Tests",
|
|
||||||
"rootNamespace": "",
|
|
||||||
"references": [
|
|
||||||
"UnityEngine.TestRunner",
|
|
||||||
"UnityEditor.TestRunner",
|
|
||||||
"SatorImaging.AppWindowUtility"
|
|
||||||
],
|
|
||||||
"includePlatforms": [
|
|
||||||
"Editor"
|
|
||||||
],
|
|
||||||
"excludePlatforms": [],
|
|
||||||
"allowUnsafeCode": false,
|
|
||||||
"overrideReferences": true,
|
|
||||||
"precompiledReferences": [
|
|
||||||
"nunit.framework.dll"
|
|
||||||
],
|
|
||||||
"autoReferenced": false,
|
|
||||||
"defineConstraints": [
|
|
||||||
"UNITY_INCLUDE_TESTS"
|
|
||||||
],
|
|
||||||
"versionDefines": [],
|
|
||||||
"noEngineReferences": false
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 39a22fcf88b04a24eb3566b752f8d676
|
|
||||||
AssemblyDefinitionImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
|
@ -13,10 +13,10 @@ PlayerSettings:
|
||||||
useOnDemandResources: 0
|
useOnDemandResources: 0
|
||||||
accelerometerFrequency: 60
|
accelerometerFrequency: 60
|
||||||
companyName: DefaultCompany
|
companyName: DefaultCompany
|
||||||
productName: SantJordiJam24
|
productName: Roses
|
||||||
defaultCursor: {fileID: 0}
|
defaultCursor: {fileID: 0}
|
||||||
cursorHotspot: {x: 0, y: 0}
|
cursorHotspot: {x: 0, y: 0}
|
||||||
m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
|
m_SplashScreenBackgroundColor: {r: 0.043137256, g: 0.078431375, b: 0.11764706, a: 1}
|
||||||
m_ShowUnitySplashScreen: 1
|
m_ShowUnitySplashScreen: 1
|
||||||
m_ShowUnitySplashLogo: 1
|
m_ShowUnitySplashLogo: 1
|
||||||
m_SplashScreenOverlayOpacity: 1
|
m_SplashScreenOverlayOpacity: 1
|
||||||
|
@ -89,7 +89,7 @@ PlayerSettings:
|
||||||
dedicatedServerOptimizations: 0
|
dedicatedServerOptimizations: 0
|
||||||
bakeCollisionMeshes: 0
|
bakeCollisionMeshes: 0
|
||||||
forceSingleInstance: 0
|
forceSingleInstance: 0
|
||||||
useFlipModelSwapchain: 1
|
useFlipModelSwapchain: 0
|
||||||
resizableWindow: 0
|
resizableWindow: 0
|
||||||
useMacAppStoreValidation: 0
|
useMacAppStoreValidation: 0
|
||||||
macAppStoreCategory: public.app-category.games
|
macAppStoreCategory: public.app-category.games
|
||||||
|
@ -617,7 +617,7 @@ PlayerSettings:
|
||||||
monoEnv:
|
monoEnv:
|
||||||
splashScreenBackgroundSourceLandscape: {fileID: 0}
|
splashScreenBackgroundSourceLandscape: {fileID: 0}
|
||||||
splashScreenBackgroundSourcePortrait: {fileID: 0}
|
splashScreenBackgroundSourcePortrait: {fileID: 0}
|
||||||
blurSplashScreenBackground: 1
|
blurSplashScreenBackground: 0
|
||||||
spritePackerPolicy:
|
spritePackerPolicy:
|
||||||
webGLMemorySize: 16
|
webGLMemorySize: 16
|
||||||
webGLExceptionSupport: 1
|
webGLExceptionSupport: 1
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
[LOG] System::create : Header version = 2.02.06. Current version = 2.02.06.
|
|
||||||
[LOG] Manager::init : maxchannels = 256 studioflags = 00000006 flags 00000000 extradriverdata 0000000000000000.
|
|
||||||
[LOG] SystemI::init : Initialize version=20206 (124257), maxchannels=256, flags=0x00020000
|
|
||||||
[LOG] SystemI::setOutputInternal : Setting output to 'FMOD WASAPI Output'
|
|
||||||
[LOG] OutputWASAPI::init : Mix Format (WAVEFORMATEX): wFormatTag=0xFFFE, nChannels=2, nSamplesPerSec=48000, nAvgBytesPerSec=384000, nBlockAlign=8, wBitsPerSample=32, cbSize=22.
|
|
||||||
[LOG] OutputWASAPI::init : Mix Format (WAVEFORMATEXTENSIBLE): wValidBitsPerSample=32, dwChannelMask=0x00000003, SubFormat=00000003-0000-0010-8000-00AA00389B71.
|
|
||||||
[LOG] OutputWASAPI::init : Output buffer size: 4096 samples, latency: 0.00ms, period: 10.00ms, DSP buffer: 1024 * 4
|
|
||||||
[LOG] Thread::initThread : Init FMOD stream thread. Affinity: 0x4000000000000003, Priority: 0xFFFF7FFB, Stack Size: 98304, Semaphore: No, Sleep Time: 10, Looping: Yes.
|
|
||||||
[LOG] Thread::initThread : Init FMOD mixer thread. Affinity: 0x4000000000000001, Priority: 0xFFFF7FFA, Stack Size: 81920, Semaphore: No, Sleep Time: 0, Looping: Yes.
|
|
||||||
[LOG] AsyncManager::init : manager 00000212CCAC8238 isAsync 0 updatePeriod 0.02
|
|
||||||
[LOG] AsyncManager::init : done
|
|
||||||
[LOG] PlaybackSystem::init :
|
|
||||||
[LOG] Thread::initThread : Init FMOD Studio sample load thread. Affinity: 0x4000000000000003, Priority: 0xFFFF7FFD, Stack Size: 98304, Semaphore: No, Sleep Time: 1, Looping: No.
|
|
||||||
[LOG] PlaybackSystem::init : done
|
|
||||||
[LOG] Thread::initThread : Init FMOD Studio bank load thread. Affinity: 0x4000000000000003, Priority: 0xFFFF7FFD, Stack Size: 98304, Semaphore: No, Sleep Time: 1, Looping: No.
|
|
||||||
[LOG] Manager::init : done.
|
|
||||||
[LOG] Manager::readBank : fileversion = 142, compatVersion = 140 (oldest = 44, newest = 142)
|
|
||||||
[LOG] Manager::readBank : fileversion = 142, compatVersion = 140 (oldest = 44, newest = 142)
|
|
||||||
[LOG] Manager::readBank : fileversion = 142, compatVersion = 140 (oldest = 44, newest = 142)
|
|
||||||
[LOG] PlaybackSystem::acquireMasterBus : Setting master channel group format to 6
|
|
Loading…
Add table
Add a link
Reference in a new issue