net.dreditor.ui 0.0.0-stage → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AnimatorMenuGroup.cs +299 -0
- package/AnimatorMenuGroup.cs.meta +11 -0
- package/Buttons/AnyKey.cs +74 -0
- package/Buttons/AnyKey.cs.meta +11 -0
- package/Buttons/ContinueLoadGameButton.cs +73 -0
- package/Buttons/ContinueLoadGameButton.cs.meta +11 -0
- package/Buttons/ContinueSelectIfDataLoaded.cs +68 -0
- package/Buttons/ContinueSelectIfDataLoaded.cs.meta +11 -0
- package/Buttons/DREButton.cs +75 -0
- package/Buttons/DREButton.cs.meta +11 -0
- package/Buttons/EvaluateLoadGameButton.cs +156 -0
- package/Buttons/EvaluateLoadGameButton.cs.meta +11 -0
- package/Buttons/MainMenuButton.cs +67 -0
- package/Buttons/MainMenuButton.cs.meta +11 -0
- package/Buttons/MoveToLoadedScene.cs +32 -0
- package/Buttons/MoveToLoadedScene.cs.meta +11 -0
- package/Buttons/MoveToScene.cs +81 -0
- package/Buttons/MoveToScene.cs.meta +11 -0
- package/Buttons/NewGameButton.cs +42 -0
- package/Buttons/NewGameButton.cs.meta +11 -0
- package/Buttons/QuitButton.cs +19 -0
- package/Buttons/QuitButton.cs.meta +11 -0
- package/Buttons/StartGameButton.cs +71 -0
- package/Buttons/StartGameButton.cs.meta +11 -0
- package/Buttons.meta +8 -0
- package/CarouselBase.cs +152 -0
- package/CarouselBase.cs.meta +2 -0
- package/CarouselComponent.cs +36 -0
- package/CarouselComponent.cs.meta +2 -0
- package/CarouselListExtentions.cs +50 -0
- package/CarouselListExtentions.cs.meta +11 -0
- package/CarouselSelectTweening.cs +253 -0
- package/CarouselSelectTweening.cs.meta +11 -0
- package/ChangeSpriteOnIndex.cs +67 -0
- package/ChangeSpriteOnIndex.cs.meta +11 -0
- package/DREditor.UI.asmdef +28 -0
- package/DREditor.UI.asmdef.meta +7 -0
- package/IGridIconSlot.cs +22 -0
- package/IGridIconSlot.cs.meta +11 -0
- package/ITrackableIndex.cs +16 -0
- package/ITrackableIndex.cs.meta +2 -0
- package/IUnlockableUIOption.cs +16 -0
- package/IUnlockableUIOption.cs.meta +11 -0
- package/IndexSelector.cs +188 -0
- package/IndexSelector.cs.meta +2 -0
- package/LayeredFocusCarousel.cs +36 -0
- package/LayeredFocusCarousel.cs.meta +2 -0
- package/MenuGroup.cs +295 -0
- package/MenuGroup.cs.meta +11 -0
- package/MenuGroupBase.cs +233 -0
- package/MenuGroupBase.cs.meta +11 -0
- package/MenuModifier.cs +45 -0
- package/MenuModifier.cs.meta +11 -0
- package/MenuState.cs +69 -0
- package/MenuState.cs.meta +11 -0
- package/Options/ChangerUIList.cs +55 -0
- package/Options/ChangerUIList.cs.meta +11 -0
- package/Options/DifficultyGroup.cs +225 -0
- package/Options/DifficultyGroup.cs.meta +11 -0
- package/Options/Editor/OptionBuilder.cs +149 -0
- package/Options/Editor/OptionBuilder.cs.meta +11 -0
- package/Options/Editor/OptionBuilderEditor.cs +325 -0
- package/Options/Editor/OptionBuilderEditor.cs.meta +11 -0
- package/Options/Editor/OptionInstance.cs +23 -0
- package/Options/Editor/OptionInstance.cs.meta +11 -0
- package/Options/Editor/OptionType.cs +23 -0
- package/Options/Editor/OptionType.cs.meta +11 -0
- package/Options/Editor.meta +8 -0
- package/Options/NavigationGroup.cs +36 -0
- package/Options/NavigationGroup.cs.meta +11 -0
- package/Options/NavigationSelect.cs +37 -0
- package/Options/NavigationSelect.cs.meta +11 -0
- package/Options/OptionToggleUI.cs +253 -0
- package/Options/OptionToggleUI.cs.meta +11 -0
- package/Options/OptionUIGroup.cs +303 -0
- package/Options/OptionUIGroup.cs.meta +11 -0
- package/Options/OptionUIGroupBase.cs +41 -0
- package/Options/OptionUIGroupBase.cs.meta +11 -0
- package/Options/OptionUIManager.cs +69 -0
- package/Options/OptionUIManager.cs.meta +11 -0
- package/Options/SelectableOption.cs +63 -0
- package/Options/SelectableOption.cs.meta +11 -0
- package/Options/SliderOption.cs +48 -0
- package/Options/SliderOption.cs.meta +11 -0
- package/Options/SliderUIOption.cs +99 -0
- package/Options/SliderUIOption.cs.meta +11 -0
- package/Options/ToggleOption.cs +15 -0
- package/Options/ToggleOption.cs.meta +11 -0
- package/Options.meta +8 -0
- package/PopUpModifier.cs +127 -0
- package/PopUpModifier.cs.meta +11 -0
- package/RegulationRules/IRegulation.cs +37 -0
- package/RegulationRules/IRegulation.cs.meta +11 -0
- package/RegulationRules/IRegulationsUIRepository.cs +19 -0
- package/RegulationRules/IRegulationsUIRepository.cs.meta +11 -0
- package/RegulationRules/Regulation.cs +85 -0
- package/RegulationRules/Regulation.cs.meta +11 -0
- package/RegulationRules/RegulationAnimations/RegulationAnimator.controller +220 -0
- package/RegulationRules/RegulationAnimations/RegulationAnimator.controller.meta +8 -0
- package/RegulationRules/RegulationAnimations/ShowRegulation.anim +295 -0
- package/RegulationRules/RegulationAnimations/ShowRegulation.anim.meta +8 -0
- package/RegulationRules/RegulationAnimations.meta +8 -0
- package/RegulationRules/RegulationDisplayer.cs +42 -0
- package/RegulationRules/RegulationDisplayer.cs.meta +2 -0
- package/RegulationRules/RegulationSaveHandler.cs +96 -0
- package/RegulationRules/RegulationSaveHandler.cs.meta +11 -0
- package/RegulationRules/RegulationsDatabase.cs +53 -0
- package/RegulationRules/RegulationsDatabase.cs.meta +11 -0
- package/RegulationRules/RegulationsUI.cs +238 -0
- package/RegulationRules/RegulationsUI.cs.meta +11 -0
- package/RegulationRules/RegulationsUIBase.cs +108 -0
- package/RegulationRules/RegulationsUIBase.cs.meta +2 -0
- package/RegulationRules/RegulationsUtility.cs +151 -0
- package/RegulationRules/RegulationsUtility.cs.meta +11 -0
- package/RegulationRules.meta +8 -0
- package/RewireUINavigation.cs +226 -0
- package/RewireUINavigation.cs.meta +11 -0
- package/Samples/3D_UI_Canvas_Shell.prefab +709 -0
- package/Samples/3D_UI_Canvas_Shell.prefab.meta +7 -0
- package/Samples/3D_UI_Canvas_Template.prefab +365 -0
- package/Samples/3D_UI_Canvas_Template.prefab.meta +7 -0
- package/Samples/Animations/3D/ConfirmSelection.anim +1313 -0
- package/Samples/Animations/3D/ConfirmSelection.anim.meta +8 -0
- package/Samples/Animations/3D/DeSelected.anim +431 -0
- package/Samples/Animations/3D/DeSelected.anim.meta +8 -0
- package/Samples/Animations/3D/Disappear.anim +536 -0
- package/Samples/Animations/3D/Disappear.anim.meta +8 -0
- package/Samples/Animations/3D/IsSelected.anim +431 -0
- package/Samples/Animations/3D/IsSelected.anim.meta +8 -0
- package/Samples/Animations/3D/ItemFade.anim +161 -0
- package/Samples/Animations/3D/ItemFade.anim.meta +8 -0
- package/Samples/Animations/3D/ItemIcon.anim +334 -0
- package/Samples/Animations/3D/ItemIcon.anim.meta +8 -0
- package/Samples/Animations/3D/Reticle.anim +173 -0
- package/Samples/Animations/3D/Reticle.anim.meta +8 -0
- package/Samples/Animations/3D/Reticle.controller +2574 -0
- package/Samples/Animations/3D/Reticle.controller.meta +8 -0
- package/Samples/Animations/3D/SBFadeIn.anim +311 -0
- package/Samples/Animations/3D/SBFadeIn.anim.meta +8 -0
- package/Samples/Animations/3D/SBLoop.anim +467 -0
- package/Samples/Animations/3D/SBLoop.anim.meta +8 -0
- package/Samples/Animations/3D.meta +8 -0
- package/Samples/Animations/Dialogue/Choices/Choice.controller +666 -0
- package/Samples/Animations/Dialogue/Choices/Choice.controller.meta +8 -0
- package/Samples/Animations/Dialogue/Choices/Choices.controller +304 -0
- package/Samples/Animations/Dialogue/Choices/Choices.controller.meta +8 -0
- package/Samples/Animations/Dialogue/Choices/ShowChoice.anim +116 -0
- package/Samples/Animations/Dialogue/Choices/ShowChoice.anim.meta +8 -0
- package/Samples/Animations/Dialogue/Choices.meta +8 -0
- package/Samples/Animations/Dialogue/Dialogue UI/Dialogue UI.controller +762 -0
- package/Samples/Animations/Dialogue/Dialogue UI/Dialogue UI.controller.meta +8 -0
- package/Samples/Animations/Dialogue/Dialogue UI/HideBox.anim +1512 -0
- package/Samples/Animations/Dialogue/Dialogue UI/HideBox.anim.meta +8 -0
- package/Samples/Animations/Dialogue/Dialogue UI/MoveBackDialogue.anim +692 -0
- package/Samples/Animations/Dialogue/Dialogue UI/MoveBackDialogue.anim.meta +8 -0
- package/Samples/Animations/Dialogue/Dialogue UI/MoveDialogue.anim +1710 -0
- package/Samples/Animations/Dialogue/Dialogue UI/MoveDialogue.anim.meta +8 -0
- package/Samples/Animations/Dialogue/Dialogue UI/ShowDialogue.anim +1583 -0
- package/Samples/Animations/Dialogue/Dialogue UI/ShowDialogue.anim.meta +8 -0
- package/Samples/Animations/Dialogue/Dialogue UI/ShowInstant.anim +962 -0
- package/Samples/Animations/Dialogue/Dialogue UI/ShowInstant.anim.meta +8 -0
- package/Samples/Animations/Dialogue/Dialogue UI.meta +8 -0
- package/Samples/Animations/Dialogue/Protag WIndow/HideProtag.anim +179 -0
- package/Samples/Animations/Dialogue/Protag WIndow/HideProtag.anim.meta +8 -0
- package/Samples/Animations/Dialogue/Protag WIndow/ProtagUIWindow.controller +214 -0
- package/Samples/Animations/Dialogue/Protag WIndow/ProtagUIWindow.controller.meta +8 -0
- package/Samples/Animations/Dialogue/Protag WIndow/ShowProtag.anim +179 -0
- package/Samples/Animations/Dialogue/Protag WIndow/ShowProtag.anim.meta +8 -0
- package/Samples/Animations/Dialogue/Protag WIndow.meta +8 -0
- package/Samples/Animations/Dialogue/Show Item/HideItem.anim +116 -0
- package/Samples/Animations/Dialogue/Show Item/HideItem.anim.meta +8 -0
- package/Samples/Animations/Dialogue/Show Item/Item Image.controller +130 -0
- package/Samples/Animations/Dialogue/Show Item/Item Image.controller.meta +8 -0
- package/Samples/Animations/Dialogue/Show Item/ShowItem.anim +116 -0
- package/Samples/Animations/Dialogue/Show Item/ShowItem.anim.meta +8 -0
- package/Samples/Animations/Dialogue/Show Item.meta +8 -0
- package/Samples/Animations/Dialogue.meta +8 -0
- package/Samples/Animations/Investigation/BulletGet/Bullet Get Canvas.controller +410 -0
- package/Samples/Animations/Investigation/BulletGet/Bullet Get Canvas.controller.meta +8 -0
- package/Samples/Animations/Investigation/BulletGet/ShowBulletPicture.anim +242 -0
- package/Samples/Animations/Investigation/BulletGet/ShowBulletPicture.anim.meta +8 -0
- package/Samples/Animations/Investigation/BulletGet/ShowGetBullet.anim +809 -0
- package/Samples/Animations/Investigation/BulletGet/ShowGetBullet.anim.meta +8 -0
- package/Samples/Animations/Investigation/BulletGet.meta +8 -0
- package/Samples/Animations/Investigation.meta +8 -0
- package/Samples/Animations/Main_Menu/DifficultyGroup.controller +220 -0
- package/Samples/Animations/Main_Menu/DifficultyGroup.controller.meta +8 -0
- package/Samples/Animations/Main_Menu/HideOptionsMenu.anim +474 -0
- package/Samples/Animations/Main_Menu/HideOptionsMenu.anim.meta +8 -0
- package/Samples/Animations/Main_Menu/MenuOption.controller +1206 -0
- package/Samples/Animations/Main_Menu/MenuOption.controller.meta +8 -0
- package/Samples/Animations/Main_Menu/Options Group.controller +249 -0
- package/Samples/Animations/Main_Menu/Options Group.controller.meta +8 -0
- package/Samples/Animations/Main_Menu/Press Start.controller +729 -0
- package/Samples/Animations/Main_Menu/Press Start.controller.meta +8 -0
- package/Samples/Animations/Main_Menu/RevealOptions.anim +743 -0
- package/Samples/Animations/Main_Menu/RevealOptions.anim.meta +8 -0
- package/Samples/Animations/Main_Menu/RevealOptionsMenu.anim +456 -0
- package/Samples/Animations/Main_Menu/RevealOptionsMenu.anim.meta +8 -0
- package/Samples/Animations/Main_Menu.meta +8 -0
- package/Samples/Animations/Main_UI/HideMainUI.anim +998 -0
- package/Samples/Animations/Main_UI/HideMainUI.anim.meta +8 -0
- package/Samples/Animations/Main_UI/Main UI.controller +248 -0
- package/Samples/Animations/Main_UI/Main UI.controller.meta +8 -0
- package/Samples/Animations/Main_UI.meta +8 -0
- package/Samples/Animations/Truth_Bullet_Menu/ShowTBM.anim +295 -0
- package/Samples/Animations/Truth_Bullet_Menu/ShowTBM.anim.meta +8 -0
- package/Samples/Animations/Truth_Bullet_Menu/Truth Bullet Canvas.controller +220 -0
- package/Samples/Animations/Truth_Bullet_Menu/Truth Bullet Canvas.controller.meta +8 -0
- package/Samples/Animations/Truth_Bullet_Menu.meta +8 -0
- package/Samples/Animations.meta +8 -0
- package/Samples/Animator_Bool_UI_Visibility_ETemplate.prefab +81 -0
- package/Samples/Animator_Bool_UI_Visibility_ETemplate.prefab.meta +7 -0
- package/Samples/Animator_Visibility_Canvas_Template.prefab +185 -0
- package/Samples/Animator_Visibility_Canvas_Template.prefab.meta +7 -0
- package/Samples/Appear_Bool_Handler.prefab +511 -0
- package/Samples/Appear_Bool_Handler.prefab.meta +7 -0
- package/Samples/Bool_Save_Handler.prefab +79 -0
- package/Samples/Bool_Save_Handler.prefab.meta +7 -0
- package/Samples/Carousel_Component_Shell.prefab +115 -0
- package/Samples/Carousel_Component_Shell.prefab.meta +7 -0
- package/Samples/Carousel_Component_Template.prefab +174 -0
- package/Samples/Carousel_Component_Template.prefab.meta +7 -0
- package/Samples/Chapter_Number_Text.prefab +177 -0
- package/Samples/Chapter_Number_Text.prefab.meta +7 -0
- package/Samples/Chapter_Section_UI_Template.prefab +290 -0
- package/Samples/Chapter_Section_UI_Template.prefab.meta +7 -0
- package/Samples/Chapter_Text.prefab +175 -0
- package/Samples/Chapter_Text.prefab.meta +7 -0
- package/Samples/Choice_Manager_Shell.prefab +232 -0
- package/Samples/Choice_Manager_Shell.prefab.meta +7 -0
- package/Samples/Choice_Manager_Template.prefab +377 -0
- package/Samples/Choice_Manager_Template.prefab.meta +7 -0
- package/Samples/Choice_Option_Shell.prefab +257 -0
- package/Samples/Choice_Option_Shell.prefab.meta +7 -0
- package/Samples/Choice_Option_Template.prefab +285 -0
- package/Samples/Choice_Option_Template.prefab.meta +7 -0
- package/Samples/Choice_Option_Yes_No_Template.prefab +196 -0
- package/Samples/Choice_Option_Yes_No_Template.prefab.meta +7 -0
- package/Samples/Choice_UI_Shell.prefab +118 -0
- package/Samples/Choice_UI_Shell.prefab.meta +7 -0
- package/Samples/Choice_UI_Template.prefab +601 -0
- package/Samples/Choice_UI_Template.prefab.meta +7 -0
- package/Samples/ClickedNewGame.asset +21 -0
- package/Samples/ClickedNewGame.asset.meta +8 -0
- package/Samples/Confirm_Canvas_Shell.prefab +85 -0
- package/Samples/Confirm_Canvas_Shell.prefab.meta +7 -0
- package/Samples/Confirm_Canvas_Template.prefab +716 -0
- package/Samples/Confirm_Canvas_Template.prefab.meta +7 -0
- package/Samples/Confirm_Select_Bool_Handler.prefab +448 -0
- package/Samples/Confirm_Select_Bool_Handler.prefab.meta +7 -0
- package/Samples/Continue_Button_ETemplate.prefab +344 -0
- package/Samples/Continue_Button_ETemplate.prefab.meta +7 -0
- package/Samples/ContinuedGame.asset +15 -0
- package/Samples/ContinuedGame.asset.meta +8 -0
- package/Samples/ControlPresets/BlackenedSelect_Controls.preset +120 -0
- package/Samples/ControlPresets/BlackenedSelect_Controls.preset.meta +8 -0
- package/Samples/ControlPresets/CA_Controls.preset +145 -0
- package/Samples/ControlPresets/CA_Controls.preset.meta +8 -0
- package/Samples/ControlPresets/ControlsDatabase.preset +117 -0
- package/Samples/ControlPresets/ControlsDatabase.preset.meta +8 -0
- package/Samples/ControlPresets/Convo_Controls.preset +195 -0
- package/Samples/ControlPresets/Convo_Controls.preset.meta +8 -0
- package/Samples/ControlPresets/FTE_Minigame_UI_Controls.preset +195 -0
- package/Samples/ControlPresets/FTE_Minigame_UI_Controls.preset.meta +8 -0
- package/Samples/ControlPresets/NSDP_Controls.preset +220 -0
- package/Samples/ControlPresets/NSDP_Controls.preset.meta +8 -0
- package/Samples/ControlPresets/NSD_Controls.preset +195 -0
- package/Samples/ControlPresets/NSD_Controls.preset.meta +8 -0
- package/Samples/ControlPresets/RS_Controls.preset +195 -0
- package/Samples/ControlPresets/RS_Controls.preset.meta +8 -0
- package/Samples/ControlPresets/TPFD_Controls.preset +245 -0
- package/Samples/ControlPresets/TPFD_Controls.preset.meta +8 -0
- package/Samples/ControlPresets/ThreeD_Controls.preset +245 -0
- package/Samples/ControlPresets/ThreeD_Controls.preset.meta +8 -0
- package/Samples/ControlPresets/Trial_Convo_Controls.preset +195 -0
- package/Samples/ControlPresets/Trial_Convo_Controls.preset.meta +8 -0
- package/Samples/ControlPresets.meta +8 -0
- package/Samples/Control_UI_Row_ETemplate.prefab +565 -0
- package/Samples/Control_UI_Row_ETemplate.prefab.meta +7 -0
- package/Samples/Controls_TAB_ETemplate.prefab +556 -0
- package/Samples/Controls_TAB_ETemplate.prefab.meta +7 -0
- package/Samples/Controls_UI_Canvas_ETemplate.prefab +620 -0
- package/Samples/Controls_UI_Canvas_ETemplate.prefab.meta +7 -0
- package/Samples/Controls_UI_Canvas_Shell.prefab +445 -0
- package/Samples/Controls_UI_Canvas_Shell.prefab.meta +7 -0
- package/Samples/Controls_UI_Condition.prefab +69 -0
- package/Samples/Controls_UI_Condition.prefab.meta +7 -0
- package/Samples/Controls_UI_Handler.prefab +196 -0
- package/Samples/Controls_UI_Handler.prefab.meta +7 -0
- package/Samples/Credits_Button_ETemplate.prefab +148 -0
- package/Samples/Credits_Button_ETemplate.prefab.meta +7 -0
- package/Samples/DRE_Regulations_UI.unity +525 -0
- package/Samples/DRE_Regulations_UI.unity.meta +7 -0
- package/Samples/DRE_Selectable_Option.prefab +308 -0
- package/Samples/DRE_Selectable_Option.prefab.meta +7 -0
- package/Samples/Dialogue_Box_ETemplate.prefab +452 -0
- package/Samples/Dialogue_Box_ETemplate.prefab.meta +7 -0
- package/Samples/Dialogue_Box_Text.prefab +152 -0
- package/Samples/Dialogue_Box_Text.prefab.meta +7 -0
- package/Samples/Dialogue_Box_UI_Visibility.prefab +75 -0
- package/Samples/Dialogue_Box_UI_Visibility.prefab.meta +7 -0
- package/Samples/Dialogue_Move_UI_Visibility.prefab +75 -0
- package/Samples/Dialogue_Move_UI_Visibility.prefab.meta +7 -0
- package/Samples/Dialogue_UI_Canvas_Shell.prefab +1365 -0
- package/Samples/Dialogue_UI_Canvas_Shell.prefab.meta +7 -0
- package/Samples/Dialogue_UI_Canvas_Template.prefab +736 -0
- package/Samples/Dialogue_UI_Canvas_Template.prefab.meta +7 -0
- package/Samples/Dialogue_UI_Visibility.prefab +343 -0
- package/Samples/Dialogue_UI_Visibility.prefab.meta +7 -0
- package/Samples/Difficulty_Group_Shell.prefab +468 -0
- package/Samples/Difficulty_Group_Shell.prefab.meta +7 -0
- package/Samples/Difficulty_Group_Template.prefab +575 -0
- package/Samples/Difficulty_Group_Template.prefab.meta +7 -0
- package/Samples/Difficulty_UI_Canvas_Shell.prefab +351 -0
- package/Samples/Difficulty_UI_Canvas_Shell.prefab.meta +7 -0
- package/Samples/Difficulty_UI_Canvas_Template.prefab +678 -0
- package/Samples/Difficulty_UI_Canvas_Template.prefab.meta +7 -0
- package/Samples/DisableContinueButton.asset +15 -0
- package/Samples/DisableContinueButton.asset.meta +8 -0
- package/Samples/DisablePauseCanvas.asset +15 -0
- package/Samples/DisablePauseCanvas.asset.meta +8 -0
- package/Samples/DisplayNameVisible.asset +21 -0
- package/Samples/DisplayNameVisible.asset.meta +8 -0
- package/Samples/Flash_White_Image.prefab +97 -0
- package/Samples/Flash_White_Image.prefab.meta +7 -0
- package/Samples/Float_Save_Handler.prefab +54 -0
- package/Samples/Float_Save_Handler.prefab.meta +7 -0
- package/Samples/HideFakePause.asset +14 -0
- package/Samples/HideFakePause.asset.meta +8 -0
- package/Samples/Instant_Dialogue_UI_Visibility.prefab +264 -0
- package/Samples/Instant_Dialogue_UI_Visibility.prefab.meta +7 -0
- package/Samples/Is_Selected_Bool_Handler.prefab +89 -0
- package/Samples/Is_Selected_Bool_Handler.prefab.meta +7 -0
- package/Samples/Item_Icon_Bool_Handler.prefab +89 -0
- package/Samples/Item_Icon_Bool_Handler.prefab.meta +7 -0
- package/Samples/Item_Name_Display_ETemplate.prefab +357 -0
- package/Samples/Item_Name_Display_ETemplate.prefab.meta +7 -0
- package/Samples/Letter_Box_Canvas.prefab +256 -0
- package/Samples/Letter_Box_Canvas.prefab.meta +7 -0
- package/Samples/Load_Game_Button_ETemplate.prefab +196 -0
- package/Samples/Load_Game_Button_ETemplate.prefab.meta +7 -0
- package/Samples/Main_Menu_Button_DRE.prefab +346 -0
- package/Samples/Main_Menu_Button_DRE.prefab.meta +7 -0
- package/Samples/Main_Menu_System_Shell.prefab +33 -0
- package/Samples/Main_Menu_System_Shell.prefab.meta +7 -0
- package/Samples/Main_Menu_UI_Canvas_Shell.prefab +355 -0
- package/Samples/Main_Menu_UI_Canvas_Shell.prefab.meta +7 -0
- package/Samples/Main_Menu_UI_Canvas_Template.prefab +426 -0
- package/Samples/Main_Menu_UI_Canvas_Template.prefab.meta +7 -0
- package/Samples/Main_UI_Canvas_Shell.prefab +649 -0
- package/Samples/Main_UI_Canvas_Shell.prefab.meta +7 -0
- package/Samples/Main_UI_Canvas_Template.prefab +365 -0
- package/Samples/Main_UI_Canvas_Template.prefab.meta +7 -0
- package/Samples/Menu_Group_Shell.prefab +261 -0
- package/Samples/Menu_Group_Shell.prefab.meta +7 -0
- package/Samples/Menu_Group_Template.prefab +1176 -0
- package/Samples/Menu_Group_Template.prefab.meta +7 -0
- package/Samples/Music_Section_UI_Template.prefab +172 -0
- package/Samples/Music_Section_UI_Template.prefab.meta +7 -0
- package/Samples/Nameplate.prefab +93 -0
- package/Samples/Nameplate.prefab.meta +7 -0
- package/Samples/New_Game_Button_ETemplate.prefab +254 -0
- package/Samples/New_Game_Button_ETemplate.prefab.meta +7 -0
- package/Samples/No_Button_ETemplate.prefab +144 -0
- package/Samples/No_Button_ETemplate.prefab.meta +7 -0
- package/Samples/Object_Name_On_Reticle.prefab +53 -0
- package/Samples/Object_Name_On_Reticle.prefab.meta +7 -0
- package/Samples/OnFinishedLoadingRoomNoDialogue.asset +14 -0
- package/Samples/OnFinishedLoadingRoomNoDialogue.asset.meta +8 -0
- package/Samples/OnLoadingRoom.asset +14 -0
- package/Samples/OnLoadingRoom.asset.meta +8 -0
- package/Samples/OnResumeFinished.asset +15 -0
- package/Samples/OnResumeFinished.asset.meta +8 -0
- package/Samples/Options_UI_Canvas_Shell.prefab +554 -0
- package/Samples/Options_UI_Canvas_Shell.prefab.meta +7 -0
- package/Samples/Options_UI_Canvas_Template.prefab +251 -0
- package/Samples/Options_UI_Canvas_Template.prefab.meta +7 -0
- package/Samples/PauseOptionData.asset +15 -0
- package/Samples/PauseOptionData.asset.meta +8 -0
- package/Samples/Pause_Menu_Shell.prefab +38 -0
- package/Samples/Pause_Menu_Shell.prefab.meta +7 -0
- package/Samples/Pause_Menu_System_Shell.prefab +428 -0
- package/Samples/Pause_Menu_System_Shell.prefab.meta +7 -0
- package/Samples/Pause_Menu_System_Template.prefab +536 -0
- package/Samples/Pause_Menu_System_Template.prefab.meta +7 -0
- package/Samples/Pause_Menu_Template.prefab +956 -0
- package/Samples/Pause_Menu_Template.prefab.meta +7 -0
- package/Samples/Pause_UI_Canvas_Shell.prefab +310 -0
- package/Samples/Pause_UI_Canvas_Shell.prefab.meta +7 -0
- package/Samples/Pause_UI_Canvas_Template.prefab +1433 -0
- package/Samples/Pause_UI_Canvas_Template.prefab.meta +7 -0
- package/Samples/Pop_Up_Button_Parent_Template.prefab +375 -0
- package/Samples/Pop_Up_Button_Parent_Template.prefab.meta +7 -0
- package/Samples/Pop_Up_Shell.prefab +146 -0
- package/Samples/Pop_Up_Shell.prefab.meta +7 -0
- package/Samples/Pop_Up_Template.prefab +442 -0
- package/Samples/Pop_Up_Template.prefab.meta +7 -0
- package/Samples/Present_Choice_UI_Template.prefab +142 -0
- package/Samples/Present_Choice_UI_Template.prefab.meta +7 -0
- package/Samples/Protag_Sprite_One.prefab +147 -0
- package/Samples/Protag_Sprite_One.prefab.meta +7 -0
- package/Samples/Protag_Window_UI_Shell.prefab +940 -0
- package/Samples/Protag_Window_UI_Shell.prefab.meta +7 -0
- package/Samples/Protag_Window_UI_Template.prefab +248 -0
- package/Samples/Protag_Window_UI_Template.prefab.meta +7 -0
- package/Samples/Quit_Game_Button_Template.prefab +328 -0
- package/Samples/Quit_Game_Button_Template.prefab.meta +7 -0
- package/Samples/Quit_Pop_Up_Template.prefab +145 -0
- package/Samples/Quit_Pop_Up_Template.prefab.meta +7 -0
- package/Samples/Regulations_Manager.prefab +67 -0
- package/Samples/Regulations_Manager.prefab.meta +7 -0
- package/Samples/Regulations_UI_Canvas_ETemplate.prefab +1243 -0
- package/Samples/Regulations_UI_Canvas_ETemplate.prefab.meta +7 -0
- package/Samples/ResetPauseMenu.asset +15 -0
- package/Samples/ResetPauseMenu.asset.meta +8 -0
- package/Samples/Reticle_Animation_Component.prefab +67 -0
- package/Samples/Reticle_Animation_Component.prefab.meta +7 -0
- package/Samples/Reticle_UI_Shell.prefab +1783 -0
- package/Samples/Reticle_UI_Shell.prefab.meta +7 -0
- package/Samples/Reticle_UI_Template.prefab +281 -0
- package/Samples/Reticle_UI_Template.prefab.meta +7 -0
- package/Samples/Save_Layout_Mask_Shell.prefab +154 -0
- package/Samples/Save_Layout_Mask_Shell.prefab.meta +7 -0
- package/Samples/Save_Layout_Mask_Template.prefab +3697 -0
- package/Samples/Save_Layout_Mask_Template.prefab.meta +7 -0
- package/Samples/Save_Load_Group_Shell.prefab +146 -0
- package/Samples/Save_Load_Group_Shell.prefab.meta +7 -0
- package/Samples/Save_Load_Group_Template.prefab +1718 -0
- package/Samples/Save_Load_Group_Template.prefab.meta +7 -0
- package/Samples/Save_Load_Menu_Canvas_Shell.prefab +134 -0
- package/Samples/Save_Load_Menu_Canvas_Shell.prefab.meta +7 -0
- package/Samples/Save_Load_Menu_Canvas_Template.prefab +2290 -0
- package/Samples/Save_Load_Menu_Canvas_Template.prefab.meta +7 -0
- package/Samples/Save_Load_Pause_Canvas_Template.prefab +191 -0
- package/Samples/Save_Load_Pause_Canvas_Template.prefab.meta +7 -0
- package/Samples/Save_Slot_ETemplate.prefab +619 -0
- package/Samples/Save_Slot_ETemplate.prefab.meta +7 -0
- package/Samples/SetNewGameTempFirst.asset +15 -0
- package/Samples/SetNewGameTempFirst.asset.meta +8 -0
- package/Samples/Set_Controls_Key_By_Mode_Event.prefab +62 -0
- package/Samples/Set_Controls_Key_By_Mode_Event.prefab.meta +7 -0
- package/Samples/ShowFakePause.asset +14 -0
- package/Samples/ShowFakePause.asset.meta +8 -0
- package/Samples/ShowPauseGroup.asset +14 -0
- package/Samples/ShowPauseGroup.asset.meta +8 -0
- package/Samples/Slider_Bar_Option_ETemplate.prefab +609 -0
- package/Samples/Slider_Bar_Option_ETemplate.prefab.meta +7 -0
- package/Samples/Speak_Icon_Bool_Handler.prefab +89 -0
- package/Samples/Speak_Icon_Bool_Handler.prefab.meta +7 -0
- package/Samples/StartPauseGroup.asset +14 -0
- package/Samples/StartPauseGroup.asset.meta +8 -0
- package/Samples/Start_Game_Button_DRE.prefab +226 -0
- package/Samples/Start_Game_Button_DRE.prefab.meta +7 -0
- package/Samples/Start_Group_ETemplate.prefab +330 -0
- package/Samples/Start_Group_ETemplate.prefab.meta +7 -0
- package/Samples/System_Menu_Shell.prefab +38 -0
- package/Samples/System_Menu_Shell.prefab.meta +7 -0
- package/Samples/System_Menu_Template.prefab +2396 -0
- package/Samples/System_Menu_Template.prefab.meta +7 -0
- package/Samples/System_TAB_ETemplate.prefab +734 -0
- package/Samples/System_TAB_ETemplate.prefab.meta +7 -0
- package/Samples/System_UI_Canvas_Shell.prefab +328 -0
- package/Samples/System_UI_Canvas_Shell.prefab.meta +7 -0
- package/Samples/System_UI_Canvas_Template.prefab +1520 -0
- package/Samples/System_UI_Canvas_Template.prefab.meta +7 -0
- package/Samples/TMP_Marq_Mask.prefab +336 -0
- package/Samples/TMP_Marq_Mask.prefab.meta +7 -0
- package/Samples/Title_Group_Shell.prefab +191 -0
- package/Samples/Title_Group_Shell.prefab.meta +7 -0
- package/Samples/Title_Group_Template.prefab +709 -0
- package/Samples/Title_Group_Template.prefab.meta +7 -0
- package/Samples/Toggle_Option_ETemplate.prefab +1086 -0
- package/Samples/Toggle_Option_ETemplate.prefab.meta +7 -0
- package/Samples/UI_Button_DRE.prefab +268 -0
- package/Samples/UI_Button_DRE.prefab.meta +7 -0
- package/Samples/Value_Event_Save_Handlers.prefab +413 -0
- package/Samples/Value_Event_Save_Handlers.prefab.meta +7 -0
- package/Samples/Yes_Button_ETemplate.prefab +260 -0
- package/Samples/Yes_Button_ETemplate.prefab.meta +7 -0
- package/Samples.meta +8 -0
- package/ScrollGridUI.cs +360 -0
- package/ScrollGridUI.cs.meta +11 -0
- package/ScrollOption.cs +65 -0
- package/ScrollOption.cs.meta +11 -0
- package/ScrollOptionModifier.cs +77 -0
- package/ScrollOptionModifier.cs.meta +11 -0
- package/ScrollableIndexSelector.cs +56 -0
- package/ScrollableIndexSelector.cs.meta +2 -0
- package/SelectHandler.cs +35 -0
- package/SelectHandler.cs.meta +11 -0
- package/SelectableMenuGroupBase.cs +197 -0
- package/SelectableMenuGroupBase.cs.meta +11 -0
- package/SelectableUIOption.cs +77 -0
- package/SelectableUIOption.cs.meta +11 -0
- package/SelectedItemDisplayer.cs +19 -0
- package/SelectedItemDisplayer.cs.meta +11 -0
- package/TrackedIndexListener.cs +67 -0
- package/TrackedIndexListener.cs.meta +2 -0
- package/UIControls/CallableControlledUI.cs +64 -0
- package/UIControls/CallableControlledUI.cs.meta +2 -0
- package/UIControls/CallableUIBase.cs +103 -0
- package/UIControls/CallableUIBase.cs.meta +11 -0
- package/UIControls/ControlPair.cs +24 -0
- package/UIControls/ControlPair.cs.meta +11 -0
- package/UIControls/ControlPanelRow.cs +67 -0
- package/UIControls/ControlPanelRow.cs.meta +11 -0
- package/UIControls/ControlsDatabase.cs +36 -0
- package/UIControls/ControlsDatabase.cs.meta +11 -0
- package/UIControls/ControlsUI.cs +336 -0
- package/UIControls/ControlsUI.cs.meta +11 -0
- package/UIControls/ControlsUIHandler.cs +16 -0
- package/UIControls/ControlsUIHandler.cs.meta +11 -0
- package/UIControls/ControlsUIPanel.cs +49 -0
- package/UIControls/ControlsUIPanel.cs.meta +11 -0
- package/UIControls/ControlsUIService.cs +12 -0
- package/UIControls/ControlsUIService.cs.meta +11 -0
- package/UIControls/ControlsUISlot.cs +243 -0
- package/UIControls/ControlsUISlot.cs.meta +11 -0
- package/UIControls/ControlsUITab.cs +80 -0
- package/UIControls/ControlsUITab.cs.meta +11 -0
- package/UIControls/IControlRowData.cs +42 -0
- package/UIControls/IControlRowData.cs.meta +11 -0
- package/UIControls/IControlsUIPanel.cs +25 -0
- package/UIControls/IControlsUIPanel.cs.meta +11 -0
- package/UIControls/IControlsUIRepository.cs +17 -0
- package/UIControls/IControlsUIRepository.cs.meta +11 -0
- package/UIControls/IControlsUIRow.cs +16 -0
- package/UIControls/IControlsUIRow.cs.meta +11 -0
- package/UIControls/KeysUITab.cs +85 -0
- package/UIControls/KeysUITab.cs.meta +11 -0
- package/UIControls/ModeKeyPair.cs +25 -0
- package/UIControls/ModeKeyPair.cs.meta +2 -0
- package/UIControls/SetControlsKeyByMode.cs +57 -0
- package/UIControls/SetControlsKeyByMode.cs.meta +11 -0
- package/UIControls/SystemUITab.cs +30 -0
- package/UIControls/SystemUITab.cs.meta +11 -0
- package/UIControls.meta +8 -0
- package/VectorIndexSelector.cs +48 -0
- package/VectorIndexSelector.cs.meta +2 -0
- package/VerticalScrollWindow.cs +354 -0
- package/VerticalScrollWindow.cs.meta +11 -0
- package/package.json +44 -6
- package/package.json.meta +7 -0
- package/README.md +0 -3
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.EventObjects;
|
|
3
|
+
using DREditor.EventObjectServices;
|
|
4
|
+
using UnityEngine;
|
|
5
|
+
using UnityEngine.EventSystems;
|
|
6
|
+
using UnityEngine.UI;
|
|
7
|
+
|
|
8
|
+
namespace DREditor.UI.Options
|
|
9
|
+
{
|
|
10
|
+
/// <summary>
|
|
11
|
+
///
|
|
12
|
+
/// </summary>
|
|
13
|
+
[ClassHeader(nameof(OptionWithEventListener<bool, BoolEvent>) +
|
|
14
|
+
"\n\n")]
|
|
15
|
+
[DefaultExecutionOrder(1)]
|
|
16
|
+
public class OptionToggleUI : OptionWithEventListener<bool, BoolEvent>
|
|
17
|
+
{
|
|
18
|
+
/// <summary>
|
|
19
|
+
///
|
|
20
|
+
/// </summary>
|
|
21
|
+
[Tooltip("")]
|
|
22
|
+
[SerializeField] protected Selectable onSelectable = null;
|
|
23
|
+
|
|
24
|
+
/// <summary>
|
|
25
|
+
///
|
|
26
|
+
/// </summary>
|
|
27
|
+
[Tooltip("")]
|
|
28
|
+
[SerializeField] protected Selectable offSelectable = null;
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
/// <summary>
|
|
32
|
+
///
|
|
33
|
+
/// </summary>
|
|
34
|
+
protected OptionUIGroup optionGroup = null;
|
|
35
|
+
|
|
36
|
+
/// <summary>
|
|
37
|
+
///
|
|
38
|
+
/// </summary>
|
|
39
|
+
protected SelectableUIOption toggleOption;
|
|
40
|
+
|
|
41
|
+
/// <summary>
|
|
42
|
+
///
|
|
43
|
+
/// </summary>
|
|
44
|
+
protected SelectableUIOption offOption;
|
|
45
|
+
|
|
46
|
+
/// <summary>
|
|
47
|
+
///
|
|
48
|
+
/// </summary>
|
|
49
|
+
protected bool isOn;
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
/// <summary>
|
|
53
|
+
///
|
|
54
|
+
/// </summary>
|
|
55
|
+
protected virtual void Awake()
|
|
56
|
+
{
|
|
57
|
+
toggleOption = onSelectable.GetComponent<SelectableUIOption>();
|
|
58
|
+
|
|
59
|
+
optionGroup = GetComponent<OptionUIGroup>();
|
|
60
|
+
|
|
61
|
+
offOption = offSelectable.GetComponent<SelectableUIOption>();
|
|
62
|
+
|
|
63
|
+
offSelectable.interactable = false;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/// <summary>
|
|
67
|
+
///
|
|
68
|
+
/// </summary>
|
|
69
|
+
protected override void OnEnable()
|
|
70
|
+
{
|
|
71
|
+
base.OnEnable();
|
|
72
|
+
|
|
73
|
+
UpdateUIState(valueWithEvent.Value);
|
|
74
|
+
|
|
75
|
+
if (valueWithEvent != null && !valueWithEvent.Value)
|
|
76
|
+
{
|
|
77
|
+
SetToggleTo(valueWithEvent.Value);
|
|
78
|
+
|
|
79
|
+
offOption.Selection.Invoke();
|
|
80
|
+
|
|
81
|
+
optionGroup.OnSetup.AddListener(FocusOff);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
optionGroup.OnBeforeSetup.AddListener(BeforeSetUp);
|
|
85
|
+
|
|
86
|
+
optionGroup.OnSetup.AddListener(FocusOff);
|
|
87
|
+
|
|
88
|
+
optionGroup.OnUnSetup.AddListener(UnSetUp);
|
|
89
|
+
|
|
90
|
+
OnValueChangedEvent.AddListener(UpdateUIState);
|
|
91
|
+
|
|
92
|
+
toggleOption.Selection.AddListener(ToggleTrue);
|
|
93
|
+
|
|
94
|
+
offOption.Selection.AddListener(ToggleFalse);
|
|
95
|
+
|
|
96
|
+
InitializeOffPiece();
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/// <summary>
|
|
100
|
+
///
|
|
101
|
+
/// </summary>
|
|
102
|
+
/// <remarks>
|
|
103
|
+
///
|
|
104
|
+
/// </remarks>
|
|
105
|
+
protected virtual void BeforeSetUp() => offSelectable.interactable = true;
|
|
106
|
+
|
|
107
|
+
/// <summary>
|
|
108
|
+
///
|
|
109
|
+
/// </summary>
|
|
110
|
+
protected virtual void UnSetUp() => offSelectable.interactable = false;
|
|
111
|
+
|
|
112
|
+
/// <summary>
|
|
113
|
+
///
|
|
114
|
+
/// </summary>
|
|
115
|
+
protected virtual void FocusOff()
|
|
116
|
+
{
|
|
117
|
+
if (valueWithEvent != null && !valueWithEvent.Value)
|
|
118
|
+
optionGroup.RewireNavigation(offSelectable);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/// <summary>
|
|
122
|
+
///
|
|
123
|
+
/// </summary>
|
|
124
|
+
protected virtual void InitializeOffPiece()
|
|
125
|
+
{
|
|
126
|
+
var navigation = onSelectable.navigation;
|
|
127
|
+
|
|
128
|
+
var offNav = offSelectable.navigation;
|
|
129
|
+
|
|
130
|
+
UpdateOffDirection(offNav.selectOnDown, navigation.selectOnDown, Direction.Down);
|
|
131
|
+
|
|
132
|
+
UpdateOffDirection(offNav.selectOnUp, navigation.selectOnUp, Direction.Up);
|
|
133
|
+
|
|
134
|
+
UpdateOffDirection(offNav.selectOnLeft, navigation.selectOnLeft, Direction.Left);
|
|
135
|
+
|
|
136
|
+
UpdateOffDirection(offNav.selectOnRight, navigation.selectOnRight, Direction.Right);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/// <summary>
|
|
140
|
+
///
|
|
141
|
+
/// </summary>
|
|
142
|
+
/// <param name="target"></param>
|
|
143
|
+
/// <param name="current"></param>
|
|
144
|
+
/// <param name="direction"></param>
|
|
145
|
+
protected virtual void UpdateOffDirection(Selectable target, Selectable current, Direction direction)
|
|
146
|
+
{
|
|
147
|
+
if (current != offSelectable && target != onSelectable && target != current)
|
|
148
|
+
optionGroup.options.ChangeGroupNav(current, direction);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/// <summary>
|
|
152
|
+
///
|
|
153
|
+
/// </summary>
|
|
154
|
+
protected override void OnDisable()
|
|
155
|
+
{
|
|
156
|
+
base.OnDisable();
|
|
157
|
+
|
|
158
|
+
OnValueChangedEvent.RemoveListener(UpdateUIState);
|
|
159
|
+
|
|
160
|
+
toggleOption.Selection.RemoveListener(ToggleTrue);
|
|
161
|
+
|
|
162
|
+
offOption.Selection.RemoveListener(ToggleFalse);
|
|
163
|
+
|
|
164
|
+
optionGroup.OnSetup.RemoveListener(FocusOff);
|
|
165
|
+
|
|
166
|
+
optionGroup.OnBeforeSetup.RemoveListener(BeforeSetUp);
|
|
167
|
+
|
|
168
|
+
optionGroup.OnSetup.RemoveListener(FocusOff);
|
|
169
|
+
|
|
170
|
+
optionGroup.OnUnSetup.RemoveListener(UnSetUp);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/// <summary>
|
|
174
|
+
///
|
|
175
|
+
/// </summary>
|
|
176
|
+
/// <param name="param"></param>
|
|
177
|
+
protected virtual void UpdateUIState(bool param)
|
|
178
|
+
{
|
|
179
|
+
if (param)
|
|
180
|
+
UpdateToggleState(onSelectable, offSelectable);
|
|
181
|
+
else
|
|
182
|
+
UpdateToggleState(offSelectable, onSelectable);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/// <summary>
|
|
186
|
+
///
|
|
187
|
+
/// </summary>
|
|
188
|
+
/// <param name="selectable"></param>
|
|
189
|
+
/// <param name="opposite"></param>
|
|
190
|
+
protected virtual void UpdateToggleState(Selectable selectable, Selectable opposite)
|
|
191
|
+
{
|
|
192
|
+
if (ValidObjectNotSelected(selectable))
|
|
193
|
+
{
|
|
194
|
+
if (selectable.TryGetComponent<SelectableUIOption>(out var toggleOption))
|
|
195
|
+
toggleOption.InvokeSelect();
|
|
196
|
+
|
|
197
|
+
var oppositeSelections = opposite.GetComponents<SelectHandler>();
|
|
198
|
+
|
|
199
|
+
foreach (var selection in oppositeSelections)
|
|
200
|
+
if (selection != null)
|
|
201
|
+
selection.Deselect();
|
|
202
|
+
|
|
203
|
+
optionGroup.RewireNavigation(selectable);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/// <summary>
|
|
208
|
+
///
|
|
209
|
+
/// </summary>
|
|
210
|
+
/// <param name="selectable"></param>
|
|
211
|
+
/// <returns></returns>
|
|
212
|
+
protected virtual bool ValidObjectNotSelected(Selectable selectable)
|
|
213
|
+
=> selectable != null &&
|
|
214
|
+
EventSystem.current != null &&
|
|
215
|
+
EventSystem.current.currentSelectedGameObject != selectable.gameObject;
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
/// <summary>
|
|
219
|
+
///
|
|
220
|
+
/// </summary>
|
|
221
|
+
protected virtual void ToggleTrue() => SetToggleTo(true);
|
|
222
|
+
|
|
223
|
+
/// <summary>
|
|
224
|
+
///
|
|
225
|
+
/// </summary>
|
|
226
|
+
protected virtual void ToggleFalse() => SetToggleTo(false);
|
|
227
|
+
|
|
228
|
+
/// <summary>
|
|
229
|
+
///
|
|
230
|
+
/// </summary>
|
|
231
|
+
/// <param name="to"></param>
|
|
232
|
+
/// <remarks>
|
|
233
|
+
///
|
|
234
|
+
/// </remarks>
|
|
235
|
+
public virtual void SetToggleTo(bool to)
|
|
236
|
+
{
|
|
237
|
+
toggleOption.Selection.RemoveListener(ToggleTrue);
|
|
238
|
+
|
|
239
|
+
offOption.Selection.RemoveListener(ToggleFalse);
|
|
240
|
+
|
|
241
|
+
isOn = to;
|
|
242
|
+
|
|
243
|
+
if (valueWithEvent != null)
|
|
244
|
+
valueWithEvent.SetValue(isOn);
|
|
245
|
+
|
|
246
|
+
OnValueChangedEvent?.Invoke(isOn);
|
|
247
|
+
|
|
248
|
+
toggleOption.Selection.AddListener(ToggleTrue);
|
|
249
|
+
|
|
250
|
+
offOption.Selection.AddListener(ToggleFalse);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.Services;
|
|
3
|
+
using System.Collections.Generic;
|
|
4
|
+
using UnityEngine;
|
|
5
|
+
using UnityEngine.Events;
|
|
6
|
+
using UnityEngine.EventSystems;
|
|
7
|
+
using UnityEngine.Serialization;
|
|
8
|
+
using UnityEngine.UI;
|
|
9
|
+
|
|
10
|
+
namespace DREditor.UI.Options
|
|
11
|
+
{
|
|
12
|
+
/// <summary>
|
|
13
|
+
///
|
|
14
|
+
/// </summary>
|
|
15
|
+
[ClassHeader(nameof(OptionUIGroupBase) +
|
|
16
|
+
"\n\n")]
|
|
17
|
+
public class OptionUIGroup : OptionUIGroupBase
|
|
18
|
+
{
|
|
19
|
+
/// <summary>
|
|
20
|
+
///
|
|
21
|
+
/// </summary>
|
|
22
|
+
[Divider]
|
|
23
|
+
[Tooltip("")]
|
|
24
|
+
[FormerlySerializedAs("navGroups")]
|
|
25
|
+
[SerializeField] protected List<NavigationGroup> navigationGroups = new() { new NavigationGroup() };
|
|
26
|
+
|
|
27
|
+
/// <summary>
|
|
28
|
+
///
|
|
29
|
+
/// </summary>
|
|
30
|
+
[Divider]
|
|
31
|
+
[Tooltip("")]
|
|
32
|
+
[FormerlySerializedAs("navSelects")]
|
|
33
|
+
[SerializeField] protected List<NavigationSelect> navigationSelects = new() { new NavigationSelect() };
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
[Header("")]
|
|
37
|
+
[Divider]
|
|
38
|
+
[Header("")]
|
|
39
|
+
public UnityEvent OnBeforeSetup;
|
|
40
|
+
|
|
41
|
+
[Header("")]
|
|
42
|
+
public UnityEvent OnSetup;
|
|
43
|
+
|
|
44
|
+
[Header("")]
|
|
45
|
+
public UnityEvent OnUnSetup;
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
[Header("")]
|
|
49
|
+
[Divider]
|
|
50
|
+
[Header("")]
|
|
51
|
+
public UnityEvent Selection;
|
|
52
|
+
|
|
53
|
+
[Header("")]
|
|
54
|
+
public UnityEvent Deselection;
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
/// <summary>
|
|
58
|
+
///
|
|
59
|
+
/// </summary>
|
|
60
|
+
protected Selectable lastOption = null;
|
|
61
|
+
|
|
62
|
+
/// <summary>
|
|
63
|
+
///
|
|
64
|
+
/// </summary>
|
|
65
|
+
protected bool isSetup = false;
|
|
66
|
+
|
|
67
|
+
/// <summary>
|
|
68
|
+
///
|
|
69
|
+
/// </summary>
|
|
70
|
+
protected bool selected = false;
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
/// <summary>
|
|
74
|
+
///
|
|
75
|
+
/// </summary>
|
|
76
|
+
public virtual void BeforeSetupGroup() => OnBeforeSetup?.Invoke();
|
|
77
|
+
|
|
78
|
+
/// <summary>
|
|
79
|
+
///
|
|
80
|
+
/// </summary>
|
|
81
|
+
public virtual void SetupGroup()
|
|
82
|
+
{
|
|
83
|
+
ServiceLocator.GetService<UIHandlerBase>().OnChange.AddListener(Evaluate);
|
|
84
|
+
|
|
85
|
+
SelectLastOptionOnEmpty();
|
|
86
|
+
|
|
87
|
+
isSetup = true;
|
|
88
|
+
|
|
89
|
+
if (navigationGroups.Count == 0 && navigationSelects.Count == 0)
|
|
90
|
+
{
|
|
91
|
+
ClearNavigation();
|
|
92
|
+
|
|
93
|
+
InitializeNavigation();
|
|
94
|
+
}
|
|
95
|
+
else if (lastOption != null)
|
|
96
|
+
RewireNavigation(lastOption);
|
|
97
|
+
else
|
|
98
|
+
RewireNavigation(options[0]);
|
|
99
|
+
|
|
100
|
+
OnSetup?.Invoke();
|
|
101
|
+
|
|
102
|
+
Evaluate();
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/// <summary>
|
|
106
|
+
///
|
|
107
|
+
/// </summary>
|
|
108
|
+
protected virtual void InitializeNavigation()
|
|
109
|
+
{
|
|
110
|
+
var firstOption = options[0];
|
|
111
|
+
|
|
112
|
+
List<Selectable> firstSelectables = new()
|
|
113
|
+
{
|
|
114
|
+
firstOption.navigation.selectOnDown,
|
|
115
|
+
firstOption.navigation.selectOnUp,
|
|
116
|
+
firstOption.navigation.selectOnRight,
|
|
117
|
+
firstOption.navigation.selectOnLeft,
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
for (int i = 0; i < firstSelectables.Count; i++)
|
|
121
|
+
{
|
|
122
|
+
if (options.Contains(firstSelectables[i]) || firstSelectables[i] == null)
|
|
123
|
+
continue;
|
|
124
|
+
|
|
125
|
+
if (firstSelectables[i].GetComponentInParent<OptionUIGroupBase>() is OptionUIGroupBase group)
|
|
126
|
+
navigationGroups.Add(new NavigationGroup(group, (Direction)i));
|
|
127
|
+
else
|
|
128
|
+
navigationSelects.Add(new NavigationSelect(firstSelectables[i], (Direction)i));
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/// <summary>
|
|
133
|
+
///
|
|
134
|
+
/// </summary>
|
|
135
|
+
public virtual void UnSetupGroup()
|
|
136
|
+
{
|
|
137
|
+
ServiceLocator.GetService<UIHandlerBase>().OnChange.RemoveListener(Evaluate);
|
|
138
|
+
|
|
139
|
+
DisplayLastOptionSelected();
|
|
140
|
+
|
|
141
|
+
isSetup = false;
|
|
142
|
+
|
|
143
|
+
foreach (var deselect in deselectHandlers)
|
|
144
|
+
deselect.OnDeselect(null);
|
|
145
|
+
|
|
146
|
+
if (navigationGroups.Count == 0 && navigationSelects.Count == 0)
|
|
147
|
+
ClearNavigation();
|
|
148
|
+
|
|
149
|
+
OnUnSetup?.Invoke();
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/// <summary>
|
|
153
|
+
///
|
|
154
|
+
/// </summary>
|
|
155
|
+
protected virtual void ClearNavigation()
|
|
156
|
+
{
|
|
157
|
+
navigationGroups.Clear();
|
|
158
|
+
|
|
159
|
+
navigationSelects.Clear();
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/// <summary>
|
|
163
|
+
///
|
|
164
|
+
/// </summary>
|
|
165
|
+
public virtual void Evaluate() => CheckSelectionInGroup();
|
|
166
|
+
|
|
167
|
+
/// <summary>
|
|
168
|
+
///
|
|
169
|
+
/// </summary>
|
|
170
|
+
/// <returns></returns>
|
|
171
|
+
public virtual bool CheckSelectionInGroup()
|
|
172
|
+
{
|
|
173
|
+
if (EventSystem.current.currentSelectedGameObject == null)
|
|
174
|
+
UnityEngine.Debug.LogWarning($"ALERT: {gameObject.name}: The Current Selected object was null");
|
|
175
|
+
|
|
176
|
+
foreach (Selectable selectable in options)
|
|
177
|
+
if (SelectedInGroup(selectable))
|
|
178
|
+
return true;
|
|
179
|
+
|
|
180
|
+
NotInSelection();
|
|
181
|
+
|
|
182
|
+
return false;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/// <summary>
|
|
186
|
+
///
|
|
187
|
+
/// </summary>
|
|
188
|
+
/// <param name="selectable"></param>
|
|
189
|
+
/// <returns></returns>
|
|
190
|
+
protected virtual bool SelectedInGroup(Selectable selectable)
|
|
191
|
+
{
|
|
192
|
+
if (EventSystem.current.currentSelectedGameObject == selectable.gameObject)
|
|
193
|
+
{
|
|
194
|
+
SetGroupSelectedTo(true);
|
|
195
|
+
|
|
196
|
+
RewireNavigation(selectable);
|
|
197
|
+
|
|
198
|
+
foreach (var select in selectHandlers)
|
|
199
|
+
select.OnSelect(null);
|
|
200
|
+
|
|
201
|
+
return true;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
return false;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/// <summary>
|
|
208
|
+
///
|
|
209
|
+
/// </summary>
|
|
210
|
+
protected virtual void NotInSelection()
|
|
211
|
+
{
|
|
212
|
+
SetGroupSelectedTo(false);
|
|
213
|
+
|
|
214
|
+
DisplayLastOptionSelected();
|
|
215
|
+
|
|
216
|
+
foreach (var deselect in deselectHandlers)
|
|
217
|
+
deselect.OnDeselect(null);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/// <summary>
|
|
221
|
+
///
|
|
222
|
+
/// </summary>
|
|
223
|
+
/// <param name="isSelected"></param>
|
|
224
|
+
protected virtual void SetGroupSelectedTo(bool isSelected)
|
|
225
|
+
{
|
|
226
|
+
if (selected == !isSelected)
|
|
227
|
+
{
|
|
228
|
+
selected = isSelected;
|
|
229
|
+
|
|
230
|
+
UnityEvent selectionEvent = selected ? Selection : Deselection;
|
|
231
|
+
|
|
232
|
+
selectionEvent?.Invoke();
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/// <summary>
|
|
237
|
+
///
|
|
238
|
+
/// </summary>
|
|
239
|
+
/// <param name="selectable"></param>
|
|
240
|
+
public virtual void RewireNavigation(Selectable selectable)
|
|
241
|
+
{
|
|
242
|
+
lastOption = selectable;
|
|
243
|
+
|
|
244
|
+
RewireNavigationGroups();
|
|
245
|
+
|
|
246
|
+
RewireNavigationSelects();
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/// <summary>
|
|
250
|
+
///
|
|
251
|
+
/// </summary>
|
|
252
|
+
protected virtual void RewireNavigationGroups()
|
|
253
|
+
{
|
|
254
|
+
if (navigationGroups.Count != 0)
|
|
255
|
+
foreach (NavigationGroup nav in navigationGroups)
|
|
256
|
+
nav.group.options.ChangeGroupNav(lastOption, nav.direction);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/// <summary>
|
|
260
|
+
///
|
|
261
|
+
/// </summary>
|
|
262
|
+
protected virtual void RewireNavigationSelects()
|
|
263
|
+
{
|
|
264
|
+
if (navigationSelects.Count != 0)
|
|
265
|
+
foreach (NavigationSelect nav in navigationSelects)
|
|
266
|
+
nav.selectable.ChangeNavSelects(lastOption, nav.direction);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/// <summary>
|
|
270
|
+
///
|
|
271
|
+
/// </summary>
|
|
272
|
+
protected virtual void SelectLastOptionOnEmpty()
|
|
273
|
+
{
|
|
274
|
+
if (lastOption == null)
|
|
275
|
+
{
|
|
276
|
+
SetLastOption(options[0]);
|
|
277
|
+
|
|
278
|
+
DisplayLastOptionSelected();
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/// <summary>
|
|
283
|
+
///
|
|
284
|
+
/// </summary>
|
|
285
|
+
protected virtual void DisplayLastOptionSelected()
|
|
286
|
+
{
|
|
287
|
+
if (lastOption == null)
|
|
288
|
+
return;
|
|
289
|
+
|
|
290
|
+
var lastSelectables = lastOption.GetComponents<SelectHandler>();
|
|
291
|
+
|
|
292
|
+
foreach (var selectable in lastSelectables)
|
|
293
|
+
if (selectable != null)
|
|
294
|
+
selectable.Select();
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/// <summary>
|
|
298
|
+
///
|
|
299
|
+
/// </summary>
|
|
300
|
+
/// <param name="selectable"></param>
|
|
301
|
+
protected virtual void SetLastOption(Selectable selectable) => lastOption = selectable;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using System.Collections.Generic;
|
|
3
|
+
using UnityEngine;
|
|
4
|
+
using UnityEngine.EventSystems;
|
|
5
|
+
using UnityEngine.UI;
|
|
6
|
+
|
|
7
|
+
namespace DREditor.UI.Options
|
|
8
|
+
{
|
|
9
|
+
/// <summary>
|
|
10
|
+
///
|
|
11
|
+
/// </summary>
|
|
12
|
+
public abstract class OptionUIGroupBase : MonoBehaviour
|
|
13
|
+
{
|
|
14
|
+
/// <summary>
|
|
15
|
+
///
|
|
16
|
+
/// </summary>
|
|
17
|
+
[Header("")]
|
|
18
|
+
[Divider]
|
|
19
|
+
[Tooltip("")]
|
|
20
|
+
public List<Selectable> options = new();
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
/// <summary>
|
|
24
|
+
///
|
|
25
|
+
/// </summary>
|
|
26
|
+
protected ISelectHandler[] selectHandlers;
|
|
27
|
+
|
|
28
|
+
/// <summary>
|
|
29
|
+
///
|
|
30
|
+
/// </summary>
|
|
31
|
+
protected IDeselectHandler[] deselectHandlers;
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
protected virtual void Awake()
|
|
35
|
+
{
|
|
36
|
+
selectHandlers = GetComponents<ISelectHandler>();
|
|
37
|
+
|
|
38
|
+
deselectHandlers = GetComponents<IDeselectHandler>();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using System.Collections.Generic;
|
|
3
|
+
using System.Linq;
|
|
4
|
+
|
|
5
|
+
namespace DREditor.UI.Options
|
|
6
|
+
{
|
|
7
|
+
/// <summary>
|
|
8
|
+
///
|
|
9
|
+
/// </summary>
|
|
10
|
+
[ClassHeader(nameof(MenuModifier) +
|
|
11
|
+
"\n\n")]
|
|
12
|
+
public class OptionUIManager : MenuModifier
|
|
13
|
+
{
|
|
14
|
+
/// <summary>
|
|
15
|
+
///
|
|
16
|
+
/// </summary>
|
|
17
|
+
protected List<OptionUIGroup> groups = new();
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
/// <summary>
|
|
21
|
+
///
|
|
22
|
+
/// </summary>
|
|
23
|
+
protected override void Awake()
|
|
24
|
+
{
|
|
25
|
+
base.Awake();
|
|
26
|
+
|
|
27
|
+
groups = GetComponentsInChildren<OptionUIGroup>().ToList();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/// <summary>
|
|
31
|
+
///
|
|
32
|
+
/// </summary>
|
|
33
|
+
protected virtual void OnEnable()
|
|
34
|
+
{
|
|
35
|
+
menu.BeforeStart.AddListener(BeforeSetUpGroups);
|
|
36
|
+
|
|
37
|
+
menu.StartEvents.AddListener(SetUpGroups);
|
|
38
|
+
|
|
39
|
+
menu.EndEvents.AddListener(UnSetUpGroups);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/// <summary>
|
|
43
|
+
///
|
|
44
|
+
/// </summary>
|
|
45
|
+
protected virtual void OnDisable()
|
|
46
|
+
{
|
|
47
|
+
menu.BeforeStart.RemoveListener(BeforeSetUpGroups);
|
|
48
|
+
|
|
49
|
+
menu.StartEvents.RemoveListener(SetUpGroups);
|
|
50
|
+
|
|
51
|
+
menu.EndEvents.RemoveListener(UnSetUpGroups);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/// <summary>
|
|
55
|
+
///
|
|
56
|
+
/// </summary>
|
|
57
|
+
public virtual void BeforeSetUpGroups() => groups.ForEach(n => n.BeforeSetupGroup());
|
|
58
|
+
|
|
59
|
+
/// <summary>
|
|
60
|
+
///
|
|
61
|
+
/// </summary>
|
|
62
|
+
public virtual void SetUpGroups() => groups.ForEach(n => n.SetupGroup());
|
|
63
|
+
|
|
64
|
+
/// <summary>
|
|
65
|
+
///
|
|
66
|
+
/// </summary>
|
|
67
|
+
public virtual void UnSetUpGroups() => groups.ForEach(n => n.UnSetupGroup());
|
|
68
|
+
}
|
|
69
|
+
}
|