diff --git a/extends/binding.txt b/extends/binding.txt index 9ab3e6f..3430acf 100644 --- a/extends/binding.txt +++ b/extends/binding.txt @@ -665,7 +665,6 @@ #item_storage_current_amount #item_world_template_count_and_label #item_world_template_count_visible -#itzlipofutzli #join_and_download_everything #join_by_code_text_edit #joinable_realms_panel_visible @@ -683,7 +682,6 @@ #keyboard_show_full_keyboard_options #keyboard_show_full_keyboard_options_enabled #keyboard_show_standard_keyboard_options -#kh8C #lan_network_world_item_grid_dimension #language_collapsed_collection_length #language_columns_collection_length diff --git a/extends/button_id.txt b/extends/button_id.txt new file mode 100644 index 0000000..d7f0bd0 --- /dev/null +++ b/extends/button_id.txt @@ -0,0 +1,947 @@ +button.paddle_left +button.controller_start +button.slot3 +button.slot9 +button.file_upload_cancel +button.close +button.add_popup_escape +button.tapped_bundle_item_icon +button.container_auto_destroy +button.save_button +button.picked_inventory +button.cycle_recipe_left +button.ugc_item +button.redirect_to_upsell +button.choose_skinny +button.menu_settings +button.clear_screenshots_cache +button.deselected_pack +button.store +button.sort_up +button.navigate_edit_world +button.font_license_popup +button.menu_legacy_world_item_delete +button.portfolio_export +button.cancel_close_without_saving +button.close_manage_feed +button.show_more_offers +button.player_count +button.paddle_right +button.turn_left +button.control +button.enable_text_to_speech +button.look_up_smooth +button.full_screen +button.build_or_attack_or_block_select +button.downright +button.clear_selected_recipe +button.search_bar_clear +button.showEula +button.insert_photo_page +button.hide_bundle_tooltip +button.host_toggle +button.add_realm +button.select_worlds +button.menu_invalid_world_template_clicked +button.manage_account +button.featured_category +button.menu_realm_send_invites +button.close_options_popup +button.world_slot +button.menu_realm_world_trial +button.next_friends_page +button.file_upload_wifi_warning_continue +button.eduCloud_learn_more +button.toggle_verbose_state +button.get_more_skins +button.share +button.pan_left +button.redirect_button +button.select_screenshot +button.genre +button.close_filter_menu +button.menu_inventory_cancel +button.look_down_smooth +button.arrow_down +button.command_macro_2 +button.command_macro_6 +button.anvil_coalesce_stack +button.cancel +button.insert_text_page +button.chat_menu_cancel +button.sub_command +button.trade_details_2 +button.starter_buy_now_button +button.menu_offline +button.ai_lesson_crafter +button.additional_realms_buy_button +button.continue +button.manual_save_checkbox +button.expand_realms +button.copy_local_world +button.menu_feed +button.portfolio_add_photo +button.delete_account +button.clear_content_log_files +button.expand_advanced_graphics +button.see_realms_subscription +button.view_achievement +button.redeem_realms_item +button.menu_cancel +button.destroy_or_interact +button.scoreboard +button.look_right_smooth +button.arrow_left +button.command_macro_7 +button.focus_left +button.focus_right +button.remove_trial +button.trade_secondary_select +button.player_profile_card +button.settings_help +button.reset_party_settings_filters +button.more_realms_plus_templates +button.back +button.menu_legacy_world_item_migrate +button.entry_confirm +button.tag_trailer +button.archived_world_upload +button.delete_resource_button +button.select_nav_option +button.close_result_panel +button.apply_to_realm +button.purchase_with_currency +button.user_rating_star_toggle +button.select_appearance +button.open_default_character_selection_modal +button.promotion_page +button.emote_slot_2 +button.command_macro_3 +button.cartography_result_take_half_place_one +button.menu_exit +button.close_share_popup +button.privpol_popup +button.edit_page +button.force_gui_scaling +button.privacy_and_online_safety +button.menu_realms +button.additional_realms_right_button +button.save_active_world_button +button.score_player_profile_card +button.form_button_click +button.exit_student +button.exit_advanced +button.menu_start_realms_world +button.hide_gui_all +button.slot_pressed +button.edu_cloud_conflict_resolution_cloud_button +button.play_video +button.share_world_link +button.exit_verbose_state_bg +button.text_edit_box_deselected +button.cast_select +button.structure_3D_export +button.copy_facing_coordinates +button.look_left +button.grindstone_coalesce_stack +button.main_menu_button +button.window_right +button.restore +button.clear +button.play_button +button.export_book +button.focus_debug +button.emote_wheel_exit_non_gamepad +button.is_hovered +button.friends_drawer +button.play_realm +button.available_pack +button.menu_quit +button.connect_to_third_party_server +button.portfolio_convert_right +button.hotbar_inventory_left +button.view_toggle +button.preview_app1 +button.purchase_with_coins +button.navigate_to_store_search_resource +button.scrollToRateContent +button.tab_button +button.skin_selected_skins_page +button.clear_pack_type_filters +button.menu_down +button.build_or_interact +button.slot2 +button.command_macro_chord_7 +button.output_coalesce_stack +button.join_world_popup +button.teams_share +button.copy_to_clipboard +button.reset_binding +button.new_realm +button.showEligibility +button.confirm +button.menu_navigation +button.master_buy_now_button +button.realms_player_count_10 +button.download_realms_world +button.view_profile +button.terms_and_conditions_popup +button.attribution_popup +button.exit_verbose_state +button.navigate_first_page +button.structure_import +button.menu_tertiary_select +button.sneak +button.controller_autocomplete +button.shift +button.copy_facing_block_coordinates +button.look_down +button.labtable_take_all_place_all +button.view_worlds +button.container_take_half_place_one +button.recipe_book_toggle_hovered +button.action_button +button.realms_warning_more_info +button.dialog_button +button.join_server_anyway +button.menu_local_world_item_edit +button.menu_network_join_by_code_popup_join +button.free_preview_realm_available +button.play_world +button.clear_diagnostics_captures +button.dev_trigger_graphics_device_loss +button.select_emote_slot_1 +button.real_money_purchase +button.navigate_previous_page +button.go_back +button.edit_appearance_preset +button.retry_appearance_preset +button.structure_detect +button.controller_secondary_select +button.right +button.descend +button.look_up_left +button.button_hovered +button.access +button.maximize +button.shape_drawing +button.new_world +button.open_demo_popup_link +button.mute_chat +button.host_main +button.open_chat_settings +button.turn_right +button.close_entry_prompt_dialog +button.trade_take_all_place_all +button.choose_fat +button.gathering +button.menu_store +button.sync_legacy_worlds +button.sync_retailtopreview_worlds +button.view_feed +button.expand_selected +button.expand_available +button.submit_custom_form +button.kick +button.menu_start_local_world +button.portfolio_page_next +button.manage_feed_prev_button +button.lesson_complete +button.tutorial_restart +button.claim_all +button.swap_color_channel_left +button.menu_autocomplete +button.toggle_perspective +button.sprint +button.block_select +button.emote_slot_1 +button.hide_tooltips +button.grindstone_take_all_place_all +button.loom_result_take_half_place_one +button.confirm_passcode +button.local_button +button.finalize +button.scroll_down +button.pointer_pressed +button.visual_button +button.recent_skin_hovered +button.default_skin_hovered +button.menu_play +button.download_save +button.confirm_button +button.connecting_close +button.error_close +button.menu_alternate_tab_left +button.fly_up_slow +button.emote_slot_3 +button.menu_select +button.pattern_select +button.view_library +button.error_ok +button.coalesce_stack +button.container_auto_place_one +button.recipe_select +button.signIn +button.update_and_play +button.menu_achievements +button.realms_options_close +button.selected_pack +button.read_toggle +button.menu_network_join_by_code +button.menu_realms_world_item_edit +button.cancel_reset +button.size +button.exit_done +button.found_cancel +button.dressing_room +button.close_eduCloud_error_popup +button.open_content_log_history +button.realms_plus +button.none_piece_option +button.menu_textcursorleft +button.dev_console_2 +button.inventory_left +button.jump +button.sprint_toggle +button.menu_alternate_tab_right +button.switch_to_controller +button.content_log_history_chord +button.change_flight_height +button.comp_create_take_all_place_all +button.matreduce_take_all_place_all +button.scrollbar_touch +button.crafting_output_secondary +button.startBrowsing +button.click_autocomplete +button.generate_random +button.realms_invite_plus +button.realms_copy_invite_link +button.realm_invitation_decline +button.renew +button.edit_world +button.student_button +button.switch_to_new_ui_servers +button.cancel_join_server +button.navigate_screenshots_left +button.description_read_toggle +button.editor_settings +button.rating_no_button +button.sign_in +button.done_add_resource_button +button.sort +button.expand_skin_pack +button.default_skin_selected +button.navigate_to_store_search_mashup +button.cycle_offer_left +button.select_promotion_item +button.pressedArrowRight +button.left +button.block_select_toggle +button.command_macro_chord_4 +button.chat_autocomplete_back +button.output_take_one_place_one +button.import +button.arrow_key +button.reset_keyboard_bindings +button.customize_tooltip_option_is_hovered +button.show_skip +button.sign_book +button.pause +button.force_screens_type_pocket +button.reload_ui_definitions +button.load_game +button.menu_network_server_world_edit +button.portfolio_convert_left +button.edu_cloud_hyperlink +button.hotbar_inventory_button +button.stop_hosting +button.dropdown_nav_toggle_on_hover +button.defaultNoAction +button.pan_right +button.structure_save +button.structure_load +button.menu_textcursorright +button.look_up +button.hide_gui +button.command_macro_9 +button.command_macro_chord_1 +button.home +button.try_menu_exit +button.select_offer +button.purchaseErrorBack +button.auth_cancel +button.delete_page +button.scroll_right +button.trade +button.choose_custom_skin +button.delete_local_screenshots +button.coin_wallet +button.additional_realms_left_button +button.sort_down +button.menu_how_to_play +button.debug_drawer_button +button.portfolio_delete_photo_right +button.cancel_add_resource_button +button.addons_faq +button.action +button.info +button.eduCloud_error_ok +button.feedback_link +button.custom_skin_info_popup +button.open_expanded_appearance_view +button.equip_piece +button.click_on +button.structure_reset +button.sneak_toggle +button.controller_select +button.look_center +button.memory_warning_cancel +button.container_take_all_place_all +button.close_dialog +button.remove_button +button.emote_hovered +button.cycle_recipe_right +button.update +button.report_errors +button.navigate_screenshots_right +button.portfolio_delete_photo_left +button.download_failed_cancel +button.popup_escape +button.tag_escape +button.file_upload_play +button.unlink_msa +button.navigate_to_store_search_world +button.close_edit_appearance_preset +button.expand_toggle +button.subgenre +button.controller_secondary_select_right +button.ascend +button.look_down_slight +button.look_down_left +button.screenshot +button.text_edit_box_clear +button.labtable_coalesce_stack +button.service +button.mail_share +button.copy_share_link +button.layout_increment +button.cancel_purchase +button.chat_previous_message +button.trade_select +button.enchantment_details +button.menu_skins +button.textures +button.move_left +button.pack_settings +button.navigate_create_new_world +button.close_popup +button.menu_local_world_create +button.news_read_toggle +button.no_local_worlds_launch_help +button.no_photo_alert_ok +button.join_server +button.new_world_upload +button.reset_new_player_flow +button.select_control_mode +button.filter +button.copy_current_coordinates +button.slot5 +button.command_macro_chord_8 +button.combine +button.cursor_drop_one +button.reset_gamepad_bindings +button.teleport_clear +button.close_chat_settings +button.open_dev_console +button.menu_servers +button.warningDependency +button.retry +button.realms_plus_buy_button +button.delete_save +button.edit_realm +button.activate_world +button.menu_open_uri +button.join_and_download_required +button.leave +button.hide_paperdoll_hud +button.wake_up_button +button.add_friend +button.library_back_button +button.switch_accounts +button.controller_hover_open_verbose_view +button.turn_down +button.controller_secondary_select_left +button.block_select_with_data +button.slot1 +button.console +button.menu_check_store +button.classrooms_share +button.window_left +button.drop_one +button.pick_debug_object +button.simulate_touch +button.send_feedback +button.playSolo +button.realms_player_count_2 +button.proceed +button.hide_tooltips_hud +button.close_to_code_entry +button.ok +button.cloud_learn_more_link +button.copy_build_info +button.open_color_picker +button.navigate_carousel_left +button.close_differences_dialog +button.stonecutter_result_take_half_place_one +button.dropdown_exit +button.content_log_history +button.anvil_take_all_place_all +button.library_home +button.memory_warning_ok +button.container_slot_hovered +button.visit_help +button.tapped_bundle_tooltip +button.scroll_up +button.send +button.unowned_pack +button.addonLink +button.navigate_edit_realms_world +button.cycle_pack_left +button.menu_network_join_by_code_close +button.add_member +button.edu_cloud_conflict_resolution_both_button +button.library_search +button.delete_manifest +button.must_exit_world_error_dialog +button.cycle_offer_right +button.confirm_delete +button.stone_select +button.comp_create_coalesce_stack +button.layout_decrement +button.clear_hotbar_or_remove_one +button.buy_now +button.confirm_bundle_purchase +button.keyboard_toggle +button.two_player +button.feedback_button_pressed +button.signin +button.realms_invite_find_friends +button.ten_users +button.exit_student_edit +button.delete_action +button.close_permissions_popup +button.ban +button.menu_import_level +button.menu_realm_nintendo_first_realm_purchase_button +button.menu_sign_in_to_view_realms +button.rating_yes_button +button.send_invites +button.entered_entries +button.entry_grid_button +button.connecting_cancel +button.join_world +button.start_hosting +button.resource_button +button.select_skin +button.onedrive_link +button.cycle_skins_right +button.search_header_clear +button.go_to_top +button.cycle_screenshots_left +button.swap_color_channel_right +button.help +button.emote_slot_0 +button.hide_paperdoll +button.command_macro_4 +button.world_picker_skip +button.add_server +button.cursor_drop_all +button.view_all_packs +button.tos_popup +button.buy +button.first_lower_popup_button +button.chat +button.turn_up +button.view_recent_skin +button.restore_store +button.realms_duration_long +button.exit_or_toggle +button.to_profile_or_skins_screen +button.view_third_party_server_offers +button.menu_network_world_item +button.option_reset +button.entry_ip +button.menu_retry +button.resources +button.library_item +button.refresh_manifest +button.reset_settings +button.save +button.purchase_error_dialog +button.nav_button +button.cycle_screenshots_right +button.create_selected_persona +button.click_off +button.dev_console +button.menu_secondary_select +button.look_left_smooth +button.arrow_right +button.command_macro_0 +button.command_macro_chord_0 +button.command_macro_chord_5 +button.text_edit_box_selected +button.enchant +button.unlink +button.library_category +button.reset +button.goBack +button.learn_more_popup_link +button.scroll_left +button.chat_next_message +button.menu_tab_left +button.code_builder +button.menu_world_template_clicked +button.addon_copy_realms_warning +button.exit_maximized +button.add_url +button.menu_permission +button.join_and_download_everything +button.previous_friends_page +button.image_prev +button.controller_hover_close_verbose_view +button.show_profile_settings +button.in_csb_button +button.interact_button +button.select_blade_offer +button.cast_back +button.menu_textedit_down +button.up_ignore +button.ascendScaffolding +button.fly_down_slow +button.hotbar_drop_all +button.text_to_speech +button.command_macro_1 +button.command_macro_chord_6 +button.education_resources +button.filter_toggle_hovered +button.privpol_hyperlink +button.menu_continue +button.deleteResources +button.bottom_modal +button.all +button.skins +button.csb_cancel +button.two_users +button.save_to_storage +button.entry_clear +button.manage_feed_next_button +button.undo +button.preview_app2 +button.cycle_next_debug_overlay_page +button.dev_allocate_texture_handles +button.equip_skin +button.navigate_to_store_search_addon +button.item_action +button.submit_rating +button.change_height +button.swap_to_right_limb +button.cast_right_select +button.inventory_right +button.controller_textedit_up +button.controller_back +button.menu_tab_right +button.open_crafting +button.look_up_right +button.arrow_up +button.toggle_control_hud +button.command_macro_chord_2 +button.respawn_button +button.destroy_selection +button.acceptEula +button.open_demo_screen +button.online_button +button.open_main_menu +button.menu_profile +button.realms_plus_right_button +button.backup_download +button.menu_network_server_item +button.error_try_again +button.edu_cloud_conflict_resolution_local_button +button.download_cancel +button.coin_purchase +button.collect_achievement +button.tab_name +button.language +button.smithing_table_take_half_place_one +button.left_panel_tab_decrement +button.left_panel_tab_increment +button.build_or_attack +button.anvil_take_half_place_one +button.menu_leave_screen +button.loom_result_take_all_place_all +button.clear_hotbar_or_drop +button.ten_player +button.interact +button.tabbed_buy_now_button +button.trade_details_1 +button.cloud_help_button +button.menu_edu_play +button.menu_inbox +button.to_profile_screen +button.create_realm +button.realms_invite_share +button.portfolio_page_prev +button.confirm_close_without_saving +button.confirm_reset +button.close_sign_out_fail_popup +button.manage_invites_popup +button.cycle_previous_debug_overlay_page +button.select_screen_nav_button_option +button.cycle_skins_left +button.realms_pack_more_info +button.apply_persona_piece +button.cycle_promotions_left +button.platform_restricted +button.cast_left_select +button.structure_export +button.menu_autocomplete_back +button.look_right +button.learn_more +button.info_accept +button.swap_page_right +button.trade_coalesce_stack +button.more_custom_templates +button.view_default_skin +button.back_to_selector_area +button.premium_skin_unhovered +button.expand_view +button.menu_get_started +button.remove_pack_button +button.start_transfer +button.my_account +button.realms_invite_minus +button.invite_links +button.delete_selected_saves +button.realms_pack +button.cycle_pack_right +button.view_skin +button.menu_quick_play +button.open_account_setting_gamecore +button.hotbar_inventory_right +button.manage_feed_delete +button.add_resource_learn_more +button.search_clear +button.item_pdp +button.smithing_table_take_all_place_all +button.emote +button.controller_autocomplete_back +button.interactwithtoast +button.inventory +button.destroy_or_attack +button.look_up_slight +button.upleft +button.matreduce_coalesce_stack +button.right_panel_tab_decrement +button.shift_pane_focus +button.crafting_container_auto_place +button.prev_page +button.book_exit +button.chat_paste_coordinates +button.new_ui_debug +button.emote_hovered_via_analog +button.menu_buy_game +button.accept_skin +button.menu_invite_notification +button.clear_cache +button.csb_info +button.menu_realms_plus_template_clicked +button.realms_invite_unblock +button.play_on_realm_close +button.restore_save +button.switch_to_new_ui +button.download_failed_open +button.select_all +button.sign_out +button.copy_account_info +button.seeMoreBy +button.navigate_next_page +button.delete_appearance_preset +button.close_sort_menu +button.drop +button.menu_inventory_drop_all +button.copy_coordinates +button.command_macro_chord_3 +button.chat_autocomplete +button.drop_all +button.recipe_search +button.recipe_secondary +button.tos_hyperlink +button.next_page +button.cancelServicePack +button.menu_right +button.menu_clear +button.emote_selected +button.skin_unhovered +button.exit +button.clear_members +button.select_save_options +button.invalid_pack +button.server_found_close +button.tag +button.external_link +button.leak_memory +button.skin_selected +button.play_emote_again +button.navigate_carousel_right +button.slot7 +button.slot8 +button.slot0 +button.command_macro_8 +button.command_macro_chord_9 +button.cartography_result_take_all_place_all +button.grindstone_take_half_place_one +button.container_reset_held +button.binding_button +button.modify_control_layout +button.recipe_tertiary +button.crafting_output_tertiary +button.right_learn_more +button.second_lower_popup_button +button.reopen_keyboard +button.reset_chat_settings +button.mobeffects +button.emote_selected_updated +button.faq_screen +button.premium_skin_hovered +button.edu_feedback +button.featured_world +button.more_info +button.credits +button.skin_hovered +button.menu_network_add_friend +button.menu_realms_world_item_remove +button.create_on_realms_button +button.hotbar_select +button.entry_close +button.image_next +button.change_arm_size +button.differences_information_button +button.cast_single_character_button +button.change_piece_color +button.exit_filter_menu +button.stonecutter_result_take_all_place_all +button.menu_textedit_up +button.menu_left +button.descendScaffolding +button.controller_textedit_down +button.slot4 +button.down_ignore +button.command_macro_5 +button.convert_legacy_world +button.passcode_popup_escape +button.return +button.container_auto_place +button.reset_touch_bindings +button.view_character_creator_items +button.goToDownload +button.cancel_purchase_show_demo_choice +button.menu_choose_slot +button.main_menu +button.csb_buy +button.addon_select_world +button.addon_copy_world_warning +button.menu_invite_players +button.menu_realms_feed +button.more_coding +button.equip_size +button.navigate_to_store_search_skin +button.navigate_to_store_search_vibrantvisuals +button.cycle_promotions_right +button.select_bundle_summary_offer +button.smithing_table_coalesce_stack +button.immersive_reader +button.menu_auto_place +button.look_down_right +button.output_take_all_place_all +button.create_new +button.servers +button.right_panel_tab_increment +button.menu_custom_world_template_clicked +button.swap_page_left +button.menu_up +button.trade_take_half_place_one +button.undo_skin +button.worlds +button.realms_plus_left_button +button.realms_remove_invite_link +button.expand_unowned +button.expand_action_edit +button.joincode_share +button.manage_feed_ignore +button.reset_day_one_experience +button.gamma_calibration +button.show_more_skin_packs +button.is_appearance_status_hovered +button.swap_to_left_limb +button.pressedArrowLeft +button.mobeffectsandinteractwithtoast +button.menu_inventory_drop +button.slot6 +button.upright +button.downleft +button.menu_ok +button.menu_toggle +button.search_bar_hovered +button.crafting_output_primary +button.clear_hotbar +button.left_learn_more +button.picked +button.menu_choose_realm +button.set_spawn +button.dismount +button.toast_interaction +button.trade_toggle_hovered +button.view_premium_skin +button.launch_editions +button.deselect_resource +button.next +button.addons +button.mashups +button.more_suggested_content_offers +button.playWithFriends +button.realms_duration_short +button.realm_invitation_accept +button.cancel_join_realm +button.exit_basic +button.advanced_settings +button.add_command +button.get_offline_authcode +button.close_button +button.join +button.opacity +button.generate_joincode +button.restart_hosting +button.local_world_upload +button.get_certificate +button.licensed_content_popup +button.homeButton +button.search +button.scroll_map +button.purchase_coins +button.equip_color +button.clear_all_filters +button.down +button.menu_cancel +button.pointer_pressed +button.menu_select +button.pause +button.alt +button.chat +button.code_builder +button.menu_tab_left +button.up +button.menu_right +button.mobeffects +button.menu_up +button.menu_ok +button.dismount \ No newline at end of file diff --git a/resources/example-config.js b/resources/example-config.js index 21ffa8f..8d4db49 100644 --- a/resources/example-config.js +++ b/resources/example-config.js @@ -13,23 +13,13 @@ export const config = { autoImport: true, autoEnable: true, importToPreview: false, - obfuscateStringName: true, + obfuscateStringName: false, allowRandomStringName: true, forceRandomStringLength: 16, }, - binding_functions: { - custom_abs: function (number) { - const randomAbs = RandomBindingString(16) - - return { - generate_bindings: [ - { - source_property_name: `[ abs(${number}) ]`, - target_property_name: randomAbs, - }, - ], - return_value: randomAbs, - } - }, + ui_analyzer: { + enabled: false, + generate_path: "src/modify", + imports: [], }, } diff --git a/src/components/UI.ts b/src/components/UI.ts index 76b661f..db5e581 100644 --- a/src/components/UI.ts +++ b/src/components/UI.ts @@ -71,17 +71,6 @@ export class UI extends Class ) { super() - if (name && !/^\p{L}+$/u.test(name)) { - throw new Error("Invalid name") - } else if (name === "namespace") { - console.error("The 'namespace' cannot be used as a name") - process.exit(1) - } - - if (namespace && !/^\p{L}+$/u.test(namespace)) { - throw new Error("Invalid namespace") - } - if (isNotObfuscate || !(allowObfuscate ?? true)) { this.name = name || RandomString(16) this.namespace = namespace || defaultNamespace || RandomNamespace() @@ -242,6 +231,8 @@ export class UI extends Class export class ModifyUI extends UI { private isClearBinding: boolean = false private isClearVariables: boolean = false + private isClearControls: boolean = false + private isClearAnims: boolean = false private isClearButtonMappings: boolean = false protected modifications: ModificationItem[] = [] @@ -250,13 +241,23 @@ export class ModifyUI ex super(undefined, name, namespace, path, false) } - /** - * Remove all bindings of this modify element - * @returns - */ - clearBinding() { - this.isClearBinding = true - return this + clearArray(arrayName: ArrayName) { + switch (arrayName) { + case ArrayName.BINDINGS: + this.isClearBinding = true + return this + case ArrayName.CONTROLS: + this.isClearControls = true + return this + case ArrayName.BUTTON_MAPPINGS: + this.isClearButtonMappings = true + return this + case ArrayName.ANIMS: + this.isClearAnims = true + return this + default: + return arrayName satisfies never + } } /** @@ -268,15 +269,6 @@ export class ModifyUI ex return this } - /** - * Remove all button mappings of this element - * @returns - */ - clearButtonMappings() { - this.isClearButtonMappings = true - return this - } - /** * Allows to modify the UI elements from resource packs below this one * @returns @@ -459,10 +451,25 @@ export class ModifyUI ex const obj = this.toJsonUI() if (this.isClearBinding) obj.bindings = [] + if (this.isClearControls) obj.controls = [] + if (this.isClearAnims) obj.anims = [] if (this.isClearVariables) obj.variables = [] if (this.isClearButtonMappings) obj.button_mappings = [] - if (this.modifications.length) obj.modifications = this.modifications + if (this.modifications.length) { + // const map = new Map>() + + // this.modifications.forEach(mod => { + // const { operation, array_name, control_name, target, target_control, value, where } = mod + + // switch (array_name) { + // case ArrayName.CONTROLS: { + // } + // } + // }) + + obj.modifications = this.modifications + } return obj } diff --git a/src/components/Utils.ts b/src/components/Utils.ts index fbf67ff..b53e7a5 100644 --- a/src/components/Utils.ts +++ b/src/components/Utils.ts @@ -217,7 +217,7 @@ export function s(input: string) { else { if (rndMap.has(input)) return rndMap.get(input) as string else { - const ret = RandomBindingString() + const ret = RandomString(16) rndMap.set(input, ret) return ret } diff --git a/src/types/enums/ArrayName.ts b/src/types/enums/ArrayName.ts index 961040e..e0cabb7 100644 --- a/src/types/enums/ArrayName.ts +++ b/src/types/enums/ArrayName.ts @@ -2,4 +2,5 @@ export enum ArrayName { CONTROLS = "controls", BINDINGS = "bindings", BUTTON_MAPPINGS = "button_mappings", + ANIMS = "anims", } diff --git a/src/types/enums/Binding.ts b/src/types/enums/Binding.ts index e1ff649..055be8c 100644 --- a/src/types/enums/Binding.ts +++ b/src/types/enums/Binding.ts @@ -3218,13 +3218,11 @@ export enum Binding { ITEM_ROW_COLLECTION_INDEX = "#item_row_collection_index", ITEM_STORAGE_CURRENT_AMOUNT = "#item_storage_current_amount", ITEM_WORLD_TEMPLATE_COUNT_AND_LABEL = "#item_world_template_count_and_label", - ITZLIPOFUTZLI = "#itzlipofutzli", JOIN_BY_CODE_TEXT_EDIT = "#join_by_code_text_edit", JOINCODE_ERROR_ICON_VISIBLE = "#joincode_error_icon_visible", JOYSTICK_VISIBILITY_HIDDEN = "#joystick_visibility_hidden", JOYSTICK_VISIBILITY_HIDDEN_WHEN_UNUSED = "#joystick_visibility_hidden_when_unused", JOYSTICK_VISIBILITY_VISIBLE = "#joystick_visibility_visible", - KH8C = "#kh8C", LANGUAGE_COLLAPSED_COLLECTION_LENGTH = "#language_collapsed_collection_length", LANGUAGE_COLUMNS_COLLECTION_LENGTH = "#language_columns_collection_length", LANGUAGE_ROWS_COLLECTION_LENGTH = "#language_rows_collection_length", diff --git a/src/types/enums/ButtonId.ts b/src/types/enums/ButtonId.ts index b649b55..6340cf6 100644 --- a/src/types/enums/ButtonId.ts +++ b/src/types/enums/ButtonId.ts @@ -1108,4 +1108,279 @@ export enum ButtonId { VIEW_TOGGLE = "button.view_toggle", UPDATE_AND_PLAY = "button.update_and_play", SELECT_WORLDS = "button.select_worlds", + PADDLE_LEFT = "button.paddle_left", + ADD_POPUP_ESCAPE = "button.add_popup_escape", + CLEAR_SCREENSHOTS_CACHE = "button.clear_screenshots_cache", + DESELECTED_PACK = "button.deselected_pack", + STORE = "button.store", + SORT_UP = "button.sort_up", + PADDLE_RIGHT = "button.paddle_right", + CONTROL = "button.control", + ENABLE_TEXT_TO_SPEECH = "button.enable_text_to_speech", + LOOK_UP_SMOOTH = "button.look_up_smooth", + FULL_SCREEN = "button.full_screen", + BUILD_OR_ATTACK_OR_BLOCK_SELECT = "button.build_or_attack_or_block_select", + DOWNRIGHT = "button.downright", + SHOWEULA = "button.showEula", + ADD_REALM = "button.add_realm", + CLOSE_OPTIONS_POPUP = "button.close_options_popup", + EDUCLOUD_LEARN_MORE = "button.eduCloud_learn_more", + LOOK_DOWN_SMOOTH = "button.look_down_smooth", + COMMAND_MACRO_2 = "button.command_macro_2", + COMMAND_MACRO_6 = "button.command_macro_6", + ADDITIONAL_REALMS_BUY_BUTTON = "button.additional_realms_buy_button", + MANUAL_SAVE_CHECKBOX = "button.manual_save_checkbox", + EXPAND_REALMS = "button.expand_realms", + DELETE_ACCOUNT = "button.delete_account", + EXPAND_ADVANCED_GRAPHICS = "button.expand_advanced_graphics", + DESTROY_OR_INTERACT = "button.destroy_or_interact", + LOOK_RIGHT_SMOOTH = "button.look_right_smooth", + COMMAND_MACRO_7 = "button.command_macro_7", + SETTINGS_HELP = "button.settings_help", + RESET_PARTY_SETTINGS_FILTERS = "button.reset_party_settings_filters", + TAG_TRAILER = "button.tag_trailer", + EMOTE_SLOT_2 = "button.emote_slot_2", + COMMAND_MACRO_3 = "button.command_macro_3", + FORCE_GUI_SCALING = "button.force_gui_scaling", + PRIVACY_AND_ONLINE_SAFETY = "button.privacy_and_online_safety", + ADDITIONAL_REALMS_RIGHT_BUTTON = "button.additional_realms_right_button", + SAVE_ACTIVE_WORLD_BUTTON = "button.save_active_world_button", + EDU_CLOUD_CONFLICT_RESOLUTION_CLOUD_BUTTON = "button.edu_cloud_conflict_resolution_cloud_button", + COPY_FACING_COORDINATES = "button.copy_facing_coordinates", + LOOK_LEFT = "button.look_left", + WINDOW_RIGHT = "button.window_right", + FOCUS_DEBUG = "button.focus_debug", + FRIENDS_DRAWER = "button.friends_drawer", + AVAILABLE_PACK = "button.available_pack", + PREVIEW_APP1 = "button.preview_app1", + NAVIGATE_TO_STORE_SEARCH_RESOURCE = "button.navigate_to_store_search_resource", + TAB_BUTTON = "button.tab_button", + BUILD_OR_INTERACT = "button.build_or_interact", + COMMAND_MACRO_CHORD_7 = "button.command_macro_chord_7", + OUTPUT_COALESCE_STACK = "button.output_coalesce_stack", + VIEW_PROFILE = "button.view_profile", + MENU_TERTIARY_SELECT = "button.menu_tertiary_select", + SNEAK = "button.sneak", + SHIFT = "button.shift", + COPY_FACING_BLOCK_COORDINATES = "button.copy_facing_block_coordinates", + LOOK_DOWN = "button.look_down", + LABTABLE_TAKE_ALL_PLACE_ALL = "button.labtable_take_all_place_all", + RECIPE_BOOK_TOGGLE_HOVERED = "button.recipe_book_toggle_hovered", + PLAY_WORLD = "button.play_world", + CLEAR_DIAGNOSTICS_CAPTURES = "button.clear_diagnostics_captures", + DEV_TRIGGER_GRAPHICS_DEVICE_LOSS = "button.dev_trigger_graphics_device_loss", + RIGHT = "button.right", + DESCEND = "button.descend", + LOOK_UP_LEFT = "button.look_up_left", + OPEN_DEMO_POPUP_LINK = "button.open_demo_popup_link", + EXPAND_SELECTED = "button.expand_selected", + EXPAND_AVAILABLE = "button.expand_available", + LESSON_COMPLETE = "button.lesson_complete", + TUTORIAL_RESTART = "button.tutorial_restart", + TOGGLE_PERSPECTIVE = "button.toggle_perspective", + SPRINT = "button.sprint", + BLOCK_SELECT = "button.block_select", + EMOTE_SLOT_1 = "button.emote_slot_1", + CONFIRM_PASSCODE = "button.confirm_passcode", + POINTER_PRESSED = "button.pointer_pressed", + VISUAL_BUTTON = "button.visual_button", + DOWNLOAD_SAVE = "button.download_save", + CONNECTING_CLOSE = "button.connecting_close", + ERROR_CLOSE = "button.error_close", + FLY_UP_SLOW = "button.fly_up_slow", + EMOTE_SLOT_3 = "button.emote_slot_3", + ERROR_OK = "button.error_ok", + SELECTED_PACK = "button.selected_pack", + CLOSE_EDUCLOUD_ERROR_POPUP = "button.close_eduCloud_error_popup", + MENU_TEXTCURSORLEFT = "button.menu_textcursorleft", + DEV_CONSOLE_2 = "button.dev_console_2", + JUMP = "button.jump", + SPRINT_TOGGLE = "button.sprint_toggle", + SWITCH_TO_CONTROLLER = "button.switch_to_controller", + CONTENT_LOG_HISTORY_CHORD = "button.content_log_history_chord", + CHANGE_FLIGHT_HEIGHT = "button.change_flight_height", + COMP_CREATE_TAKE_ALL_PLACE_ALL = "button.comp_create_take_all_place_all", + MATREDUCE_TAKE_ALL_PLACE_ALL = "button.matreduce_take_all_place_all", + STARTBROWSING = "button.startBrowsing", + REALMS_COPY_INVITE_LINK = "button.realms_copy_invite_link", + SIGN_IN = "button.sign_in", + NAVIGATE_TO_STORE_SEARCH_MASHUP = "button.navigate_to_store_search_mashup", + LEFT = "button.left", + BLOCK_SELECT_TOGGLE = "button.block_select_toggle", + COMMAND_MACRO_CHORD_4 = "button.command_macro_chord_4", + OUTPUT_TAKE_ONE_PLACE_ONE = "button.output_take_one_place_one", + CUSTOMIZE_TOOLTIP_OPTION_IS_HOVERED = "button.customize_tooltip_option_is_hovered", + PAUSE = "button.pause", + FORCE_SCREENS_TYPE_POCKET = "button.force_screens_type_pocket", + RELOAD_UI_DEFINITIONS = "button.reload_ui_definitions", + EDU_CLOUD_HYPERLINK = "button.edu_cloud_hyperlink", + MENU_TEXTCURSORRIGHT = "button.menu_textcursorright", + LOOK_UP = "button.look_up", + COMMAND_MACRO_9 = "button.command_macro_9", + COMMAND_MACRO_CHORD_1 = "button.command_macro_chord_1", + HOME = "button.home", + DELETE_LOCAL_SCREENSHOTS = "button.delete_local_screenshots", + ADDITIONAL_REALMS_LEFT_BUTTON = "button.additional_realms_left_button", + SORT_DOWN = "button.sort_down", + DEBUG_DRAWER_BUTTON = "button.debug_drawer_button", + EDUCLOUD_ERROR_OK = "button.eduCloud_error_ok", + FEEDBACK_LINK = "button.feedback_link", + OPEN_EXPANDED_APPEARANCE_VIEW = "button.open_expanded_appearance_view", + CLICK_ON = "button.click_on", + SNEAK_TOGGLE = "button.sneak_toggle", + LOOK_CENTER = "button.look_center", + MEMORY_WARNING_CANCEL = "button.memory_warning_cancel", + REPORT_ERRORS = "button.report_errors", + DOWNLOAD_FAILED_CANCEL = "button.download_failed_cancel", + POPUP_ESCAPE = "button.popup_escape", + TAG_ESCAPE = "button.tag_escape", + NAVIGATE_TO_STORE_SEARCH_WORLD = "button.navigate_to_store_search_world", + ASCEND = "button.ascend", + LOOK_DOWN_SLIGHT = "button.look_down_slight", + LOOK_DOWN_LEFT = "button.look_down_left", + LABTABLE_COALESCE_STACK = "button.labtable_coalesce_stack", + MOVE_LEFT = "button.move_left", + PACK_SETTINGS = "button.pack_settings", + RESET_NEW_PLAYER_FLOW = "button.reset_new_player_flow", + SELECT_CONTROL_MODE = "button.select_control_mode", + COPY_CURRENT_COORDINATES = "button.copy_current_coordinates", + COMMAND_MACRO_CHORD_8 = "button.command_macro_chord_8", + COMBINE = "button.combine", + OPEN_DEV_CONSOLE = "button.open_dev_console", + REALMS_PLUS_BUY_BUTTON = "button.realms_plus_buy_button", + DELETE_SAVE = "button.delete_save", + JOIN_AND_DOWNLOAD_REQUIRED = "button.join_and_download_required", + LIBRARY_BACK_BUTTON = "button.library_back_button", + TURN_DOWN = "button.turn_down", + BLOCK_SELECT_WITH_DATA = "button.block_select_with_data", + CONSOLE = "button.console", + WINDOW_LEFT = "button.window_left", + PICK_DEBUG_OBJECT = "button.pick_debug_object", + SIMULATE_TOUCH = "button.simulate_touch", + CLOSE_TO_CODE_ENTRY = "button.close_to_code_entry", + CLOUD_LEARN_MORE_LINK = "button.cloud_learn_more_link", + COPY_BUILD_INFO = "button.copy_build_info", + OPEN_COLOR_PICKER = "button.open_color_picker", + CONTENT_LOG_HISTORY = "button.content_log_history", + MEMORY_WARNING_OK = "button.memory_warning_ok", + VISIT_HELP = "button.visit_help", + UNOWNED_PACK = "button.unowned_pack", + ADDONLINK = "button.addonLink", + EDU_CLOUD_CONFLICT_RESOLUTION_BOTH_BUTTON = "button.edu_cloud_conflict_resolution_both_button", + COMP_CREATE_COALESCE_STACK = "button.comp_create_coalesce_stack", + BUY_NOW = "button.buy_now", + TEN_USERS = "button.ten_users", + CLOSE_PERMISSIONS_POPUP = "button.close_permissions_popup", + ONEDRIVE_LINK = "button.onedrive_link", + EMOTE_SLOT_0 = "button.emote_slot_0", + COMMAND_MACRO_4 = "button.command_macro_4", + ADD_SERVER = "button.add_server", + FIRST_LOWER_POPUP_BUTTON = "button.first_lower_popup_button", + TURN_UP = "button.turn_up", + RESOURCES = "button.resources", + CLICK_OFF = "button.click_off", + DEV_CONSOLE = "button.dev_console", + LOOK_LEFT_SMOOTH = "button.look_left_smooth", + COMMAND_MACRO_0 = "button.command_macro_0", + COMMAND_MACRO_CHORD_0 = "button.command_macro_chord_0", + COMMAND_MACRO_CHORD_5 = "button.command_macro_chord_5", + LIBRARY_CATEGORY = "button.library_category", + GOBACK = "button.goBack", + LEARN_MORE_POPUP_LINK = "button.learn_more_popup_link", + CODE_BUILDER = "button.code_builder", + JOIN_AND_DOWNLOAD_EVERYTHING = "button.join_and_download_everything", + IMAGE_PREV = "button.image_prev", + UP_IGNORE = "button.up_ignore", + ASCENDSCAFFOLDING = "button.ascendScaffolding", + FLY_DOWN_SLOW = "button.fly_down_slow", + HOTBAR_DROP_ALL = "button.hotbar_drop_all", + TEXT_TO_SPEECH = "button.text_to_speech", + COMMAND_MACRO_1 = "button.command_macro_1", + COMMAND_MACRO_CHORD_6 = "button.command_macro_chord_6", + EDUCATION_RESOURCES = "button.education_resources", + CSB_CANCEL = "button.csb_cancel", + TWO_USERS = "button.two_users", + SAVE_TO_STORAGE = "button.save_to_storage", + PREVIEW_APP2 = "button.preview_app2", + CYCLE_NEXT_DEBUG_OVERLAY_PAGE = "button.cycle_next_debug_overlay_page", + DEV_ALLOCATE_TEXTURE_HANDLES = "button.dev_allocate_texture_handles", + NAVIGATE_TO_STORE_SEARCH_ADDON = "button.navigate_to_store_search_addon", + OPEN_CRAFTING = "button.open_crafting", + LOOK_UP_RIGHT = "button.look_up_right", + TOGGLE_CONTROL_HUD = "button.toggle_control_hud", + COMMAND_MACRO_CHORD_2 = "button.command_macro_chord_2", + MENU_PROFILE = "button.menu_profile", + REALMS_PLUS_RIGHT_BUTTON = "button.realms_plus_right_button", + EDU_CLOUD_CONFLICT_RESOLUTION_LOCAL_BUTTON = "button.edu_cloud_conflict_resolution_local_button", + BUILD_OR_ATTACK = "button.build_or_attack", + INTERACT = "button.interact", + CLOUD_HELP_BUTTON = "button.cloud_help_button", + MENU_EDU_PLAY = "button.menu_edu_play", + CLOSE_SIGN_OUT_FAIL_POPUP = "button.close_sign_out_fail_popup", + CYCLE_PREVIOUS_DEBUG_OVERLAY_PAGE = "button.cycle_previous_debug_overlay_page", + LOOK_RIGHT = "button.look_right", + INVITE_LINKS = "button.invite_links", + DELETE_SELECTED_SAVES = "button.delete_selected_saves", + REALMS_PACK = "button.realms_pack", + EMOTE = "button.emote", + INTERACTWITHTOAST = "button.interactwithtoast", + DESTROY_OR_ATTACK = "button.destroy_or_attack", + LOOK_UP_SLIGHT = "button.look_up_slight", + UPLEFT = "button.upleft", + MATREDUCE_COALESCE_STACK = "button.matreduce_coalesce_stack", + CRAFTING_CONTAINER_AUTO_PLACE = "button.crafting_container_auto_place", + NEW_UI_DEBUG = "button.new_ui_debug", + CSB_INFO = "button.csb_info", + RESTORE_SAVE = "button.restore_save", + DOWNLOAD_FAILED_OPEN = "button.download_failed_open", + SELECT_ALL = "button.select_all", + SIGN_OUT = "button.sign_out", + COPY_ACCOUNT_INFO = "button.copy_account_info", + DROP = "button.drop", + COPY_COORDINATES = "button.copy_coordinates", + COMMAND_MACRO_CHORD_3 = "button.command_macro_chord_3", + SELECT_SAVE_OPTIONS = "button.select_save_options", + INVALID_PACK = "button.invalid_pack", + SERVER_FOUND_CLOSE = "button.server_found_close", + EXTERNAL_LINK = "button.external_link", + COMMAND_MACRO_8 = "button.command_macro_8", + COMMAND_MACRO_CHORD_9 = "button.command_macro_chord_9", + MODIFY_CONTROL_LAYOUT = "button.modify_control_layout", + RIGHT_LEARN_MORE = "button.right_learn_more", + SECOND_LOWER_POPUP_BUTTON = "button.second_lower_popup_button", + EMOTE_SELECTED_UPDATED = "button.emote_selected_updated", + ENTRY_CLOSE = "button.entry_close", + IMAGE_NEXT = "button.image_next", + DESCENDSCAFFOLDING = "button.descendScaffolding", + DOWN_IGNORE = "button.down_ignore", + COMMAND_MACRO_5 = "button.command_macro_5", + PASSCODE_POPUP_ESCAPE = "button.passcode_popup_escape", + VIEW_CHARACTER_CREATOR_ITEMS = "button.view_character_creator_items", + CSB_BUY = "button.csb_buy", + MORE_CODING = "button.more_coding", + NAVIGATE_TO_STORE_SEARCH_SKIN = "button.navigate_to_store_search_skin", + NAVIGATE_TO_STORE_SEARCH_VIBRANTVISUALS = "button.navigate_to_store_search_vibrantvisuals", + LOOK_DOWN_RIGHT = "button.look_down_right", + OUTPUT_TAKE_ALL_PLACE_ALL = "button.output_take_all_place_all", + SERVERS = "button.servers", + REALMS_PLUS_LEFT_BUTTON = "button.realms_plus_left_button", + REALMS_REMOVE_INVITE_LINK = "button.realms_remove_invite_link", + EXPAND_UNOWNED = "button.expand_unowned", + JOINCODE_SHARE = "button.joincode_share", + GAMMA_CALIBRATION = "button.gamma_calibration", + MOBEFFECTSANDINTERACTWITHTOAST = "button.mobeffectsandinteractwithtoast", + UPRIGHT = "button.upright", + DOWNLEFT = "button.downleft", + MENU_TOGGLE = "button.menu_toggle", + CLEAR_HOTBAR = "button.clear_hotbar", + LEFT_LEARN_MORE = "button.left_learn_more", + SET_SPAWN = "button.set_spawn", + DISMOUNT = "button.dismount", + GET_OFFLINE_AUTHCODE = "button.get_offline_authcode", + RESTART_HOSTING = "button.restart_hosting", + GET_CERTIFICATE = "button.get_certificate", + EQUIP_COLOR = "button.equip_color", + DOWN = "button.down", + ALT = "button.alt", + UP = "button.up", } \ No newline at end of file diff --git a/src/types/properties/value.ts b/src/types/properties/value.ts index 5fc2d81..c8c4d7e 100644 --- a/src/types/properties/value.ts +++ b/src/types/properties/value.ts @@ -77,6 +77,6 @@ export type ModificationItem = { where?: BindingItem | object target?: object target_control?: string - value?: object | (object | BindingItem)[] + value?: object operation?: Operation } diff --git a/test/app.ts b/test/app.ts index f2e98a3..39b1e33 100644 --- a/test/app.ts +++ b/test/app.ts @@ -1,11 +1,11 @@ -import { Label, Modify, Panel } from ".." +import { Anchor, Label, Modify } from ".." -const panel = Panel() +const label = Label({ + text: "Hello World!", + anchor: Anchor.TOP_MIDDLE, + offset: [0, 5], + layer: 50, + shadow: true, +}) -panel.addChild( - Label({ - text: "Hello World", - }), -) - -Modify("start", "start_screen_content").insertChild(panel).addBindings({}) +Modify("start", "start_screen_content").insertChild(label)