diff --git a/img/about_vrct/dev_misya.png b/img/about_vrct/dev_misya.png index 4f5c2702..60317fff 100644 Binary files a/img/about_vrct/dev_misya.png and b/img/about_vrct/dev_misya.png differ diff --git a/img/about_vrct/dev_shiina.png b/img/about_vrct/dev_shiina.png index 1be39941..63b5785e 100644 Binary files a/img/about_vrct/dev_shiina.png and b/img/about_vrct/dev_shiina.png differ diff --git a/img/about_vrct/poster_images_authors.png b/img/about_vrct/poster_images_authors.png deleted file mode 100644 index 83c4086a..00000000 Binary files a/img/about_vrct/poster_images_authors.png and /dev/null differ diff --git a/img/about_vrct/poster_images_authors_en.png b/img/about_vrct/poster_images_authors_en.png new file mode 100644 index 00000000..c3488c62 Binary files /dev/null and b/img/about_vrct/poster_images_authors_en.png differ diff --git a/img/about_vrct/poster_images_authors_ja.png b/img/about_vrct/poster_images_authors_ja.png new file mode 100644 index 00000000..3f2b1b00 Binary files /dev/null and b/img/about_vrct/poster_images_authors_ja.png differ diff --git a/img/about_vrct/poster_images_authors_m_en.png b/img/about_vrct/poster_images_authors_m_en.png new file mode 100644 index 00000000..95241ae1 Binary files /dev/null and b/img/about_vrct/poster_images_authors_m_en.png differ diff --git a/img/about_vrct/poster_images_authors_m_ja.png b/img/about_vrct/poster_images_authors_m_ja.png new file mode 100644 index 00000000..28df62d0 Binary files /dev/null and b/img/about_vrct/poster_images_authors_m_ja.png differ diff --git a/img/about_vrct/poster_showcase_pagination_button.png b/img/about_vrct/poster_showcase_pagination_button.png index 917879e5..bbfee311 100644 Binary files a/img/about_vrct/poster_showcase_pagination_button.png and b/img/about_vrct/poster_showcase_pagination_button.png differ diff --git a/img/about_vrct/showcased_worlds/bar_asagao.png b/img/about_vrct/showcased_worlds/bar_asagao.png new file mode 100644 index 00000000..001523b4 Binary files /dev/null and b/img/about_vrct/showcased_worlds/bar_asagao.png differ diff --git a/img/about_vrct/showcased_worlds/cafe_cian.png b/img/about_vrct/showcased_worlds/cafe_cian.png new file mode 100644 index 00000000..f8f5e8c3 Binary files /dev/null and b/img/about_vrct/showcased_worlds/cafe_cian.png differ diff --git a/img/about_vrct/showcased_worlds/coffee_keisyoku_chakachaka.png b/img/about_vrct/showcased_worlds/coffee_keisyoku_chakachaka.png new file mode 100644 index 00000000..47bbc41a Binary files /dev/null and b/img/about_vrct/showcased_worlds/coffee_keisyoku_chakachaka.png differ diff --git a/img/about_vrct/showcased_worlds/ehon_no_heikousekai_jimusho.png b/img/about_vrct/showcased_worlds/ehon_no_heikousekai_jimusho.png index 0d791d41..2e2b64cf 100644 Binary files a/img/about_vrct/showcased_worlds/ehon_no_heikousekai_jimusho.png and b/img/about_vrct/showcased_worlds/ehon_no_heikousekai_jimusho.png differ diff --git a/img/about_vrct/showcased_worlds/ikoiba.png b/img/about_vrct/showcased_worlds/ikoiba.png index 887e38a7..04a85165 100644 Binary files a/img/about_vrct/showcased_worlds/ikoiba.png and b/img/about_vrct/showcased_worlds/ikoiba.png differ diff --git a/img/about_vrct/showcased_worlds/ippaidou.png b/img/about_vrct/showcased_worlds/ippaidou.png index 32fcf8f6..9d673f61 100644 Binary files a/img/about_vrct/showcased_worlds/ippaidou.png and b/img/about_vrct/showcased_worlds/ippaidou.png differ diff --git a/img/about_vrct/showcased_worlds/japanese_culture_osenbeito.png b/img/about_vrct/showcased_worlds/japanese_culture_osenbeito.png index 89cf6cdc..fc8f2b36 100644 Binary files a/img/about_vrct/showcased_worlds/japanese_culture_osenbeito.png and b/img/about_vrct/showcased_worlds/japanese_culture_osenbeito.png differ diff --git a/img/about_vrct/showcased_worlds/kimodameshi.png b/img/about_vrct/showcased_worlds/kimodameshi.png index 8edc40ab..7bee627b 100644 Binary files a/img/about_vrct/showcased_worlds/kimodameshi.png and b/img/about_vrct/showcased_worlds/kimodameshi.png differ diff --git a/img/about_vrct/showcased_worlds/kokekkopiyopiyo.png b/img/about_vrct/showcased_worlds/kokekkopiyopiyo.png index 8d14c615..dc59ee56 100644 Binary files a/img/about_vrct/showcased_worlds/kokekkopiyopiyo.png and b/img/about_vrct/showcased_worlds/kokekkopiyopiyo.png differ diff --git a/img/about_vrct/showcased_worlds/kuroinu_work_room.png b/img/about_vrct/showcased_worlds/kuroinu_work_room.png index fb07e680..c7cb7209 100644 Binary files a/img/about_vrct/showcased_worlds/kuroinu_work_room.png and b/img/about_vrct/showcased_worlds/kuroinu_work_room.png differ diff --git a/img/about_vrct/showcased_worlds/language_exchange_tervern.png b/img/about_vrct/showcased_worlds/language_exchange_tervern.png index b014157c..17470129 100644 Binary files a/img/about_vrct/showcased_worlds/language_exchange_tervern.png and b/img/about_vrct/showcased_worlds/language_exchange_tervern.png differ diff --git a/img/about_vrct/showcased_worlds/mamehinata_dogrun.png b/img/about_vrct/showcased_worlds/mamehinata_dogrun.png new file mode 100644 index 00000000..da443ffe Binary files /dev/null and b/img/about_vrct/showcased_worlds/mamehinata_dogrun.png differ diff --git a/img/about_vrct/showcased_worlds/monogatari_meetup.png b/img/about_vrct/showcased_worlds/monogatari_meetup.png new file mode 100644 index 00000000..3f10ed22 Binary files /dev/null and b/img/about_vrct/showcased_worlds/monogatari_meetup.png differ diff --git a/img/about_vrct/showcased_worlds/nihongokurabu.png b/img/about_vrct/showcased_worlds/nihongokurabu.png index 35c2516a..9425e0b5 100644 Binary files a/img/about_vrct/showcased_worlds/nihongokurabu.png and b/img/about_vrct/showcased_worlds/nihongokurabu.png differ diff --git a/img/about_vrct/showcased_worlds/parallel_collar.png b/img/about_vrct/showcased_worlds/parallel_collar.png index 696f8257..fae8c770 100644 Binary files a/img/about_vrct/showcased_worlds/parallel_collar.png and b/img/about_vrct/showcased_worlds/parallel_collar.png differ diff --git a/img/about_vrct/showcased_worlds/re_yatuha_room.png b/img/about_vrct/showcased_worlds/re_yatuha_room.png index cf3de080..505c63a1 100644 Binary files a/img/about_vrct/showcased_worlds/re_yatuha_room.png and b/img/about_vrct/showcased_worlds/re_yatuha_room.png differ diff --git a/img/about_vrct/showcased_worlds/silakan_datang_ke_rumahku.png b/img/about_vrct/showcased_worlds/silakan_datang_ke_rumahku.png index 6af82d4b..12071f1e 100644 Binary files a/img/about_vrct/showcased_worlds/silakan_datang_ke_rumahku.png and b/img/about_vrct/showcased_worlds/silakan_datang_ke_rumahku.png differ diff --git a/img/about_vrct/showcased_worlds/study_japanese_world_japanichijou.png b/img/about_vrct/showcased_worlds/study_japanese_world_japanichijou.png index 308cbcb1..95a4cf67 100644 Binary files a/img/about_vrct/showcased_worlds/study_japanese_world_japanichijou.png and b/img/about_vrct/showcased_worlds/study_japanese_world_japanichijou.png differ diff --git a/img/about_vrct/showcased_worlds/sushi_stand_guruguru.png b/img/about_vrct/showcased_worlds/sushi_stand_guruguru.png new file mode 100644 index 00000000..4ea74eaa Binary files /dev/null and b/img/about_vrct/showcased_worlds/sushi_stand_guruguru.png differ diff --git a/img/about_vrct/showcased_worlds/tyuuniti_kouryuukai.png b/img/about_vrct/showcased_worlds/tyuuniti_kouryuukai.png new file mode 100644 index 00000000..ad6c10a7 Binary files /dev/null and b/img/about_vrct/showcased_worlds/tyuuniti_kouryuukai.png differ diff --git a/img/about_vrct/showcased_worlds/uj_club.png b/img/about_vrct/showcased_worlds/uj_club.png index 4f893ba3..9118f48f 100644 Binary files a/img/about_vrct/showcased_worlds/uj_club.png and b/img/about_vrct/showcased_worlds/uj_club.png differ diff --git a/img/about_vrct/showcased_worlds/usanezumi_shrine2.png b/img/about_vrct/showcased_worlds/usanezumi_shrine2.png index 1daf3be4..f10cce6c 100644 Binary files a/img/about_vrct/showcased_worlds/usanezumi_shrine2.png and b/img/about_vrct/showcased_worlds/usanezumi_shrine2.png differ diff --git a/img/about_vrct/showcased_worlds/yuttari_eikaiwa.png b/img/about_vrct/showcased_worlds/yuttari_eikaiwa.png index 3b87da74..c9616217 100644 Binary files a/img/about_vrct/showcased_worlds/yuttari_eikaiwa.png and b/img/about_vrct/showcased_worlds/yuttari_eikaiwa.png differ diff --git a/img/about_vrct/special_thanks_members.png b/img/about_vrct/special_thanks_members.png index 75e98aa4..15487230 100644 Binary files a/img/about_vrct/special_thanks_members.png and b/img/about_vrct/special_thanks_members.png differ diff --git a/img/about_vrct/vrct_posters/iya_vrct_manga_en.png b/img/about_vrct/vrct_posters/iya_vrct_manga_en.png new file mode 100644 index 00000000..f73e762a Binary files /dev/null and b/img/about_vrct/vrct_posters/iya_vrct_manga_en.png differ diff --git a/img/about_vrct/vrct_posters/iya_vrct_manga_ja.png b/img/about_vrct/vrct_posters/iya_vrct_manga_ja.png new file mode 100644 index 00000000..3fc0ff40 Binary files /dev/null and b/img/about_vrct/vrct_posters/iya_vrct_manga_ja.png differ diff --git a/img/about_vrct/vrct_posters/iya_vrct_manga_ko.png b/img/about_vrct/vrct_posters/iya_vrct_manga_ko.png new file mode 100644 index 00000000..e40f769c Binary files /dev/null and b/img/about_vrct/vrct_posters/iya_vrct_manga_ko.png differ diff --git a/img/about_vrct/vrct_posters/iya_vrct_poster_cn.png b/img/about_vrct/vrct_posters/iya_vrct_poster_cn.png index c2780f3a..6e3a5be4 100644 Binary files a/img/about_vrct/vrct_posters/iya_vrct_poster_cn.png and b/img/about_vrct/vrct_posters/iya_vrct_poster_cn.png differ diff --git a/img/about_vrct/vrct_posters/iya_vrct_poster_en.png b/img/about_vrct/vrct_posters/iya_vrct_poster_en.png index fe1865d5..22352320 100644 Binary files a/img/about_vrct/vrct_posters/iya_vrct_poster_en.png and b/img/about_vrct/vrct_posters/iya_vrct_poster_en.png differ diff --git a/img/about_vrct/vrct_posters/iya_vrct_poster_ja.png b/img/about_vrct/vrct_posters/iya_vrct_poster_ja.png index 4fb2596e..041d346e 100644 Binary files a/img/about_vrct/vrct_posters/iya_vrct_poster_ja.png and b/img/about_vrct/vrct_posters/iya_vrct_poster_ja.png differ diff --git a/img/about_vrct/vrct_posters/iya_vrct_poster_ko.png b/img/about_vrct/vrct_posters/iya_vrct_poster_ko.png new file mode 100644 index 00000000..268a6e24 Binary files /dev/null and b/img/about_vrct/vrct_posters/iya_vrct_poster_ko.png differ diff --git a/utils.py b/utils.py index 55d3c479..b80923f8 100644 --- a/utils.py +++ b/utils.py @@ -61,8 +61,10 @@ def renameWeightFolder(path): if os_path.exists(weight_path): os_rename(weight_path, os_path.join(path, "weights")) -def splitListRandomly(lst, split_count): - random.shuffle(lst) +def splitList(lst:list, split_count:int, to_shuffle:bool=False): + if to_shuffle is True: + random.shuffle(lst) + split_lists = [] for i in range(0, len(lst), split_count): sub_list = lst[i:i+split_count] diff --git a/view.py b/view.py index 4623d49b..989847b9 100644 --- a/view.py +++ b/view.py @@ -607,8 +607,11 @@ class View(): # About VRCT Tab CALLBACK_OPEN_WEBPAGE_ABOUT_VRCT=self.openWebPage_AboutVrct, + CALLBACK_ABOUT_VRCT_POSTER_NEXT_BUTTON=None, CALLBACK_ABOUT_VRCT_POSTER_PREV_BUTTON=None, + CALLBACK_ABOUT_VRCT_POSTER_IMAGE_CURRENT_PAGE_NUM=0, + CALLBACK_ABOUT_VRCT_CHANGE_POSTER_SHOWCASE_WORLD_LIST=None, CALLBACK_ABOUT_VRCT_POSTER_SHOWCASE_CURRENT_PAGE_NUM=0, ) @@ -1119,7 +1122,7 @@ class View(): def openWebPage_DeepL_Auth_Key(self): self.openWebPage(config.DEEPL_AUTH_KEY_PAGE_URL) - def openWebPage_AboutVrct(self, target_type:str): + def openWebPage_AboutVrct(self, target_type:str, arg=None): url = "" match (target_type): case ("X_MISYA"): @@ -1159,6 +1162,14 @@ class View(): case ("SUPPORTER_REGISTRATION"): url = "https://docs.google.com/forms/d/e/1FAIpQLSepLzdEOTJQFVHdOOxAA0dix3zCmnNBlmH4XWon5FldXkIiqw/viewform" + + case ("X_SHIINA_POSTER_SHOWCASE_POST"): + if arg is None: + print("arg that received is None. it mus be something number") + return + url = "https://twitter.com/Shiina_12siy/status/" + arg + + case "TEMP": print("here is still under construction.") return diff --git a/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/createSideMenuAndSettingsBoxContainers.py b/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/createSideMenuAndSettingsBoxContainers.py index c6f55358..d70a0eba 100644 --- a/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/createSideMenuAndSettingsBoxContainers.py +++ b/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/createSideMenuAndSettingsBoxContainers.py @@ -35,7 +35,7 @@ def createSideMenuAndSettingsBoxContainers(config_window, settings, view_variabl config_window.side_menu_bg_container.grid_columnconfigure(0, weight=1) config_window.side_menu_bg_container.grid_rowconfigure(0, weight=1) config_window.side_menu_container = CTkFrame(config_window.side_menu_bg_container, corner_radius=0, fg_color=settings.ctm.SIDE_MENU_LABELS_BG_FOR_FAKE_BORDER_COLOR, width=0, height=0) - config_window.side_menu_container.grid(row=0, column=0, padx=settings.uism.TOP_BAR_SIDE__TITLE_PADX, pady=settings.uism.SIDE_MENU_TOP_PADY, sticky="nsew") + config_window.side_menu_container.grid(row=0, column=0, padx=settings.uism.TOP_BAR_SIDE__TITLE_PADX, pady=settings.uism.SIDE_MENU_PADY, sticky="nsew") diff --git a/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_about_vrct/about_vrct_store.py b/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_about_vrct/about_vrct_store.py new file mode 100644 index 00000000..a431619f --- /dev/null +++ b/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_about_vrct/about_vrct_store.py @@ -0,0 +1,122 @@ +poster_showcase_worlds_settings = [ + # トサカひよ + { + "author_name": "tosaka_hiyo", + "data": [ + { "image_file_name": "kokekkopiyopiyo.png", "x_post_num": "1779076974369276014" }, + ] + }, + + # MiuJepang + { + "author_name": "miu_jepang", + "data": [ + { "image_file_name": "ippaidou.png", "x_post_num": None }, + { "image_file_name": "nihongokurabu.png", "x_post_num": "1779004631936614893" }, + { "image_file_name": "language_exchange_tervern.png", "x_post_num": "1779749425923150317" }, + { "image_file_name": "japanese_culture_osenbeito.png", "x_post_num": None }, + { "image_file_name": "silakan_datang_ke_rumahku.png", "x_post_num": None }, + { "image_file_name": "uj_club.png", "x_post_num": "1780791654196388201" }, + { "image_file_name": "sushi_stand_guruguru.png", "x_post_num": None }, + ] + }, + + # poposuke_sig + { + "author_name": "poposuke_sig", + "data": [ + { "image_file_name": "usanezumi_shrine2.png", "x_post_num": "1781224020383506649" }, + ] + }, + + # KUROINU_YOUHEI + { + "author_name": "kuroinu_youhei", + "data": [ + { "image_file_name": "kuroinu_work_room.png", "x_post_num": "1779750007564112146" }, + ] + }, + + # いちや_ICHIYA + { + "author_name": "ichiya", + "data": [ + { "image_file_name": "ehon_no_heikousekai_jimusho.png", "x_post_num": "1780792306976850285" }, + { "image_file_name": "ikoiba.png", "x_post_num": "1782723006923780580" }, + { "image_file_name": "kimodameshi.png", "x_post_num": "1781224391692714133" }, + { "image_file_name": "parallel_collar.png", "x_post_num": None }, + ] + }, + + # HayaTikaze + { + "author_name": "haya_tikaze", + "data": [ + { "image_file_name": "study_japanese_world_japanichijou.png", "x_post_num": "1781539871829766550" }, + ] + }, + + # aji_3 + { + "author_name": "aji_3", + "data": [ + { "image_file_name": "yuttari_eikaiwa.png", "x_post_num": "1779002892999078046" }, + ] + }, + + # 八葉そるち + { + "author_name": "yatuha_soruti", + "data": [ + { "image_file_name": "re_yatuha_room.png", "x_post_num": "1779830390435590196" }, + ] + }, + + # chakamoto + { + "author_name": "chakamoto", + "data": [ + { "image_file_name": "coffee_keisyoku_chakachaka.png", "x_post_num": None }, + ] + }, + + # MloYolM (よるむ) + { + "author_name": "yolm", + "data": [ + { "image_file_name": "cafe_cian.png", "x_post_num": None }, + ] + }, + + # ミラクル・オルカ + { + "author_name": "miracle_orca", + "data": [ + { "image_file_name": "mamehinata_dogrun.png", "x_post_num": "1782723423179100471" }, + ] + }, + + # いんく(Eenkoo) + { + "author_name": "eenkoo", + "data": [ + { "image_file_name": "tyuuniti_kouryuukai.png", "x_post_num": None }, + ] + }, + + # 1ban_meno + { + "author_name": "1ban_meno", + "data": [ + { "image_file_name": "bar_asagao.png", "x_post_num": None }, + ] + }, + + # 沈黙静寂 + { + "author_name": "sizudama_sizusabi", + "data": [ + { "image_file_name": "monogatari_meetup.png", "x_post_num": "1781538415789674976" }, + ] + }, +] \ No newline at end of file diff --git a/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_about_vrct/createSettingBox_AboutVrct.py b/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_about_vrct/createSettingBox_AboutVrct.py index 6b097984..a8acee73 100644 --- a/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_about_vrct/createSettingBox_AboutVrct.py +++ b/vrct_gui/config_window/widgets/createSideMenuAndSettingsBoxContainers/setting_box_containers/setting_box_about_vrct/createSettingBox_AboutVrct.py @@ -1,8 +1,10 @@ +from random import randint from types import SimpleNamespace from customtkinter import CTkFrame, CTkLabel, CTkImage, CTkFont -from utils import callFunctionIfCallable, splitListRandomly +from utils import callFunctionIfCallable, splitList from ......ui_utils import bindButtonFunctionAndColor, animateRotation, bindEnterAndLeaveFunction +from .about_vrct_store import poster_showcase_worlds_settings def createSettingBox_AboutVrct(setting_box_wrapper, config_window, settings, view_variable): setting_box_wrapper.grid_columnconfigure(0, weight=1, minsize=settings.uism.MAIN_AREA_MIN_WIDTH) @@ -49,9 +51,10 @@ def createSettingBox_AboutVrct(setting_box_wrapper, config_window, settings, vie each_button = settings.about_vrct.embedImageButtonCTkLabel( parent_frame=parent_frame, image_file_name=each_setting["image_file_name"], - callback=each_setting["callback"], + callback=each_setting.get("callback", None), directly_type=directly_type, corner_radius=corner_radius, + no_bind=each_setting.get("no_bind", False), ) each_button.grid(column=0, row=button_row, padx=0, pady=(0, bottom_pady), sticky="nsew") each_button.img_label.grid(padx=ipadx, pady=ipady, sticky="nsew") @@ -293,74 +296,25 @@ def createSettingBox_AboutVrct(setting_box_wrapper, config_window, settings, vie poster_showcase_worlds.grid_columnconfigure(0, weight=1) - poster_showcase_worlds_settings = [ - { - "image_file_name": "ehon_no_heikousekai_jimusho.png", - "callback": lambda _e: callFunctionIfCallable(view_variable.CALLBACK_OPEN_WEBPAGE_ABOUT_VRCT, "TEMP") - }, - { - "image_file_name": "ikoiba.png", - "callback": lambda _e: callFunctionIfCallable(view_variable.CALLBACK_OPEN_WEBPAGE_ABOUT_VRCT, "TEMP") - }, - { - "image_file_name": "ippaidou.png", - "callback": lambda _e: callFunctionIfCallable(view_variable.CALLBACK_OPEN_WEBPAGE_ABOUT_VRCT, "TEMP") - }, - { - "image_file_name": "japanese_culture_osenbeito.png", - "callback": lambda _e: callFunctionIfCallable(view_variable.CALLBACK_OPEN_WEBPAGE_ABOUT_VRCT, "TEMP") - }, - { - "image_file_name": "kimodameshi.png", - "callback": lambda _e: callFunctionIfCallable(view_variable.CALLBACK_OPEN_WEBPAGE_ABOUT_VRCT, "TEMP") - }, - { - "image_file_name": "kokekkopiyopiyo.png", - "callback": lambda _e: callFunctionIfCallable(view_variable.CALLBACK_OPEN_WEBPAGE_ABOUT_VRCT, "TEMP") - }, - { - "image_file_name": "kuroinu_work_room.png", - "callback": lambda _e: callFunctionIfCallable(view_variable.CALLBACK_OPEN_WEBPAGE_ABOUT_VRCT, "TEMP") - }, - { - "image_file_name": "language_exchange_tervern.png", - "callback": lambda _e: callFunctionIfCallable(view_variable.CALLBACK_OPEN_WEBPAGE_ABOUT_VRCT, "TEMP") - }, - { - "image_file_name": "nihongokurabu.png", - "callback": lambda _e: callFunctionIfCallable(view_variable.CALLBACK_OPEN_WEBPAGE_ABOUT_VRCT, "TEMP") - }, - { - "image_file_name": "parallel_collar.png", - "callback": lambda _e: callFunctionIfCallable(view_variable.CALLBACK_OPEN_WEBPAGE_ABOUT_VRCT, "TEMP") - }, - { - "image_file_name": "re_yatuha_room.png", - "callback": lambda _e: callFunctionIfCallable(view_variable.CALLBACK_OPEN_WEBPAGE_ABOUT_VRCT, "TEMP") - }, - { - "image_file_name": "silakan_datang_ke_rumahku.png", - "callback": lambda _e: callFunctionIfCallable(view_variable.CALLBACK_OPEN_WEBPAGE_ABOUT_VRCT, "TEMP") - }, - { - "image_file_name": "study_japanese_world_japanichijou.png", - "callback": lambda _e: callFunctionIfCallable(view_variable.CALLBACK_OPEN_WEBPAGE_ABOUT_VRCT, "TEMP") - }, - { - "image_file_name": "uj_club.png", - "callback": lambda _e: callFunctionIfCallable(view_variable.CALLBACK_OPEN_WEBPAGE_ABOUT_VRCT, "TEMP") - }, - { - "image_file_name": "usanezumi_shrine2.png", - "callback": lambda _e: callFunctionIfCallable(view_variable.CALLBACK_OPEN_WEBPAGE_ABOUT_VRCT, "TEMP") - }, - { - "image_file_name": "yuttari_eikaiwa.png", - "callback": lambda _e: callFunctionIfCallable(view_variable.CALLBACK_OPEN_WEBPAGE_ABOUT_VRCT, "TEMP") - }, - ] - result = splitListRandomly(poster_showcase_worlds_settings, 8) + compounded_poster_showcase_worlds_list = [] + for each_author_settings in poster_showcase_worlds_settings: + for data in each_author_settings["data"]: + if data["x_post_num"] is None: + append_settings = { + "image_file_name": data["image_file_name"], + "no_bind": True, + } + else: + x_post_num = data["x_post_num"] + callback = lambda _e,arg=x_post_num: view_variable.CALLBACK_OPEN_WEBPAGE_ABOUT_VRCT("X_SHIINA_POSTER_SHOWCASE_POST", arg) + append_settings = { + "image_file_name": data["image_file_name"], + "callback": callback, + } + compounded_poster_showcase_worlds_list.append(append_settings) + + result = splitList(compounded_poster_showcase_worlds_list, 8) poster_showcase_worlds_frame_list = [] for split_poster_showcase_worlds_settings in result: poster_showcase_worlds_frame = CTkFrame(poster_showcase_worlds_wrapper, fg_color=ABOUT_VRCT_BG, corner_radius=0, width=0, height=0) @@ -381,18 +335,30 @@ def createSettingBox_AboutVrct(setting_box_wrapper, config_window, settings, vie pagination_button_settings = settings.about_vrct.image_file.POSTER_SHOWCASE_WORLD_PAGINATION_BUTTON - def toNextPagePosterShowcase(current_function_index): + def defineAngles(index): + start_angle = 0 + goal_angle = 90 + if index == 0: + start_angle = 0 + goal_angle = 90 + elif index == 1: + start_angle = 90 + goal_angle = 180 + elif index == 2: + start_angle = 180 + goal_angle = 360 + return(start_angle, goal_angle) + + def toNextPagePosterShowcase(): + current_function_index = view_variable.CALLBACK_ABOUT_VRCT_POSTER_SHOWCASE_CURRENT_PAGE_NUM view_variable.CALLBACK_ABOUT_VRCT_CHANGE_POSTER_SHOWCASE_WORLD_LIST=None poster_showcase_worlds_frame_list[current_function_index].grid_remove() + pre_function_index = current_function_index current_function_index = (current_function_index + 1) % len(poster_showcase_worlds_frame_list) poster_showcase_worlds_frame_list[current_function_index].grid(column=0, row=0, padx=0, pady=(0,about_vrct_uism.POSTER_SHOWCASE_WORLD_BOTTOM_PADY), sticky="nsew") view_variable.CALLBACK_ABOUT_VRCT_POSTER_SHOWCASE_CURRENT_PAGE_NUM = current_function_index - start_angle = 0 - goal_angle = 180 - if current_function_index == 0: - start_angle = 180 - goal_angle = 360 + start_angle, goal_angle = defineAngles(pre_function_index) animateRotation( tk_root=config_window, @@ -410,22 +376,26 @@ def createSettingBox_AboutVrct(setting_box_wrapper, config_window, settings, vie # Initialize view_variable.CALLBACK_ABOUT_VRCT_CHANGE_POSTER_SHOWCASE_WORLD_LIST=toNextPagePosterShowcase + view_variable.CALLBACK_ABOUT_VRCT_POSTER_SHOWCASE_CURRENT_PAGE_NUM = randint(0, len(poster_showcase_worlds_frame_list)-1) - poster_showcase_worlds_frame_list[0].grid(column=0, row=0, padx=0, pady=(0,about_vrct_uism.POSTER_SHOWCASE_WORLD_BOTTOM_PADY), sticky="nsew") + start_angle, _goal_angle = defineAngles(view_variable.CALLBACK_ABOUT_VRCT_POSTER_SHOWCASE_CURRENT_PAGE_NUM) + + poster_showcase_worlds_frame_list[view_variable.CALLBACK_ABOUT_VRCT_POSTER_SHOWCASE_CURRENT_PAGE_NUM].grid(column=0, row=0, padx=0, pady=(0,about_vrct_uism.POSTER_SHOWCASE_WORLD_BOTTOM_PADY), sticky="nsew") poster_showcase_worlds_wrapper.grid_rowconfigure(1, weight=1) poster_showcase_pagination_button_wrapper = CTkFrame(poster_showcase_worlds_wrapper, fg_color=ABOUT_VRCT_BG, corner_radius=0, width=0, height=0) - poster_showcase_pagination_button_wrapper.grid(column=0, row=2, padx=0, pady=0, sticky="nsew") + poster_showcase_pagination_button_wrapper.grid(column=0, row=2, padx=0, pady=(0, about_vrct_uism.POSTER_SHOWCASE_WORLD_PAGINATION_BUTTON_BOTTOM_PADY), sticky="nsew") poster_showcase_pagination_button_wrapper.grid_columnconfigure((0,2), weight=1) config_window.poster_showcase_pagination_button = settings.about_vrct.embedImageButtonCTkLabel( parent_frame=poster_showcase_pagination_button_wrapper, image_file_name="poster_showcase_pagination_button.png", - callback=lambda _e: callFunctionIfCallable(view_variable.CALLBACK_ABOUT_VRCT_CHANGE_POSTER_SHOWCASE_WORLD_LIST, view_variable.CALLBACK_ABOUT_VRCT_POSTER_SHOWCASE_CURRENT_PAGE_NUM), + callback=lambda _e: callFunctionIfCallable(view_variable.CALLBACK_ABOUT_VRCT_CHANGE_POSTER_SHOWCASE_WORLD_LIST), hovered_color="transparent", clicked_color="transparent", + rotate_angle=-start_angle # for clockwise angle, put negative "-" ) config_window.poster_showcase_pagination_button.grid(column=1, row=0, padx=0, pady=0, sticky="nsew") @@ -434,11 +404,11 @@ def createSettingBox_AboutVrct(setting_box_wrapper, config_window, settings, vie poster_showcase_pagination_button_chato = settings.about_vrct.embedImageButtonCTkLabel( parent_frame=poster_showcase_pagination_button_wrapper, image_file_name="poster_showcase_pagination_button_chato.png", - callback=lambda _e: callFunctionIfCallable(view_variable.CALLBACK_ABOUT_VRCT_CHANGE_POSTER_SHOWCASE_WORLD_LIST, view_variable.CALLBACK_ABOUT_VRCT_POSTER_SHOWCASE_CURRENT_PAGE_NUM), + callback=lambda _e: callFunctionIfCallable(view_variable.CALLBACK_ABOUT_VRCT_CHANGE_POSTER_SHOWCASE_WORLD_LIST), hovered_color="transparent", clicked_color="transparent", ) - poster_showcase_pagination_button_chato.place(relx=0.5, rely=0.5, anchor="center") + poster_showcase_pagination_button_chato.place(relx=0.502, rely=0.51, anchor="center") pagination_button_chato_settings = settings.about_vrct.image_file.POSTER_SHOWCASE_WORLD_PAGINATION_BUTTON_CHATO @@ -494,40 +464,107 @@ def createSettingBox_AboutVrct(setting_box_wrapper, config_window, settings, vie ) - # For change the image, register to config_window - config_window.poster_image_frame__iya_vrct_poster_ja = settings.about_vrct.embedImageCTkLabel(poster_images_wrapper, "iya_vrct_poster_ja.png", directly_type="vrct_posters") - config_window.poster_image_frame__iya_vrct_poster_en = settings.about_vrct.embedImageCTkLabel(poster_images_wrapper, "iya_vrct_poster_en.png", directly_type="vrct_posters") - config_window.poster_image_frame__iya_vrct_poster_cn = settings.about_vrct.embedImageCTkLabel(poster_images_wrapper, "iya_vrct_poster_cn.png", directly_type="vrct_posters") + poster_image_frame_settings_list = [ + { + "file_name": "iya_vrct_poster_ja.png", + "poster_type": "poster", + }, + { + "file_name": "iya_vrct_poster_en.png", + "poster_type": "poster", + }, + { + "file_name": "iya_vrct_poster_cn.png", + "poster_type": "poster", + }, + { + "file_name": "iya_vrct_poster_ko.png", + "poster_type": "poster", + }, + { + "file_name": "iya_vrct_manga_ja.png", + "poster_type": "manga", + }, + { + "file_name": "iya_vrct_manga_en.png", + "poster_type": "manga", + }, + { + "file_name": "iya_vrct_manga_ko.png", + "poster_type": "manga", + }, + ] - config_window.poster_image_frame_dict = { - "iya_vrct_poster_ja": config_window.poster_image_frame__iya_vrct_poster_ja, - "iya_vrct_poster_en": config_window.poster_image_frame__iya_vrct_poster_en, - "iya_vrct_poster_cn": config_window.poster_image_frame__iya_vrct_poster_cn, - } - def vrctPostersGridRemove(): - for poster_frame in config_window.poster_image_frame_dict.values(): - poster_frame.grid_remove() + poster_frame_list = [] + for poster_frame_settings in poster_image_frame_settings_list: + poster_frame = settings.about_vrct.embedImageCTkLabel(poster_images_wrapper, poster_frame_settings["file_name"], directly_type="vrct_posters") + poster_frame_list.append(poster_frame) - def gridVrctPoster_Ja(): - vrctPostersGridRemove() - config_window.poster_image_frame_dict["iya_vrct_poster_ja"].grid(column=1, row=0, padx=0, pady=0, sticky="nsew") - view_variable.CALLBACK_ABOUT_VRCT_POSTER_PREV_BUTTON=gridVrctPoster_Cn - view_variable.CALLBACK_ABOUT_VRCT_POSTER_NEXT_BUTTON=gridVrctPoster_En - def gridVrctPoster_En(): - vrctPostersGridRemove() - config_window.poster_image_frame_dict["iya_vrct_poster_en"].grid(column=1, row=0, padx=0, pady=0, sticky="nsew") - view_variable.CALLBACK_ABOUT_VRCT_POSTER_PREV_BUTTON=gridVrctPoster_Ja - view_variable.CALLBACK_ABOUT_VRCT_POSTER_NEXT_BUTTON=gridVrctPoster_Cn - def gridVrctPoster_Cn(): - vrctPostersGridRemove() - config_window.poster_image_frame_dict["iya_vrct_poster_cn"].grid(column=1, row=0, padx=0, pady=0, sticky="nsew") - view_variable.CALLBACK_ABOUT_VRCT_POSTER_PREV_BUTTON=gridVrctPoster_En - view_variable.CALLBACK_ABOUT_VRCT_POSTER_NEXT_BUTTON=gridVrctPoster_Ja + poster_images_authors_wrapper = CTkFrame(poster_container, fg_color=ABOUT_VRCT_BG, corner_radius=0, width=0, height=0) + poster_images_authors_wrapper.grid(column=0, row=1, padx=0, pady=0, sticky="nsew") + + config_window.poster_images_authors = settings.about_vrct.embedImageCTkLabel(poster_images_authors_wrapper, settings.about_vrct.image_file.POSTER_IMAGES_AUTHOR) + config_window.poster_images_authors_m = settings.about_vrct.embedImageCTkLabel(poster_images_authors_wrapper, settings.about_vrct.image_file.POSTER_IMAGES_AUTHOR_M) + + + + def toPrevPagePosterImage(): + current_function_index = view_variable.CALLBACK_ABOUT_VRCT_POSTER_IMAGE_CURRENT_PAGE_NUM + view_variable.CALLBACK_ABOUT_VRCT_POSTER_PREV_BUTTON=None + view_variable.CALLBACK_ABOUT_VRCT_POSTER_NEXT_BUTTON=None + poster_frame_list[current_function_index].grid_remove() + current_function_index = (current_function_index - 1) % len(poster_frame_list) + poster_frame_list[current_function_index].grid(column=1, row=0, padx=0, pady=0, sticky="nsew") + view_variable.CALLBACK_ABOUT_VRCT_POSTER_IMAGE_CURRENT_PAGE_NUM = current_function_index + + if poster_image_frame_settings_list[current_function_index]["poster_type"] == "poster": + config_window.poster_images_authors_m.grid_remove() + config_window.poster_images_authors.grid(column=0, row=0, padx=0, pady=0, sticky="nsew") + elif poster_image_frame_settings_list[current_function_index]["poster_type"] == "manga": + config_window.poster_images_authors.grid_remove() + config_window.poster_images_authors_m.grid(column=0, row=0, padx=0, pady=0, sticky="nsew") + + view_variable.CALLBACK_ABOUT_VRCT_POSTER_PREV_BUTTON=toPrevPagePosterImage + view_variable.CALLBACK_ABOUT_VRCT_POSTER_NEXT_BUTTON=toNextPagePosterImage + + + + + def toNextPagePosterImage(): + current_function_index = view_variable.CALLBACK_ABOUT_VRCT_POSTER_IMAGE_CURRENT_PAGE_NUM + view_variable.CALLBACK_ABOUT_VRCT_POSTER_PREV_BUTTON=None + view_variable.CALLBACK_ABOUT_VRCT_POSTER_NEXT_BUTTON=None + poster_frame_list[current_function_index].grid_remove() + current_function_index = (current_function_index + 1) % len(poster_frame_list) + poster_frame_list[current_function_index].grid(column=1, row=0, padx=0, pady=0, sticky="nsew") + view_variable.CALLBACK_ABOUT_VRCT_POSTER_IMAGE_CURRENT_PAGE_NUM = current_function_index + + if poster_image_frame_settings_list[current_function_index]["poster_type"] == "poster": + config_window.poster_images_authors_m.grid_remove() + config_window.poster_images_authors.grid(column=0, row=0, padx=0, pady=0, sticky="nsew") + elif poster_image_frame_settings_list[current_function_index]["poster_type"] == "manga": + config_window.poster_images_authors.grid_remove() + config_window.poster_images_authors_m.grid(column=0, row=0, padx=0, pady=0, sticky="nsew") + + + view_variable.CALLBACK_ABOUT_VRCT_POSTER_PREV_BUTTON=toPrevPagePosterImage + view_variable.CALLBACK_ABOUT_VRCT_POSTER_NEXT_BUTTON=toNextPagePosterImage + + + + # Initialize + view_variable.CALLBACK_ABOUT_VRCT_POSTER_PREV_BUTTON=toPrevPagePosterImage + view_variable.CALLBACK_ABOUT_VRCT_POSTER_NEXT_BUTTON=toNextPagePosterImage + + config_window.poster_images_authors.grid(column=0, row=0, padx=0, pady=0, sticky="nsew") + + poster_frame_list[0].grid(column=1, row=0, padx=0, pady=0, sticky="nsew") + + - gridVrctPoster_Ja() poster_image_arrow_right = settings.about_vrct.embedImageButtonCTkLabel(poster_images_wrapper, "arrow_right.png", lambda _e: callFunctionIfCallable(view_variable.CALLBACK_ABOUT_VRCT_POSTER_NEXT_BUTTON)) poster_image_arrow_right.grid(column=2, row=0, padx=0, pady=0, sticky="nsew") @@ -543,11 +580,10 @@ def createSettingBox_AboutVrct(setting_box_wrapper, config_window, settings, vie ) - poster_images_authors_wrapper = CTkFrame(poster_container, fg_color=ABOUT_VRCT_BG, corner_radius=0, width=0, height=0) - poster_images_authors_wrapper.grid(column=0, row=1, padx=0, pady=0, sticky="nsew") - poster_images_authors = settings.about_vrct.embedImageCTkLabel(poster_images_authors_wrapper, "poster_images_authors.png") - poster_images_authors.grid(column=0, row=0, padx=0, pady=0, sticky="nsew") + + + poster_tell_us_message = createTellUsButton( diff --git a/vrct_gui/ui_managers/AboutVrctManager.py b/vrct_gui/ui_managers/AboutVrctManager.py index 1856487d..9e45db63 100644 --- a/vrct_gui/ui_managers/AboutVrctManager.py +++ b/vrct_gui/ui_managers/AboutVrctManager.py @@ -56,12 +56,13 @@ class AboutVrctManager(): self.uism.SPECIAL_THANKS_MESSAGE_AND_YOU_BOTTOM_PADY = self._calculateUiSize(8) self.uism.POSTER_SHOWCASE_SECTION_TITLE_BOTTOM_PADY = self._calculateUiSize(6) - self.uism.POSTER_SHOWCASE_POSTER_IMAGES_BOTTOM_PADY = self._calculateUiSize(18) + self.uism.POSTER_SHOWCASE_POSTER_IMAGES_BOTTOM_PADY = self._calculateUiSize(6) self.uism.POSTER_SHOWCASE_WORLD_ITEM_BOTTOM_PADY = self._calculateUiSize(4) self.uism.POSTER_SHOWCASE_WORLD_ITEM_IPADX = self._calculateUiSize(12) self.uism.POSTER_SHOWCASE_WORLD_ITEM_IPADY = self._calculateUiSize(4) self.uism.POSTER_SHOWCASE_WORLD_BOTTOM_PADY = self._calculateUiSize(4) self.uism.POSTER_SHOWCASE_WORLD_CORNER_RADIUS = self._calculateUiSize(4) + self.uism.POSTER_SHOWCASE_WORLD_PAGINATION_BUTTON_BOTTOM_PADY = self._calculateUiSize(18) self.uism.POSTER_TELL_US_MESSAGE_TOP_PADY = self._calculateUiSize(20) self.uism.POSTER_CHANGE_BUTTON_CORNER_RADIUS = self._calculateUiSize(6) @@ -72,12 +73,19 @@ class AboutVrctManager(): if ui_language == "ja": self.image_file.SPECIAL_THANKS_MESSAGE = "special_thanks_message_ja.png" self.image_file.SPECIAL_THANKS_TELL_US_MESSAGE = "special_thanks_tell_us_message_ja.png" + + self.image_file.POSTER_IMAGES_AUTHOR = "poster_images_authors_ja.png" + self.image_file.POSTER_IMAGES_AUTHOR_M = "poster_images_authors_m_ja.png" self.image_file.POSTER_TELL_US_MESSAGE = "poster_tell_us_message_ja.png" else: self.image_file.SPECIAL_THANKS_MESSAGE = "special_thanks_message_en.png" self.image_file.SPECIAL_THANKS_TELL_US_MESSAGE = "special_thanks_tell_us_message_en.png" + + self.image_file.POSTER_IMAGES_AUTHOR = "poster_images_authors_en.png" + self.image_file.POSTER_IMAGES_AUTHOR_M = "poster_images_authors_m_en.png" self.image_file.POSTER_TELL_US_MESSAGE = "poster_tell_us_message_en.png" + poster_showcase_pagination_button_image = getImageFileFromUiUtils_AboutVrct("poster_showcase_pagination_button.png") self.image_file.POSTER_SHOWCASE_WORLD_PAGINATION_BUTTON = SimpleNamespace( img = poster_showcase_pagination_button_image, @@ -117,7 +125,7 @@ class AboutVrctManager(): return size - def embedImageCTkLabel(self, parent_frame, image_file_name, image_scaling=IMAGE_STANDARD_SCALING, directly_type:str=None, fg_color:str="transparent", anchor:str="w"): + def embedImageCTkLabel(self, parent_frame, image_file_name, image_scaling=IMAGE_STANDARD_SCALING, directly_type:str=None, fg_color:str="transparent", anchor:str="w", rotate_angle:int=0): img = getImageFileFromUiUtils_AboutVrct(image_file_name, directly_type) @@ -139,12 +147,12 @@ class AboutVrctManager(): height=image_height, fg_color=fg_color, anchor=anchor, - image=CTkImage((img), size=(image_width, image_height)) + image=CTkImage((img).rotate(rotate_angle), size=(image_width, image_height)) ) return img_label - def embedImageButtonCTkLabel(self, parent_frame, image_file_name, callback, image_scaling=IMAGE_STANDARD_SCALING, directly_type:str=None, fg_color:str=None, hovered_color:str=None, clicked_color:str=None, anchor:str="w", corner_radius:int=0): + def embedImageButtonCTkLabel(self, parent_frame, image_file_name, callback, image_scaling=IMAGE_STANDARD_SCALING, directly_type:str=None, fg_color:str=None, hovered_color:str=None, clicked_color:str=None, anchor:str="w", corner_radius:int=0, no_bind:bool=False, rotate_angle:int=0): fg_color = self.ctm.ABOUT_VRCT_BG if fg_color is None else fg_color @@ -155,18 +163,19 @@ class AboutVrctManager(): img_label_frame = CTkFrame(parent_frame, fg_color=fg_color, corner_radius=corner_radius, width=0, height=0) - img_label = self.embedImageCTkLabel(img_label_frame, image_file_name, image_scaling, directly_type, fg_color, anchor) + img_label = self.embedImageCTkLabel(img_label_frame, image_file_name, image_scaling, directly_type, fg_color, anchor, rotate_angle) - img_label_frame.configure(cursor="hand2") - img_label.configure(cursor="hand2") - img_label._canvas.configure(cursor="hand2") - bindButtonFunctionAndColor( - target_widgets=[img_label_frame, img_label], - enter_color=hovered_color, - leave_color=fg_color, - clicked_color=clicked_color, - buttonReleasedFunction=callback, - ) + if no_bind is False: + img_label_frame.configure(cursor="hand2") + img_label.configure(cursor="hand2") + img_label._canvas.configure(cursor="hand2") + bindButtonFunctionAndColor( + target_widgets=[img_label_frame, img_label], + enter_color=hovered_color, + leave_color=fg_color, + clicked_color=clicked_color, + buttonReleasedFunction=callback, + ) img_label.grid() img_label_frame.img_label = img_label diff --git a/vrct_gui/ui_managers/UiScalingManager.py b/vrct_gui/ui_managers/UiScalingManager.py index be1cfa56..55ad0c43 100644 --- a/vrct_gui/ui_managers/UiScalingManager.py +++ b/vrct_gui/ui_managers/UiScalingManager.py @@ -223,7 +223,7 @@ class UiScalingManager(): # Side menu - self.config_window.SIDE_MENU_TOP_PADY = (self._calculateUiSize(54), self._calculateUiSize(60)) + self.config_window.SIDE_MENU_PADY = (self._calculateUiSize(54), self._calculateUiSize(72)) self.config_window.SIDE_MENU_LABELS_SEPARATE_MIN_HEIGHT = self._calculateUiSize(40) self.config_window.SIDE_MENU_LABELS_IPADX = self._calculateUiSize(20) self.config_window.SIDE_MENU_LABELS_IPADY = self._calculateUiSize(8)