You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
VisTextArea and all its children (HighlightTextArea, ScrollableTextArea), crashes when color markup is enabled.
Stacktrace:
java.lang.IndexOutOfBoundsException: index can't be >= size: 1299 >= 1291
at com.badlogic.gdx.utils.FloatArray.get(FloatArray.java:131)
at com.kotcrab.vis.ui.widget.VisTextArea.drawSelection(VisTextArea.java:251)
at com.kotcrab.vis.ui.widget.VisTextField.draw(VisTextField.java:350)
at com.badlogic.gdx.scenes.scene2d.Group.drawChildren(Group.java:111)
at com.badlogic.gdx.scenes.scene2d.ui.ScrollPane.draw(ScrollPane.java:543)
at com.badlogic.gdx.scenes.scene2d.Group.drawChildren(Group.java:124)
at com.badlogic.gdx.scenes.scene2d.Group.draw(Group.java:58)
at com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup.draw(WidgetGroup.java:170)
at com.badlogic.gdx.scenes.scene2d.ui.Table.draw(Table.java:126)
at com.badlogic.gdx.scenes.scene2d.Group.drawChildren(Group.java:111)
at com.badlogic.gdx.scenes.scene2d.ui.Table.draw(Table.java:117)
at com.badlogic.gdx.scenes.scene2d.ui.Window.draw(Window.java:253)
at com.kotcrab.vis.ui.widget.VisWindow.draw(VisWindow.java:239)
at com.badlogic.gdx.scenes.scene2d.Group.drawChildren(Group.java:111)
at com.badlogic.gdx.scenes.scene2d.Group.draw(Group.java:58)
at com.badlogic.gdx.scenes.scene2d.Stage.draw(Stage.java:129)
I think that start and end are not aware that markup glyphs are not rendered, and so the range is higher then the size of glyphPositions array
TextArea don't work at all, I've got an empty rendering, while VisTextArea works overall well, it's broken just the selection, this is a screen of a VisTextArea rendering color markup string
It's a pity that VisUI does not support color markup just for this selection issue 😃
VisTextArea is mostly a copy of TextArea so something must have changed. I remember it working in TextArea (or TextField?) with issues.
I'm guessing fixing this requires parsing the text to remove color markup before it's used for selection and others functions. I'd nice if this was working in libGDX, I never wanted to change VisTextArea too much.
VisTextArea
and all its children (HighlightTextArea
,ScrollableTextArea
), crashes when color markup is enabled.Stacktrace:
I think that
start
andend
are not aware that markup glyphs are not rendered, and so the range is higher then the size ofglyphPositions
arrayvis-ui/ui/src/main/java/com/kotcrab/vis/ui/widget/VisTextArea.java
Lines 247 to 248 in 8b997f2
Where could be the right place to fix this? Thanks
The text was updated successfully, but these errors were encountered: