Open Toma400 opened 1 year ago
Considering ceab6f0, it would be fairly easy to make this system fully working like before, the case would be just to - for each option - make them list not only the option further, like this, for example:
elif mouseColliderPx(mn7[0], mn7[1], mn7[2], mn7[3]):
# go next
if guitype[1] == "religion" and dyn_screen.journey.stages[5] is True:
put_text(screen, text=langstring("ccrt__gen_category7"), font_cat="menu", size=30, align_x="left", pos_x=5, pos_y=58, colour=fCol.HOVERED.value)
if mouseRec(pg_events):
guitype[1] = switch_gscr(dyn_screen, screen, "origin")
dyn_screen.reset_pgui()
# go back
if guitype[1] == "gameplay_settings":
put_text(screen, text=langstring("ccrt__gen_category7"), font_cat="menu", size=30, align_x="left", pos_x=5, pos_y=58, colour=fCol.HOVERED.value)
if mouseRec(pg_events):
dyn_screen.journey.stages[7] = False
guitype[1] = switch_gscr(dyn_screen, screen, "origin")
dyn_screen.reset_pgui()
But make it so you have all next menus, but also all stages got reseted:
elif mouseColliderPx(mn7[0], mn7[1], mn7[2], mn7[3]):
# go next
if guitype[1] == "religion" and dyn_screen.journey.stages[5] is True:
put_text(screen, text=langstring("ccrt__gen_category7"), font_cat="menu", size=30, align_x="left", pos_x=5, pos_y=58, colour=fCol.HOVERED.value)
if mouseRec(pg_events):
guitype[1] = switch_gscr(dyn_screen, screen, "origin")
dyn_screen.reset_pgui()
# go back
if guitype[1] == "gameplay_settings" or guitype[1] == "summary":
put_text(screen, text=langstring("ccrt__gen_category7"), font_cat="menu", size=30, align_x="left", pos_x=5, pos_y=58, colour=fCol.HOVERED.value)
if mouseRec(pg_events):
dyn_screen.journey.stages[7] = False
dyn_screen.journey.stages[8] = False
guitype[1] = switch_gscr(dyn_screen, screen, "origin")
dyn_screen.reset_pgui()
Obviously this means more code, so before everything I'd suggest making some macro-like loop that will make it in one big checker (in similar style as this, however with memory that we are using variables here which are not as easily iterable). This way we won't end up with like 150 lines of code for simply changing buttons, but one loop with very complex if-system.
It is a bit of hassle, so I'm putting this as low priority and even pushing to pre-alpha 5, for the time being.
Note: I got this issue when handling #129, it seems like going back from name submenu to gender menu, despite changing gender, the names were still sticking to what was picked the first time (non-binary names were listing only female ones). Probably needs some resetting system or stricter check on clicked elements and their values.
During pre-alpha 3 development stage, there was an idea for smooth GUI in character creation space where you would just "climb" up next steps. This, however, had a significant downside: when clicking 'back' to revert previously agreed change, GUI would be messy and change states weirdly. I do not want playerbase to be bugged by this behaviour, but I also do not want to focus on this particular case before everything really needed is done (bugs take time and motivation). So, in 05d42e5 I locked backpedaling, allowing for predictable behaviour of menu.
This, however, should be reverted for convenience once all is made and I will have post-development time (most likely pre-alpha 4 or pre-alpha 5).