The textbuttons on the right select a start and destination, and the screen calculates the route and displays it. It works, but with one problem: When I first click one of the buttons, nothing happens. When I click another button (or the same), the screen changes so it looks like it should BEFORE. Basically, the screen is always one button click behind.
This is how the buttons are declared (with a loop, of course):
Code: Select all
textbutton i.name action [SelectedIf(mapnach==i.name), SetVariable('mapnach', i.name), SetVariable('maproute', findroute(mapvon, mapnach)[0]), renpy.restart_interaction]
It's as if the screen is redrawn before the changes take place, but I restart the interaction last in the action list for the buttons. So what am I doing wrong?