Hmmm, there are multiple ways, the easiest for not so great programmers (like I am) would be to manually set "i"
What I mean is, in quests.rpy the third string in quests.append(Quest("1st", "2nd", "this one" is the name for the tabs, so if you just have two like in my personal case (active and completed) you could try it like this:
Code: Select all
hbox:
imagebutton auto "path/to/file/active_%s.png" action [ SetField(log, "tvar", "Active"), log.newtab ]
imagebutton auto "path/to/file/completed_%s.png" action [ SetField(log, "tvar", "Completed"), log.newtab ]
That's how I'd do it.... if that doesn't work (for whatever reasons) I'd create a seperate list in which I'd store the strings for the buttons filepaths... something like this:
Code: Select all
buttons = ("path/to/file/active_%s.png", "path/to/file/completed_%s.png")
hbox:
for i,f in zip(log.displayedtabs(), buttons):
imagebutton auto f action [ SetField(log, "tvar", i), log.newtab ]
In the latter case, please make sure to have a button for each "3rd string" you add to the quests, so if you do more than just "Active" ("Completed" is the standard for finished quests which should be named in questlog.rpy line 373: class Questlog(Link): completion="Completed"): <- ) you'll need to add another button to it...
I'm not sure how it reacts to when there's no active quest though.... you'd have to try it yourself
Good luck