hallowed-holiday-15370
02/28/2023, 4:46 PMhallowed-holiday-15370
02/28/2023, 4:46 PMhallowed-holiday-15370
02/28/2023, 4:48 PMFlxSubState.create after I fill in all my entries, I am doing scrollZone.vscrollPos = scrollZone.vscrollMax;
scrollZone is a ScrollViewhallowed-holiday-15370
02/28/2023, 4:52 PMensureVisible but it crashesbright-gpu-74537
02/28/2023, 4:57 PMhaxe
Toolkit.callLater(function() {
scrollZone.vscrollPos = scrollZone.vscrollMax;
});
> I also tried ensureVisible but it crashes
thats interesting, what did you pass ensureVisible?hallowed-holiday-15370
02/28/2023, 4:58 PMhx
var lastSpin:Box = null;
for (l in Globals.PlayState.log)
{
entryText = new GameText(0, 0, Std.int(scrollGrid.width), l, Colors.BLACK, SIZE_24);
entryBox = new Box();
entryBox.width = scrollGrid.width;
entryBox.height = entryText.height;
entryBox.add(entryText);
if (entryText.text.startsWith("Spin "))
lastSpin = entryBox;
scrollGrid.addComponent(entryBox);
}
scrollZone.ensureVisible(lastSpin);bright-gpu-74537
02/28/2023, 4:59 PMhallowed-holiday-15370
02/28/2023, 4:59 PMbright-gpu-74537
02/28/2023, 5:00 PMhallowed-holiday-15370
02/28/2023, 5:00 PMToolkit.callLater worked!hallowed-holiday-15370
02/28/2023, 5:00 PMhallowed-holiday-15370
02/28/2023, 5:01 PMensureVisible just scrolls up or down until that object is visible?bright-gpu-74537
02/28/2023, 5:02 PMbright-gpu-74537
02/28/2023, 5:02 PMhallowed-holiday-15370
02/28/2023, 5:03 PMensureVisible does not crash when I put it in the Toolkit.callLater but it does not work,either 😛
nbd I can mess with it laterbright-gpu-74537
02/28/2023, 5:04 PMbright-gpu-74537
02/28/2023, 5:04 PMwitty-island-52596
02/28/2023, 5:06 PMhallowed-holiday-15370
02/28/2023, 5:09 PMcallLater and it worked:
hx
Toolkit.callLater(() ->
{
scrollZone.vscrollPos = scrollZone.vscrollMax;
if (lastSpin != null)
Toolkit.callLater(() ->
{
scrollZone.ensureVisible(lastSpin);
});
});
( I want to have the most-recent Spin heading be at the top of the 'page')bright-gpu-74537
02/28/2023, 5:10 PMbright-gpu-74537
02/28/2023, 5:10 PMechoing-rainbow-13896
02/28/2023, 5:40 PMsource/Player.hx:6: characters 8-29 : Type not found : flixel.sound.FlxSound
source/Player.hx:13: characters 11-19 : Type not found : FlxSound
source/Player.hx:13: characters 11-19 : ... For function argument 'child'
source/Main.hx:6: lines 6-13 : ... Defined in this classechoing-rainbow-13896
02/28/2023, 6:06 PMechoing-rainbow-13896
02/28/2023, 6:07 PMmodern-quill-15664
02/28/2023, 6:52 PMshy-wire-69404
02/28/2023, 7:01 PMlittle-oxygen-79174
02/28/2023, 7:03 PMmodern-quill-15664
02/28/2023, 7:03 PMtall-teacher-57409
02/28/2023, 7:03 PMlittle-oxygen-79174
02/28/2023, 7:04 PM