Skip to content

Commit

Permalink
fix(nodeprintcontroller.cs): adjust texture sizes and offsets to prev…
Browse files Browse the repository at this point in the history
…ent breaking lines in viewport

Vertical lines above boxes moved up by 1 pixel.

fix ashblue#29
  • Loading branch information
Tabris Thomas committed Jan 30, 2023
1 parent f1de0c7 commit 86096d4
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ private void PaintDivider () {
}

var position = new Rect(
_divider.GlobalPositionX + _box.PaddingY / 2 + _node.DividerLeftOffset - 2,
_divider.GlobalPositionX + _box.PaddingX / 2 + _node.DividerLeftOffset - 2,
// @TODO Should not need to offset this
_divider.GlobalPositionY + _box.PaddingY / 2,
_divider.GlobalPositionY + _box.PaddingY / 2 - 2,
_divider.Width + graphicSizeIncrease,
10);

Expand All @@ -107,28 +107,28 @@ private void PaintDivider () {

private void PaintVerticalBottom () {
if (_verticalBottom == null) {
_verticalBottom = CreateTexture(1, (int)_box.PaddingY, Color.black);
_verticalBottom = CreateTexture(1, (int)_box.PaddingY + 1, Color.black);
}

var position = new Rect(
_box.GlobalPositionX + _node.Width / 2 + _box.PaddingX - 2,
_box.GlobalPositionY + _node.Height + _box.PaddingY - 1,
100,
_box.PaddingY - 1);
_box.PaddingY);

GUI.Label(position, _verticalBottom);
}

private void PaintVerticalTop () {
if (_verticalTop == null) {
_verticalTop = CreateTexture(1, Mathf.RoundToInt(_box.PaddingY / 2), Color.black);
_verticalTop = CreateTexture(1, Mathf.RoundToInt(_box.PaddingY / 2) - 1, Color.black);
}

var position = new Rect(
_box.GlobalPositionX + _node.Width / 2 + _box.PaddingX - 2,
_box.GlobalPositionY + _box.PaddingY / 2,
100,
10);
_box.GlobalPositionY + _box.PaddingY / 2 - 1,
100,
_box.PaddingY - 2);

