Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
UFrameIT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FrameIT
UFrameIT
Commits
c70c18d9
Commit
c70c18d9
authored
5 years ago
by
Richard Marcus
Browse files
Options
Downloads
Patches
Plain Diff
ui scales with screensize, fixed fact insertion bug
parent
954a1cdf
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Assets/FactManager.cs
+9
-7
9 additions, 7 deletions
Assets/FactManager.cs
Assets/TreeWorld.unity
+5
-5
5 additions, 5 deletions
Assets/TreeWorld.unity
with
14 additions
and
12 deletions
Assets/FactManager.cs
+
9
−
7
View file @
c70c18d9
...
...
@@ -7,7 +7,7 @@
public
class
FactManager
:
MonoBehaviour
{
public
GameObject
SmartMenu
;
private
Stack
<
int
>
NextEmpt
yStack
=
new
Stack
<
int
>();
private
List
<
int
>
NextEmpt
ies
=
new
List
<
int
>();
//Variables for LineMode distinction
public
bool
lineModeIsFirstPointSelected
=
false
;
...
...
@@ -26,7 +26,7 @@ void Start()
//We dont want to have this here anymore...
//CommunicationEvents.RemoveFactEvent.AddListener(DeleteFact);
NextEmpt
yStack
.
Push
(
0
);
NextEmpt
ies
.
Add
(
0
);
}
...
...
@@ -38,7 +38,7 @@ void Update()
PointFact
AddPointFact
(
RaycastHit
hit
,
int
id
)
{
Facts
.
Insert
(
id
,
new
PointFact
{
Id
=
id
,
...
...
@@ -77,7 +77,7 @@ AngleFact AddAngleFact(int pid1, int pid2, int pid3, int id)
public
void
DeleteFact
(
Fact
fact
)
{
if
(
Facts
.
Contains
(
fact
))
{
NextEmpt
yStack
.
Push
(
fact
.
Id
);
NextEmpt
ies
.
Add
(
fact
.
Id
);
//Facts.RemoveAt(fact.Id);
Facts
.
Remove
(
Facts
.
Find
(
x
=>
x
.
Id
==
fact
.
Id
));
CommunicationEvents
.
RemoveFactEvent
.
Invoke
(
fact
);
...
...
@@ -93,10 +93,12 @@ public int GetFirstEmptyID()
return i;
}
return Facts.Length - 1;*/
NextEmpties
.
Sort
();
int
id
=
NextEmptyStack
.
Pop
();
if
(
NextEmptyStack
.
Count
==
0
)
NextEmptyStack
.
Push
(
id
+
1
);
int
id
=
NextEmpties
[
0
];
NextEmpties
.
RemoveAt
(
0
);
if
(
NextEmpties
.
Count
==
0
)
NextEmpties
.
Add
(
id
+
1
);
Debug
.
Log
(
"place fact at "
+
id
);
...
...
This diff is collapsed.
Click to expand it.
Assets/TreeWorld.unity
+
5
−
5
View file @
c70c18d9
...
...
@@ -324,7 +324,7 @@ RectTransform:
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchorMax
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchoredPosition
:
{
x
:
442
,
y
:
405.5
}
m_AnchoredPosition
:
{
x
:
442
,
y
:
209
}
m_SizeDelta
:
{
x
:
100
,
y
:
100
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!1001
&154206643
...
...
@@ -1448,7 +1448,7 @@ RectTransform:
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchorMax
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchoredPosition
:
{
x
:
133
,
y
:
0
}
m_AnchoredPosition
:
{
x
:
133
,
y
:
-11
0
}
m_SizeDelta
:
{
x
:
100
,
y
:
100
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!114
&1017737550
...
...
@@ -1846,7 +1846,7 @@ RectTransform:
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
:
-
3
49
}
m_AnchoredPosition
:
{
x
:
0
,
y
:
-4
5
9
}
m_SizeDelta
:
{
x
:
0
,
y
:
0
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!114
&1351049952
...
...
@@ -2220,10 +2220,10 @@ MonoBehaviour:
m_Script
:
{
fileID
:
1980459831
,
guid
:
f70555f144d8491a825f0804e09c671c
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
m_UiScaleMode
:
0
m_UiScaleMode
:
1
m_ReferencePixelsPerUnit
:
100
m_ScaleFactor
:
1
m_ReferenceResolution
:
{
x
:
80
0
,
y
:
60
0
}
m_ReferenceResolution
:
{
x
:
192
0
,
y
:
108
0
}
m_ScreenMatchMode
:
0
m_MatchWidthOrHeight
:
0
m_PhysicalUnit
:
3
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment