@@ -26,7 +26,7 @@ public partial class LogWindow : EditorWindow{
2626 LogWindow ( ) {
2727 Ed . pauseStateChanged +=
2828 ( PauseState s ) => { if ( s == PauseState . Paused ) Repaint ( ) ; } ;
29- Activ . Loggr . Logger < string , object > . messageReceived += OnGenericMessage ;
29+ Activ . Loggr . Logger < string , object > . onMessage += OnGenericMessage ;
3030 }
3131
3232 void OnFocus ( ) {
@@ -95,10 +95,7 @@ void DrawTextView(string text, ref Vector2 scroll){
9595 scroll = BeginScrollView ( scroll ) ;
9696 GUI . backgroundColor = Color . black ;
9797 ConfigTextAreaStyle ( ) ;
98- // TODO this is injecting prolog data into debug chan out
99- // when browsing
100- GL . TextArea ( browsing ? model . selectedFrame . Format ( ) : text ,
101- GL . ExpandHeight ( true ) ) ;
98+ GL . TextArea ( text , GL . ExpandHeight ( true ) ) ;
10299 EndScrollView ( ) ;
103100 GUI . backgroundColor = Color . white ;
104101 }
@@ -116,7 +113,10 @@ void ConfigTextAreaStyle(){
116113
117114 void DrawScrubber ( ) {
118115 BeginHorizontal ( ) ;
119- int frameNo = browsing ? model . selectedFrame . index : Time . frameCount ;
116+ int frameNo = Time . frameCount ;
117+ if ( browsing ) {
118+ frameNo = model . currentFrame ?? frameNo ;
119+ }
120120 var style = GUI . skin . button ;
121121 normalButtonFont = style . font ;
122122 style . font = monofont ;
@@ -141,12 +141,12 @@ void ToggleAdvanced(){}
141141 // Ref https://tinyurl.com/yyo8c35g which also demonstrates starting a 2D
142142 // GUI at handles location
143143 void OnSceneGUI ( SceneView sceneView ) {
144- var sel = PrologHistoryGUI . Draw ( model . filtered , model . selectedFrame ) ;
144+ var sel = PrologHistoryGUI . Draw ( model . filtered , model . pgRange ) ;
145145 if ( Ed . isPaused || ! isPlaying ) {
146- model . selectedFrame = sel ?? model . selectedFrame ;
146+ model . pgRange = sel ?? model . pgRange ;
147147 Repaint ( ) ;
148148 } else {
149- model . selectedFrame = null ;
149+ model . pgRange = null ;
150150 }
151151 }
152152
@@ -161,13 +161,12 @@ void Clear(){
161161 }
162162
163163 void SelectPrev ( ) {
164- model . selectedFrame = model . Prev ( model . selectedFrame ) ;
164+ model . Prev ( ) ;
165165 SceneView . RepaintAll ( ) ;
166166 }
167167
168168 void SelectNext ( ) {
169- if ( model . selectedFrame == null ) return ;
170- model . selectedFrame = model . Next ( model . selectedFrame ) ;
169+ model . Next ( ) ;
171170 SceneView . RepaintAll ( ) ;
172171 }
173172
@@ -188,7 +187,7 @@ static Font monofont{ get{
188187 } }
189188
190189 bool browsing
191- => ( Ed . isPaused || ! isPlaying ) && model . selectedFrame != null ;
190+ => ( Ed . isPaused || ! isPlaying ) && model . pgRange != null ;
192191
193192 static bool isPlaying => Application . isPlaying ;
194193
0 commit comments