Skip to content

Commit 97bf003

Browse files
committed
version 0.8a
- Core: Added Popup, Indicators, List, Buttons, Input Fields, Radio & Checkboxes Components
1 parent 9119458 commit 97bf003

File tree

61 files changed

+1356
-345
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1356
-345
lines changed

Assets/UI.Windows/Addons/Flow/Core/Editor/FlowSystemEditorWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ private void OnGUI() {
408408

409409
if (this.scrollingMouseAnimation != null && this.scrollingMouseAnimation.isAnimating == true || this.scrollingMouse == true) this.DrawMinimap();
410410

411-
if (FlowSystem.GetData().flowWindowWithLayout == true) {
411+
if (FlowSystem.GetData() != null && FlowSystem.GetData().flowWindowWithLayout == true) {
412412

413413
foreach (var window in windows) {
414414

Assets/UI.Windows/Addons/Flow/Core/FlowData.cs

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ public void SetScrollPosition(Vector2 scrollPos) {
236236

237237
}
238238

239+
#if UNITY_EDITOR
239240
public void Attach(int source, int other, bool oneWay, WindowLayoutElement component = null) {
240241

241242
var window = this.GetWindow(source);
@@ -255,35 +256,36 @@ public void Detach(int source, int other, bool oneWay, WindowLayoutElement compo
255256
}
256257

257258
public bool AlreadyAttached(int source, int other, WindowLayoutElement component = null) {
258-
259+
259260
if (component != null) {
260-
261+
261262
return this.windows.Any((w) => w.id == source && w.AlreadyAttached(other, component));
262-
263+
263264
}
264-
265+
265266
return this.windows.Any((w) => w.id == source && w.AlreadyAttached(other));
266-
267+
267268
}
268-
269+
269270
public void DestroyWindow(int id) {
270-
271+
271272
// Remove window
272273
this.windows.Remove(this.GetWindow(id));
273-
274+
274275
this.selected.Remove(id);
275276
this.defaultWindows.Remove(id);
276-
277+
277278
foreach (var window in this.windows) {
278-
279+
279280
window.Detach(id, oneWay: true);
280-
281+
281282
}
282-
283+
283284
this.isDirty = true;
284-
285+
285286
}
286-
287+
#endif
288+
287289
public FlowWindow CreateDefaultLink() {
288290

289291
var newId = this.AllocateId();

Assets/UI.Windows/Addons/Flow/Core/FlowSystem.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ public static FlowWindow CreateDefaultLink() {
161161

162162
}
163163

164+
#if UNITY_EDITOR
164165
public static void DestroyWindow(int id) {
165166

166167
FlowSystem.instance.data.DestroyWindow(id);
@@ -184,6 +185,7 @@ public static bool AlreadyAttached(int source, int other, WindowLayoutElement co
184185
return FlowSystem.instance.data.AlreadyAttached(source, other, component);
185186

186187
}
188+
#endif
187189

188190
public static void SetScrollPosition(Vector2 pos) {
189191

Assets/UI.Windows/Addons/Flow/Core/FlowWindow.cs

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -364,19 +364,7 @@ public bool HasContainer(FlowWindow predicate) {
364364
return this.attaches.Any((id) => id == predicate.id && FlowSystem.GetWindow(id).isContainer);
365365

366366
}
367-
368-
public bool AlreadyAttached(int id, WindowLayoutElement component = null) {
369-
370-
if (component != null) {
371-
372-
return this.attachedComponents.Any((c) => c.targetWindowId == id && c.sourceComponentTag == component.tag);
373-
374-
}
375367

376-
return this.attaches.Contains(id);
377-
378-
}
379-
380368
public List<FlowWindow> GetAttachedWindows() {
381369

382370
List<FlowWindow> output = new List<FlowWindow>();
@@ -392,7 +380,20 @@ public List<FlowWindow> GetAttachedWindows() {
392380
return output;
393381

394382
}
395-
383+
384+
#if UNITY_EDITOR
385+
public bool AlreadyAttached(int id, WindowLayoutElement component = null) {
386+
387+
if (component != null) {
388+
389+
return this.attachedComponents.Any((c) => c.targetWindowId == id && c.sourceComponentTag == component.tag);
390+
391+
}
392+
393+
return this.attaches.Contains(id);
394+
395+
}
396+
396397
public bool Attach(int id, bool oneWay = false, WindowLayoutElement component = null) {
397398

398399
if (this.id == id) return false;
@@ -476,6 +477,7 @@ public bool Detach(int id, bool oneWay = false, WindowLayoutElement component =
476477
return result;
477478

478479
}
480+
#endif
479481

480482
}
481483

Binary file not shown.

0 commit comments

Comments
 (0)