I'm having a little problem with a kind of journal system I've been using.
Basically there is a button in the main paying screen that the player can click to see a list of words they've been taught.
If they click any of those words, they will be shown an explanation of what the word means.
After a lot of messing around, it was working great, except for 1 problem...
Once I get a large list of vocabulary, I can't display them all. Any new words end up off screen.
I've been trying to figure out how to implement a good solution, such as having a scroll bar, or make it possible to have different pages. I should also mention that the list I want to show may have 200-500 words.
Code:
label aff_screen:
scene bg notebook
python:
ui.hbox()
# Column 1
ui.vbox(xpos=0, ypos=50, xanchor='left', yanchor='top') # this positions the text
if vocab_konbini > 9:
ui.textbutton("Konbini", clicked=ui.returns("dozo"))
ui.textbutton("Konbini2", clicked=ui.returns("dozo"))
ui.textbutton("Konbini3", clicked=ui.returns("dozo"))
ui.textbutton("Konbini4", clicked=ui.returns("dozo"))
ui.textbutton("Konbini5", clicked=ui.returns("dozo"))
ui.textbutton("Konbini6", clicked=ui.returns("dozo"))
ui.textbutton("Konbini7", clicked=ui.returns("dozo"))
ui.textbutton("Konbini", clicked=ui.returns("dozo"))
ui.textbutton("Konbini", clicked=ui.returns("dozo"))
ui.textbutton("Konbini", clicked=ui.returns("dozo"))
ui.textbutton("Konbini", clicked=ui.returns("dozo"))
ui.textbutton("Konbini", clicked=ui.returns("dozo"))
ui.textbutton("Konbini", clicked=ui.returns("dozo"))
ui.textbutton("Konbini", clicked=ui.returns("dozo"))
ui.textbutton("Konbini15", clicked=ui.returns("dozo"))
if vocab_ichi > 9:
ui.textbutton("Ichi", clicked=ui.returns("dozo"))
if vocab_ni > 9:
ui.textbutton("Ni", clicked=ui.returns("dozo"))
if vocab_san > 9:
ui.textbutton("San", clicked=ui.returns("dozo"))
if vocab_shi > 9:
ui.textbutton("Shi", clicked=ui.returns("dozo"))
if vocab_yon > 9:
ui.textbutton("Yon", clicked=ui.returns("dozo"))
if vocab_go > 9:
ui.textbutton("Go", clicked=ui.returns("dozo"))
if vocab_roku > 9:
ui.textbutton("Roku", clicked=ui.returns("dozo"))
if vocab_shichi > 9:
ui.textbutton("Shichi", clicked=ui.returns("dozo"))
if vocab_nana > 9:
ui.textbutton("Nana", clicked=ui.returns("dozo"))
if vocab_hachi > 9:
ui.textbutton("Hachi", clicked=ui.returns("dozo"))
if vocab_kyu > 9:
ui.textbutton("Kyu", clicked=ui.returns("dozo"))
if vocab_ju > 9:
ui.textbutton("Ju", clicked=ui.returns("dozo"))
if vocab_hyaku > 9:
ui.textbutton("Hyaku", clicked=ui.returns("dozo"))
if vocab_sen > 9:
ui.textbutton("Sen", clicked=ui.returns("dozo"))
if vocab_man > 9:
ui.textbutton("Man", clicked=ui.returns("dozo"))
ui.text("Last line")
ui.close() # for the vbox
ui.close() # for the hbox
ui.textbutton("", clicked=ui.returns("goback"))
ui.imagebutton("return.png", "return_hover.png", clicked=ui.returns("goback"), ypos=0, xpos=0)
$ picked = ui.interact()
if picked == "goback":
return
if picked == "dozo":
$ picked = "goback"
call explaindozo
jump aff_screen
PS: I know that I've repeated some words, and they all lead to the same explanation. That's because I wanted this to be easier to read for other people.
_________________
Working on a VN to teach lower-conversational Japanese, and a guide to living in Japan.
It's a very long dev process.
You could help me with my game A LOT by filling out this anonymous 10 question survey: http://www.surveymonkey.com/s/6GR57YBMassive thanks to everyone who has already filled it out!You can see a Q&A about the survey here:
http://tinyurl.com/SurveyQandA