Description:
Display one dialog at a time.
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
@@ -6,6 +6,7 | |||
|
6 | 6 | using System.Linq; |
|
7 | 7 | |
|
8 | 8 | using isometricparkfna.UI; |
|
9 | using isometricparkfna.Utils; | |
|
9 | 10 | using isometricparkfna.Engines; |
|
10 | 11 | using isometricparkfna.Components; |
|
11 | 12 | using isometricparkfna.Messages; |
@@ -66,6 +67,12 | |||
|
66 | 67 | { |
|
67 | 68 | |
|
68 | 69 | var width = gdm.PreferredBackBufferWidth; |
|
70 | ||
|
71 | Entity dialogEntity = default; | |
|
72 | Node<DialogOption> dialogNode = default; | |
|
73 | ||
|
74 | ||
|
75 | ||
|
69 | 76 | foreach (ref readonly var entity in ReadEntities<WindowTypeComponent>()) |
|
70 | 77 | { |
|
71 | 78 | var window_type = GetComponent<WindowTypeComponent>(entity).type; |
@@ -113,16 +120,28 | |||
|
113 | 120 | case Window.Dialog: |
|
114 | 121 | |
|
115 | 122 | var dialog = GetComponent<DialogComponent>(entity).Dialog; |
|
116 | var show = true; | |
|
117 | var paused = true; | |
|
118 | DialogInterface.RenderDialog(entity, this.BridgeEngine, ref show, ref paused, this.BridgeEngine.font, dialog); | |
|
123 | ||
|
124 | if ((dialogEntity == null) | |
|
125 | || (dialogEntity.ID == 0) | |
|
126 | || entity.ID < dialogEntity.ID) | |
|
127 | { | |
|
128 | dialogEntity = entity; | |
|
129 | dialogNode = dialog; | |
|
130 | } | |
|
119 | 131 | break; |
|
120 | 132 | default: |
|
121 | 133 | // Logging.Error(String.Format("Unknown window type {0} ", window_type)); |
|
122 | 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 | 147 | public void setFont(ImFontPtr font) |
You need to be logged in to leave comments.
Login now