Description:
Display one dialog at a time.
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r382:9963e0e05125 -

@@ -6,6 +6,7
6 using System.Linq;
6 using System.Linq;
7
7
8 using isometricparkfna.UI;
8 using isometricparkfna.UI;
9 using isometricparkfna.Utils;
9 using isometricparkfna.Engines;
10 using isometricparkfna.Engines;
10 using isometricparkfna.Components;
11 using isometricparkfna.Components;
11 using isometricparkfna.Messages;
12 using isometricparkfna.Messages;
@@ -66,6 +67,12
66 {
67 {
67
68
68 var width = gdm.PreferredBackBufferWidth;
69 var width = gdm.PreferredBackBufferWidth;
70
71 Entity dialogEntity = default;
72 Node<DialogOption> dialogNode = default;
73
74
75
69 foreach (ref readonly var entity in ReadEntities<WindowTypeComponent>())
76 foreach (ref readonly var entity in ReadEntities<WindowTypeComponent>())
70 {
77 {
71 var window_type = GetComponent<WindowTypeComponent>(entity).type;
78 var window_type = GetComponent<WindowTypeComponent>(entity).type;
@@ -113,16 +120,28
113 case Window.Dialog:
120 case Window.Dialog:
114
121
115 var dialog = GetComponent<DialogComponent>(entity).Dialog;
122 var dialog = GetComponent<DialogComponent>(entity).Dialog;
116 var show = true;
123
117 var paused = true;
124 if ((dialogEntity == null)
118 DialogInterface.RenderDialog(entity, this.BridgeEngine, ref show, ref paused, this.BridgeEngine.font, dialog);
125 || (dialogEntity.ID == 0)
126 || entity.ID < dialogEntity.ID)
127 {
128 dialogEntity = entity;
129 dialogNode = dialog;
130 }
119 break;
131 break;
120 default:
132 default:
121 // Logging.Error(String.Format("Unknown window type {0} ", window_type));
133 // Logging.Error(String.Format("Unknown window type {0} ", window_type));
122 break;
134 break;
123 }
135 }
136
124 }
137 }
125 }
138 }
139 if (dialogNode != null)
140 {
141 var show = true;
142 var paused = true;
143 DialogInterface.RenderDialog(dialogEntity, this.BridgeEngine, ref show, ref paused, this.BridgeEngine.font, dialogNode);
144 }
126 }
145 }
127
146
128 public void setFont(ImFontPtr font)
147 public void setFont(ImFontPtr font)
You need to be logged in to leave comments. Login now