Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
Aszusz committed Feb 8, 2024
2 parents 0cc4dcc + 0de7042 commit 15cd202
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Source/superhuman/components/Console.hx
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ class Console extends LayoutGroup implements IConsole {
#if windows
text = StringTools.replace( text, '\r\n', '\n' );
#end

_textList.appendText( text, isError );
this.dispatchEvent( new Event( Event.CHANGE ) );

Expand Down Expand Up @@ -227,12 +228,12 @@ class ConsoleTextArea extends TextArea {

}

override function update() {
/* override function update() {
super.update();
if ( _scrollToBottom ) this.scrollY = this.maxScrollY;
}
}*/

override function baseScrollContainer_addedToStageHandler(event:Event) {

Expand Down Expand Up @@ -297,7 +298,7 @@ class ConsoleTextList extends ListView {
}

public function appendText( text:String, isError:Bool = false ) {

_elements.add( { text: text, isError: isError } );

}
Expand All @@ -317,10 +318,11 @@ class ConsoleTextList extends ListView {
}

override function update() {

if ( _scrollToBottom )
{
this.scrollY = this.maxScrollY;
}
super.update();
if ( _scrollToBottom ) this.scrollY = this.maxScrollY;

}

function _allElementsRemoved( e:FlatCollectionEvent ) { }
Expand Down

0 comments on commit 15cd202

Please sign in to comment.