Enable/Disable scrolling... (EDIT, problem: auto-scroll restore)

I have a question...
The command to disable scrolling is : JS.eval ("scrollToEnd = function () {}")
But to restore it in the next room ?

Thanks for the replies ! ;)


Off the top of my head, I think you want:

JS.eval("addTextAndScroll = addText;")

to disable scrolling, and

JS.eval("addTextAndScroll = function(w) {addText(w); scrollToEnd();}")

to enable it again.

Remember that scrolling will always be enabled when loading a saved game unless you disable it in the UI initialisation script.


ah...Ok
and if i want to start with the scroll on the top ( cause long text that would be cut off), and then restore it (default auto-scrolling) in the room later ?

JS.eval("addTextAndScroll = addText;") keeps cutting my text, and you don't see the title because the auto-scrolling is ON.


-My structure: Room1 to Room 2

-1) ROOM 1 (room_prologue) > i can stop auto autoscrolling only with:

JS.eval ("scrollToEnd = function () {}")
msg ("BLABLABLABLABLABLABLABLA......... A VERY BIG WALL OF TEXT)
PrintCentered ("> PRESS ANY KEY TO CONTINUE <")
wait {
ClearScreen
MoveObject (player, room_start)
}

-2)ROOM 2 (room_start)> I can't restore autoscrolling !!!

JS.eval("addTextAndScroll = addText;") in room1 not working.....


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums