Oh, that's an cool way to scroll text! I've usually just seen people use
viewports, so your method is pretty interesting.
Not entirely sure, but my hunch for why this is not working is that "if" statements checking for out-of-bounds values of "phone_offset" are only run once, when the screen is initially called. Since "phone_offset" is 0 initially, it just passes through without doing anything. Then when the "phone_offset" values get out-of-bounds, you get problems.
One way around this is to make the button actions conditional, so they won't go out-of-bounds in the first place. So maybe something like:
Code: Select all
textbutton _("Down") action If( (phone_offset+1 > len(m_len)-5), SetVariable('phone_offset', len(m_len)-5), SetVariable('phone_offset', phone_offset + 1))
textbutton _("Up") action If( (phone_offset-1 < 0), SetVariable('phone_offset', 0), SetVariable('phone_offset', phone_offset - 1))
An alternative way could be to hide and reshow the screen whenever you click a button, so the "if" statements will be rechecked each time. Since your screen has an entrance animation, however, you might have to define an alternate version without the animation (else the screen will "pop up" each time it is reshown).