When my app builds and loads, I want it to use a function to display a certain screen based off if the database is filled. If the database is filled, it will go to the main menu. If not, it will go to the startup screen.
Before trying this feature out, my app would return the kv builder with all my screens when it executes.
I am not sure the best way to do this or if I should create a function inside the screen manager class? Trying to do that and triggering it with using on_pre_enter and it did not work.
Example:
class WindowManager(ScreenManager):
pass
kv = Builder.load_file('kvs/new_window.kv')
class AwesomeApp(App):
def build(self):
if check_for_admin_info() != 0:
kv.current = 'admin_name_window'
else:
kv.current = 'main'
return kv
Thank you in advance!!
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
kivy-users+...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/kivy-users/fa7e8a6a-886b-4eb7-9d22-36bed7ad73den%40googlegroups.com.