GUI.Label(position, _verticalTop);
}
Expand Down
18 changes: 9 additions & 9 deletions Packages/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
"clever-crow.nsubstitute": "2.0.3",
"com.unity.2d.sprite": "1.0.0",
"com.unity.2d.tilemap": "1.0.0",
"com.unity.ads": "3.7.1",
"com.unity.analytics": "3.5.3",
"com.unity.collab-proxy": "1.5.7",
"com.unity.ide.rider": "3.0.6",
"com.unity.ide.visualstudio": "2.0.8",
"com.unity.ide.vscode": "1.2.3",
"com.unity.purchasing": "3.1.0",
"com.unity.test-framework": "1.1.24",
"com.unity.ads": "3.7.5",
"com.unity.analytics": "3.6.12",
"com.unity.collab-proxy": "1.17.7",
"com.unity.ide.rider": "3.0.16",
"com.unity.ide.visualstudio": "2.0.16",
"com.unity.ide.vscode": "1.2.5",
"com.unity.purchasing": "4.5.1",
"com.unity.test-framework": "1.1.31",
"com.unity.textmeshpro": "3.0.6",
"com.unity.timeline": "1.5.5",
"com.unity.timeline": "1.6.4",
"com.unity.ugui": "1.0.0",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.androidjni": "1.0.0",
Expand Down
45 changes: 34 additions & 11 deletions Packages/packages-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"dependencies": {}
},
"com.unity.ads": {
"version": "3.7.1",
"version": "3.7.5",
"depth": 0,
"source": "registry",
"dependencies": {
Expand All @@ -29,7 +29,7 @@
"url": "https://packages.unity.com"
},
"com.unity.analytics": {
"version": "3.5.3",
"version": "3.6.12",
"depth": 0,
"source": "registry",
"dependencies": {
Expand All @@ -38,11 +38,11 @@
"url": "https://packages.unity.com"
},
"com.unity.collab-proxy": {
"version": "1.5.7",
"version": "1.17.7",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.nuget.newtonsoft-json": "2.0.0"
"com.unity.services.core": "1.0.1"
},
"url": "https://packages.unity.com"
},
Expand All @@ -54,7 +54,7 @@
"url": "https://packages.unity.com"
},
"com.unity.ide.rider": {
"version": "3.0.6",
"version": "3.0.16",
"depth": 0,
"source": "registry",
"dependencies": {
Expand All @@ -63,7 +63,7 @@
"url": "https://packages.unity.com"
},
"com.unity.ide.visualstudio": {
"version": "2.0.8",
"version": "2.0.16",
"depth": 0,
"source": "registry",
"dependencies": {
Expand All @@ -72,34 +72,57 @@
"url": "https://packages.unity.com"
},
"com.unity.ide.vscode": {
"version": "1.2.3",
"version": "1.2.5",
"depth": 0,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.nuget.newtonsoft-json": {
"version": "3.0.2",
"depth": 1,
"depth": 2,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.purchasing": {
"version": "3.1.0",
"version": "4.5.1",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.ugui": "1.0.0",
"com.unity.modules.unityanalytics": "1.0.0",
"com.unity.modules.unitywebrequest": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0",
"com.unity.modules.androidjni": "1.0.0",
"com.unity.services.core": "1.3.1",
"com.unity.services.analytics": "4.0.1"
},
"url": "https://packages.unity.com"
},
"com.unity.services.analytics": {
"version": "4.2.0",
"depth": 1,
"source": "registry",
"dependencies": {
"com.unity.ugui": "1.0.0",
"com.unity.services.core": "1.4.0"
},
"url": "https://packages.unity.com"
},
"com.unity.services.core": {
"version": "1.6.0",
"depth": 1,
"source": "registry",
"dependencies": {
"com.unity.modules.unitywebrequest": "1.0.0",
"com.unity.nuget.newtonsoft-json": "3.0.2",
"com.unity.modules.androidjni": "1.0.0"
},
"url": "https://packages.unity.com"
},
"com.unity.test-framework": {
"version": "1.1.24",
"version": "1.1.31",
"depth": 0,
"source": "registry",
"dependencies": {
Expand All @@ -119,7 +142,7 @@
"url": "https://packages.unity.com"
},
"com.unity.timeline": {
"version": "1.5.5",
"version": "1.6.4",
"depth": 0,
"source": "registry",
"dependencies": {
Expand Down
23 changes: 7 additions & 16 deletions ProjectSettings/PackageManagerSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -25,29 +25,20 @@ MonoBehaviour:
m_Scopes: []
m_IsDefault: 1
m_Capabilities: 7
- m_Id: scoped:NPM
m_ConfigSource: 0
- m_Id: scoped:project:NPM
m_Name: NPM
m_Url: https://registry.npmjs.org
m_Scopes:
- clever-crow
m_IsDefault: 0
m_Capabilities: 0
m_UserSelectedRegistryName:
m_ConfigSource: 4
m_UserSelectedRegistryName: NPM
m_UserAddingNewScopedRegistry: 0
m_RegistryInfoDraft:
m_ErrorMessage:
m_Original:
m_Id: scoped:NPM
m_Name: NPM
m_Url: https://registry.npmjs.org
m_Scopes:
- clever-crow
m_IsDefault: 0
m_Capabilities: 0
m_Modified: 0
m_Name: NPM
m_Url: https://registry.npmjs.org
m_Scopes:
- clever-crow
m_SelectedScopeIndex: 0
m_ErrorMessage:
m_UserModificationsInstanceId: -826
m_OriginalInstanceId: -830
m_LoadAssets: 0
4 changes: 2 additions & 2 deletions ProjectSettings/ProjectVersion.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
m_EditorVersion: 2021.1.9f1
m_EditorVersionWithRevision: 2021.1.9f1 (7a790e367ab3)
m_EditorVersion: 2021.3.16f1
m_EditorVersionWithRevision: 2021.3.16f1 (4016570cf34f)

0 comments on commit 86096d4

Please sign in to comment.