From 23a440edf5898537086e3d4b14f600f2c6cab39d Mon Sep 17 00:00:00 2001 From: lq <3298408835@qq.com> Date: Fri, 29 Nov 2024 16:19:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=8E=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xiaofang/Assets/Bitsplash.meta | 8 + .../Assets/Bitsplash/Modular Date Picker.meta | 8 + .../Bitsplash/Modular Date Picker/Base.meta | 8 + .../Modular Date Picker/Base/Editor.meta | 8 + .../Base/Editor/EditorMenu.cs | 50 + .../Base/Editor/EditorMenu.cs.meta | 11 + .../Modular Date Picker/Base/Script.meta | 8 + .../Base/Script/Calendar.cs | 12 + .../Base/Script/Calendar.cs.meta | 11 + .../Base/Script/CellAddon.cs | 78 + .../Base/Script/CellAddon.cs.meta | 11 + .../Base/Script/CommonMethods.cs | 145 + .../Base/Script/CommonMethods.cs.meta | 11 + .../Base/Script/DatePicker.meta | 8 + .../Script/DatePicker/DatePicker.Selection.cs | 244 + .../DatePicker/DatePicker.Selection.cs.meta | 11 + .../Script/DatePicker/DatePickerCollection.cs | 190 + .../DatePicker/DatePickerCollection.cs.meta | 11 + .../Script/DatePicker/DatePickerContent.cs | 464 + .../DatePicker/DatePickerContent.cs.meta | 11 + .../IDatePickerCollectionPrivate.cs | 15 + .../IDatePickerCollectionPrivate.cs.meta | 11 + .../Script/DatePickerBackgroundSetting.cs | 20 + .../DatePickerBackgroundSetting.cs.meta | 11 + .../Base/Script/DatePickerCell.cs | 20 + .../Base/Script/DatePickerCell.cs.meta | 11 + .../Base/Script/DatePickerCellTemplate.cs | 20 + .../Script/DatePickerCellTemplate.cs.meta | 11 + .../Base/Script/DatePickerElement.cs | 66 + .../Base/Script/DatePickerElement.cs.meta | 11 + .../Base/Script/DatePickerInput.cs | 14 + .../Base/Script/DatePickerInput.cs.meta | 11 + .../Base/Script/DatePickerLabel.cs | 14 + .../Base/Script/DatePickerLabel.cs.meta | 11 + .../Base/Script/DatePickerSettings.cs | 67 + .../Base/Script/DatePickerSettings.cs.meta | 11 + .../Base/Script/DatePickerStandardInput.cs | 24 + .../Script/DatePickerStandardInput.cs.meta | 11 + .../Base/Script/DayTitle.cs | 124 + .../Base/Script/DayTitle.cs.meta | 11 + .../Base/Script/DropDown.meta | 8 + .../Script/DropDown/DatePickerDropDown.cs | 23 + .../DropDown/DatePickerDropDown.cs.meta | 11 + .../Script/DropDown/DatePickerDropDownBase.cs | 159 + .../DropDown/DatePickerDropDownBase.cs.meta | 11 + .../Base/Script/Editor.meta | 8 + .../Script/Editor/DatePickerSettingsEditor.cs | 151 + .../Editor/DatePickerSettingsEditor.cs.meta | 11 + .../Base/Script/Elements.meta | 8 + .../Base/Script/Elements/DatePickerButton.cs | 45 + .../Script/Elements/DatePickerButton.cs.meta | 11 + .../Base/Script/Elements/DatePickerText.cs | 220 + .../Script/Elements/DatePickerText.cs.meta | 11 + .../Base/Script/Elements/MonthTextBox.cs | 70 + .../Base/Script/Elements/MonthTextBox.cs.meta | 11 + .../Base/Script/Elements/NextMonthButton.cs | 21 + .../Script/Elements/NextMonthButton.cs.meta | 11 + .../Base/Script/Elements/NextYearButton.cs | 21 + .../Script/Elements/NextYearButton.cs.meta | 11 + .../Base/Script/Elements/PrevMonthButton.cs | 20 + .../Script/Elements/PrevMonthButton.cs.meta | 11 + .../Base/Script/Elements/PrevYearButton.cs | 20 + .../Script/Elements/PrevYearButton.cs.meta | 11 + .../Base/Script/Elements/SelectionTextBox.cs | 64 + .../Script/Elements/SelectionTextBox.cs.meta | 11 + .../Base/Script/Elements/TodayButton.cs | 22 + .../Base/Script/Elements/TodayButton.cs.meta | 11 + .../Base/Script/Elements/YearCombo.cs | 18 + .../Base/Script/Elements/YearCombo.cs.meta | 11 + .../Base/Script/Enums.meta | 8 + .../Base/Script/Enums/DatePickerCulture.cs | 15 + .../Script/Enums/DatePickerCulture.cs.meta | 11 + .../Base/Script/Enums/FrameLayout.cs | 19 + .../Base/Script/Enums/FrameLayout.cs.meta | 11 + .../Base/Script/Enums/TextTypeEnum.cs | 14 + .../Base/Script/Enums/TextTypeEnum.cs.meta | 11 + .../Base/Script/Enums/TitleButtons.cs | 16 + .../Base/Script/Enums/TitleButtons.cs.meta | 11 + .../Base/Script/Enums/TitleDate.cs | 15 + .../Base/Script/Enums/TitleDate.cs.meta | 11 + .../Base/Script/Enums/TitleLayout.cs | 16 + .../Base/Script/Enums/TitleLayout.cs.meta | 11 + .../Base/Script/Enums/WeekDaysLayout.cs | 25 + .../Base/Script/Enums/WeekDaysLayout.cs.meta | 11 + .../Base/Script/IDatePickerPrivate.cs | 17 + .../Base/Script/IDatePickerPrivate.cs.meta | 11 + .../Base/Script/IDatePickerSettingsItem.cs | 14 + .../Script/IDatePickerSettingsItem.cs.meta | 11 + .../Base/Script/IDateTimeItem.cs | 13 + .../Base/Script/IDateTimeItem.cs.meta | 11 + .../Base/Script/MonoBehvaiour.cs | 6 + .../Base/Script/MonoBehvaiour.cs.meta | 11 + .../Script/MultipleSelectionInputValue.cs | 14 + .../MultipleSelectionInputValue.cs.meta | 11 + .../Base/Script/SelectionType.cs | 15 + .../Base/Script/SelectionType.cs.meta | 11 + .../Base/Script/StandardDatePickerCell.cs | 247 + .../Script/StandardDatePickerCell.cs.meta | 11 + .../Base/Script/TextMediator.cs | 32 + .../Base/Script/TextMediator.cs.meta | 11 + .../Base/Script/Vector.meta | 8 + .../Base/Script/Vector/CommonVectors.cs | 80 + .../Base/Script/Vector/CommonVectors.cs.meta | 11 + .../Base/Script/Vector/FlexibleFrame.cs | 50 + .../Base/Script/Vector/FlexibleFrame.cs.meta | 11 + .../Base/Script/Vector/FlexibleGrid.cs | 49 + .../Base/Script/Vector/FlexibleGrid.cs.meta | 11 + .../Base/Script/Vector/ParameterizedShape.cs | 79 + .../Script/Vector/ParameterizedShape.cs.meta | 11 + .../Base/Script/Vector/VectorHelper.cs | 13 + .../Base/Script/Vector/VectorHelper.cs.meta | 11 + .../Date Picker User Mannual.pdf | Bin 0 -> 503124 bytes .../Date Picker User Mannual.pdf.meta | 7 + .../Modular Date Picker/Modules.meta | 8 + .../Modular Date Picker/Modules/Cell.meta | 8 + .../Modules/Cell/BoldStandardCell.prefab | 324 + .../Modules/Cell/BoldStandardCell.prefab.meta | 7 + .../Modules/Cell/SmallStandardCell 1.prefab | 324 + .../Cell/SmallStandardCell 1.prefab.meta | 7 + .../Modules/Cell/StandardCell.prefab | 324 + .../Modules/Cell/StandardCell.prefab.meta | 7 + .../Modules/Cell/WhiteCell.prefab | 324 + .../Modules/Cell/WhiteCell.prefab.meta | 7 + .../Modular Date Picker/Prefabs.meta | 8 + .../Prefabs/Title Box.meta | 8 + .../Title Box/Month and Year Buttons.meta | 8 + .../Month and Year Buttons/Centered.prefab | 827 ++ .../Centered.prefab.meta | 7 + .../Month and Year Buttons/Sided.prefab | 827 ++ .../Month and Year Buttons/Sided.prefab.meta | 7 + .../Prefabs/Title Box/Month buttons only.meta | 8 + .../Month buttons only/Centered.prefab | 465 + .../Month buttons only/Centered.prefab.meta | 7 + .../Title Box/Month buttons only/Sided.prefab | 383 + .../Month buttons only/Sided.prefab.meta | 7 + .../Prefabs/UIDropDown.prefab | 726 ++ .../Prefabs/UIDropDown.prefab.meta | 7 + .../Modular Date Picker/Resources.meta | 8 + .../Resources/MenuPrefabs.meta | 8 + .../Resources/MenuPrefabs/MenuDark.prefab | 1174 +++ .../MenuPrefabs/MenuDark.prefab.meta | 7 + .../Resources/MenuPrefabs/MenuLight.prefab | 1179 +++ .../MenuPrefabs/MenuLight.prefab.meta | 7 + .../Modular Date Picker/TextMeshPro.meta | 8 + .../TextMeshPro/Prefabs.meta | 8 + .../Prefabs/Text Mesh Drop Down.prefab | 1982 +++++ .../Prefabs/Text Mesh Drop Down.prefab.meta | 7 + .../TextMeshPro/Script.meta | 8 + .../Script/DatePickerDropDownTextMeshPro.cs | 19 + .../DatePickerDropDownTextMeshPro.cs.meta | 11 + .../Script/DatePickerSettings.TextMeshPro.cs | 41 + .../DatePickerSettings.TextMeshPro.cs.meta | 11 + .../Script/DatePickerText.TextMeshPro.cs | 136 + .../Script/DatePickerText.TextMeshPro.cs.meta | 11 + .../Script/TextMediator.TextMeshPro.cs | 24 + .../Script/TextMediator.TextMeshPro.cs.meta | 11 + .../TextMeshPro/fonts.meta | 8 + .../TextMeshPro/fonts/Lemon SDF.asset | 1376 +++ .../TextMeshPro/fonts/Lemon SDF.asset.meta | 8 + .../fonts/SourceSansPro-Regular SDF.asset | 1368 +++ .../SourceSansPro-Regular SDF.asset.meta | 8 + .../fonts/SourceSansPro-Semibold SDF.asset | 1368 +++ .../SourceSansPro-Semibold SDF.asset.meta | 8 + .../Modular Date Picker/Textures.meta | 8 + .../Modular Date Picker/Textures/Arrow.meta | 8 + .../Textures/Arrow/CC0.meta | 8 + .../Textures/Arrow/CC0/arrow_custom.png | Bin 0 -> 2110 bytes .../Textures/Arrow/CC0/arrow_custom.png.meta | 99 + .../Textures/Arrow/CC0/arrow_custom_2.png | Bin 0 -> 2497 bytes .../Arrow/CC0/arrow_custom_2.png.meta | 99 + .../Textures/Arrow/CC0/arrow_green.png | Bin 0 -> 4442 bytes .../Textures/Arrow/CC0/arrow_green.png.meta | 99 + .../Textures/Arrow/CC0/arrow_green_2.png | Bin 0 -> 5124 bytes .../Textures/Arrow/CC0/arrow_green_2.png.meta | 99 + .../Textures/Arrow/CC0/arrow_round_blue.png | Bin 0 -> 12899 bytes .../Arrow/CC0/arrow_round_blue.png.meta | 99 + .../Arrow/CC0/double_arrow_custom.png | Bin 0 -> 2431 bytes .../Arrow/CC0/double_arrow_custom.png.meta | 99 + .../Arrow/CC0/double_arrow_down_green.png | Bin 0 -> 14071 bytes .../CC0/double_arrow_down_green.png.meta | 88 + .../Textures/Arrow/CC0/double_arrow_green.png | Bin 0 -> 5800 bytes .../Arrow/CC0/double_arrow_green.png.meta | 99 + .../Textures/Backgrounds.meta | 8 + .../Textures/Backgrounds/BlueGrad.png | Bin 0 -> 54609 bytes .../Textures/Backgrounds/BlueGrad.png.meta | 110 + .../Textures/Backgrounds/glass.png | Bin 0 -> 54778 bytes .../Textures/Backgrounds/glass.png.meta | 99 + .../Textures/Backgrounds/gradient1.png | Bin 0 -> 117575 bytes .../Textures/Backgrounds/gradient1.png.meta | 99 + .../Textures/Backgrounds/gradient2.png | Bin 0 -> 122482 bytes .../Textures/Backgrounds/gradient2.png.meta | 99 + .../Textures/Backgrounds/gradient3.png | Bin 0 -> 55892 bytes .../Textures/Backgrounds/gradient3.png.meta | 99 + .../Textures/Backgrounds/gradient4.png | Bin 0 -> 138870 bytes .../Textures/Backgrounds/gradient4.png.meta | 99 + .../Textures/Backgrounds/gradient5.png | Bin 0 -> 213366 bytes .../Textures/Backgrounds/gradient5.png.meta | 99 + .../Modular Date Picker/Textures/Empty.png | Bin 0 -> 254 bytes .../Textures/Empty.png.meta | 99 + .../Textures/Selection.meta | 8 + .../Textures/Selection/CC0.meta | 8 + .../Textures/Selection/CC0/round.png | Bin 0 -> 11386 bytes .../Textures/Selection/CC0/round.png.meta | 99 + .../Textures/Selection/CC0/round_gold.png | Bin 0 -> 10974 bytes .../Selection/CC0/round_gold.png.meta | 99 + .../Textures/Selection/CC0/round_yellow.png | Bin 0 -> 3031 bytes .../Selection/CC0/round_yellow.png.meta | 99 + .../Textures/Selection/CC0/square.png | Bin 0 -> 6738 bytes .../Textures/Selection/CC0/square.png.meta | 99 + .../Textures/Selection/Calendar.png | Bin 0 -> 3362 bytes .../Textures/Selection/Calendar.png.meta | 99 + .../Modular Date Picker/Textures/point.png | Bin 0 -> 2462 bytes .../Textures/point.png.meta | 128 + .../Bitsplash/Modular Date Picker/Themes.meta | 8 + .../Themes/Classic Black.prefab | 1181 +++ .../Themes/Classic Black.prefab.meta | 7 + .../Themes/Cold White.prefab | 1179 +++ .../Themes/Cold White.prefab.meta | 7 + .../Themes/Dark Red.prefab | 1174 +++ .../Themes/Dark Red.prefab.meta | 7 + .../Modular Date Picker/Themes/Flowing.prefab | 1179 +++ .../Themes/Flowing.prefab.meta | 7 + .../Modular Date Picker/Themes/Paper.prefab | 1265 +++ .../Themes/Paper.prefab.meta | 7 + .../Themes/Playful 2.prefab | 1179 +++ .../Themes/Playful 2.prefab.meta | 7 + .../Modular Date Picker/Themes/Playful.prefab | 1179 +++ .../Themes/Playful.prefab.meta | 7 + .../Themes/Warm White.prefab | 1453 +++ .../Themes/Warm White.prefab.meta | 7 + .../Modular Date Picker/Tutorials.meta | 8 + .../Tutorials/Display.meta | 8 + .../Tutorials/Display/Display.unity | 1292 +++ .../Tutorials/Display/Display.unity.meta | 7 + .../Tutorials/Display/DisplayTutorial.cs | 51 + .../Tutorials/Display/DisplayTutorial.cs.meta | 11 + .../Tutorials/Selection.meta | 8 + .../Tutorials/Selection/Selection.unity | 1403 +++ .../Tutorials/Selection/Selection.unity.meta | 7 + .../Tutorials/Selection/SelectionTutorial.cs | 76 + .../Selection/SelectionTutorial.cs.meta | 11 + .../Bitsplash/Modular Date Picker/fonts.meta | 8 + .../fonts/SIL Open Fonts.meta | 8 + .../fonts/SIL Open Fonts/lemon.meta | 8 + .../fonts/SIL Open Fonts/lemon/Lemon.ttf | Bin 0 -> 32912 bytes .../fonts/SIL Open Fonts/lemon/Lemon.ttf.meta | 23 + .../fonts/SIL Open Fonts/lemon/License.txt | 97 + .../SIL Open Fonts/lemon/License.txt.meta | 7 + .../fonts/SIL Open Fonts/source-sans-pro.meta | 8 + .../source-sans-pro/LICENSE.txt | 93 + .../source-sans-pro/LICENSE.txt.meta | 7 + .../SIL Open Fonts/source-sans-pro/TTF.meta | 8 + .../TTF/SourceSansPro-Black.ttf | Bin 0 -> 289364 bytes .../TTF/SourceSansPro-Black.ttf.meta | 22 + .../TTF/SourceSansPro-BlackIt.ttf | Bin 0 -> 103404 bytes .../TTF/SourceSansPro-BlackIt.ttf.meta | 30 + .../TTF/SourceSansPro-Bold.ttf | Bin 0 -> 291424 bytes .../TTF/SourceSansPro-Bold.ttf.meta | 27 + .../TTF/SourceSansPro-BoldIt.ttf | Bin 0 -> 103608 bytes .../TTF/SourceSansPro-BoldIt.ttf.meta | 25 + .../TTF/SourceSansPro-ExtraLight.ttf | Bin 0 -> 291652 bytes .../TTF/SourceSansPro-ExtraLight.ttf.meta | 33 + .../TTF/SourceSansPro-ExtraLightIt.ttf | Bin 0 -> 104768 bytes .../TTF/SourceSansPro-ExtraLightIt.ttf.meta | 31 + .../source-sans-pro/TTF/SourceSansPro-It.ttf | Bin 0 -> 104236 bytes .../TTF/SourceSansPro-It.ttf.meta | 32 + .../TTF/SourceSansPro-Light.ttf | Bin 0 -> 293220 bytes .../TTF/SourceSansPro-Light.ttf.meta | 26 + .../TTF/SourceSansPro-LightIt.ttf | Bin 0 -> 104616 bytes .../TTF/SourceSansPro-LightIt.ttf.meta | 28 + .../TTF/SourceSansPro-Regular.ttf | Bin 0 -> 293956 bytes .../TTF/SourceSansPro-Regular.ttf.meta | 24 + .../TTF/SourceSansPro-Semibold.ttf | Bin 0 -> 292404 bytes .../TTF/SourceSansPro-Semibold.ttf.meta | 23 + .../TTF/SourceSansPro-SemiboldIt.ttf | Bin 0 -> 104020 bytes .../TTF/SourceSansPro-SemiboldIt.ttf.meta | 29 + .../PanelPrefabs/DistributionPanel.prefab | 4304 +-------- .../Prefabs/PanelPrefabs/scheduled_5.prefab | 2129 +++++ .../PanelPrefabs/scheduled_5.prefab.meta | 7 + .../Prefabs/itemPrefabs/btnDutyChoose.prefab | 241 + .../itemPrefabs/btnDutyChoose.prefab.meta | 7 + xiaofang/Assets/Resources/Plug.meta | 8 + xiaofang/Assets/Scenes/Schedule_03.unity | 7275 ++++++++++++++- .../Scenes/Schedule_a_walkthrough.unity | 46 + xiaofang/Assets/Scenes/Scheduled_5.unity | 3597 ++++---- xiaofang/Assets/Script/Scheduled_03/Panel.cs | 1 - xiaofang/Assets/Script/UI/DutyItem.cs | 21 + xiaofang/Assets/Script/UI/DutyItem.cs.meta | 11 + .../Assets/Script/UI/PanelUI/ManagerPanel.cs | 21 +- xiaofang/Assets/TextMesh Pro.meta | 8 + .../Assets/TextMesh Pro/Documentation.meta | 8 + .../TextMesh Pro User Guide 2016.pdf | Bin 0 -> 694398 bytes .../TextMesh Pro User Guide 2016.pdf.meta | 7 + xiaofang/Assets/TextMesh Pro/Fonts.meta | 8 + .../Fonts/LiberationSans - OFL.txt | 46 + .../Fonts/LiberationSans - OFL.txt.meta | 8 + .../TextMesh Pro/Fonts/LiberationSans.ttf | Bin 0 -> 350200 bytes .../Fonts/LiberationSans.ttf.meta | 19 + xiaofang/Assets/TextMesh Pro/Resources.meta | 8 + .../Resources/Fonts & Materials.meta | 9 + .../LiberationSans SDF - Drop Shadow.mat | 106 + .../LiberationSans SDF - Drop Shadow.mat.meta | 8 + .../LiberationSans SDF - Fallback.asset | 343 + .../LiberationSans SDF - Fallback.asset.meta | 8 + .../LiberationSans SDF - Outline.mat | 104 + .../LiberationSans SDF - Outline.mat.meta | 8 + .../LiberationSans SDF.asset | 7821 +++++++++++++++++ .../LiberationSans SDF.asset.meta | 8 + .../LineBreaking Following Characters.txt | 1 + ...LineBreaking Following Characters.txt.meta | 8 + .../LineBreaking Leading Characters.txt | 1 + .../LineBreaking Leading Characters.txt.meta | 8 + .../TextMesh Pro/Resources/Sprite Assets.meta | 9 + .../Resources/Sprite Assets/EmojiOne.asset | 659 ++ .../Sprite Assets/EmojiOne.asset.meta | 8 + .../TextMesh Pro/Resources/Style Sheets.meta | 9 + .../Style Sheets/Default Style Sheet.asset | 68 + .../Default Style Sheet.asset.meta | 8 + .../TextMesh Pro/Resources/TMP Settings.asset | 46 + .../Resources/TMP Settings.asset.meta | 8 + xiaofang/Assets/TextMesh Pro/Shaders.meta | 8 + .../Shaders/TMP_Bitmap-Custom-Atlas.shader | 143 + .../TMP_Bitmap-Custom-Atlas.shader.meta | 9 + .../Shaders/TMP_Bitmap-Mobile.shader | 145 + .../Shaders/TMP_Bitmap-Mobile.shader.meta | 9 + .../TextMesh Pro/Shaders/TMP_Bitmap.shader | 143 + .../Shaders/TMP_Bitmap.shader.meta | 9 + .../Shaders/TMP_SDF Overlay.shader | 317 + .../Shaders/TMP_SDF Overlay.shader.meta | 9 + .../TextMesh Pro/Shaders/TMP_SDF SSD.shader | 310 + .../Shaders/TMP_SDF SSD.shader.meta | 9 + .../Shaders/TMP_SDF-Mobile Masking.shader | 247 + .../TMP_SDF-Mobile Masking.shader.meta | 9 + .../Shaders/TMP_SDF-Mobile Overlay.shader | 240 + .../TMP_SDF-Mobile Overlay.shader.meta | 9 + .../Shaders/TMP_SDF-Mobile SSD.shader | 106 + .../Shaders/TMP_SDF-Mobile SSD.shader.meta | 9 + .../Shaders/TMP_SDF-Mobile.shader | 240 + .../Shaders/TMP_SDF-Mobile.shader.meta | 9 + .../Shaders/TMP_SDF-Surface-Mobile.shader | 138 + .../TMP_SDF-Surface-Mobile.shader.meta | 9 + .../Shaders/TMP_SDF-Surface.shader | 158 + .../Shaders/TMP_SDF-Surface.shader.meta | 9 + .../TextMesh Pro/Shaders/TMP_SDF.shader | 317 + .../TextMesh Pro/Shaders/TMP_SDF.shader.meta | 9 + .../TextMesh Pro/Shaders/TMP_Sprite.shader | 116 + .../Shaders/TMP_Sprite.shader.meta | 9 + .../Assets/TextMesh Pro/Shaders/TMPro.cginc | 84 + .../TextMesh Pro/Shaders/TMPro.cginc.meta | 9 + .../TextMesh Pro/Shaders/TMPro_Mobile.cginc | 157 + .../Shaders/TMPro_Mobile.cginc.meta | 9 + .../Shaders/TMPro_Properties.cginc | 85 + .../Shaders/TMPro_Properties.cginc.meta | 9 + .../TextMesh Pro/Shaders/TMPro_Surface.cginc | 101 + .../Shaders/TMPro_Surface.cginc.meta | 9 + xiaofang/Assets/TextMesh Pro/Sprites.meta | 8 + .../Sprites/EmojiOne Attribution.txt | 3 + .../Sprites/EmojiOne Attribution.txt.meta | 7 + .../Assets/TextMesh Pro/Sprites/EmojiOne.json | 156 + .../TextMesh Pro/Sprites/EmojiOne.json.meta | 8 + .../Assets/TextMesh Pro/Sprites/EmojiOne.png | Bin 0 -> 112319 bytes .../TextMesh Pro/Sprites/EmojiOne.png.meta | 431 + 362 files changed, 57172 insertions(+), 6518 deletions(-) create mode 100644 xiaofang/Assets/Bitsplash.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Editor.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Editor/EditorMenu.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Editor/EditorMenu.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Calendar.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Calendar.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/CellAddon.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/CellAddon.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/CommonMethods.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/CommonMethods.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePicker.Selection.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePicker.Selection.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePickerCollection.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePickerCollection.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePickerContent.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePickerContent.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/IDatePickerCollectionPrivate.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/IDatePickerCollectionPrivate.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerBackgroundSetting.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerBackgroundSetting.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerCell.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerCell.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerCellTemplate.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerCellTemplate.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerElement.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerElement.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerInput.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerInput.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerLabel.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerLabel.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerSettings.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerSettings.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerStandardInput.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerStandardInput.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DayTitle.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DayTitle.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DropDown.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DropDown/DatePickerDropDown.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DropDown/DatePickerDropDown.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DropDown/DatePickerDropDownBase.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DropDown/DatePickerDropDownBase.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Editor.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Editor/DatePickerSettingsEditor.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Editor/DatePickerSettingsEditor.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Elements.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/DatePickerButton.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/DatePickerButton.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/DatePickerText.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/DatePickerText.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/MonthTextBox.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/MonthTextBox.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/NextMonthButton.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/NextMonthButton.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/NextYearButton.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/NextYearButton.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/PrevMonthButton.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/PrevMonthButton.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/PrevYearButton.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/PrevYearButton.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/SelectionTextBox.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/SelectionTextBox.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/TodayButton.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/TodayButton.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/YearCombo.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Elements/YearCombo.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Enums.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/DatePickerCulture.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/DatePickerCulture.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/FrameLayout.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/FrameLayout.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/TextTypeEnum.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/TextTypeEnum.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/TitleButtons.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/TitleButtons.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/TitleDate.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/TitleDate.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/TitleLayout.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/TitleLayout.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/WeekDaysLayout.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Enums/WeekDaysLayout.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/IDatePickerPrivate.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/IDatePickerPrivate.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/IDatePickerSettingsItem.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/IDatePickerSettingsItem.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/IDateTimeItem.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/IDateTimeItem.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/MonoBehvaiour.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/MonoBehvaiour.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/MultipleSelectionInputValue.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/MultipleSelectionInputValue.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/SelectionType.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/SelectionType.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/StandardDatePickerCell.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/StandardDatePickerCell.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/TextMediator.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/TextMediator.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Vector.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Vector/CommonVectors.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Vector/CommonVectors.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Vector/FlexibleFrame.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Vector/FlexibleFrame.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Vector/FlexibleGrid.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Vector/FlexibleGrid.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Vector/ParameterizedShape.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Vector/ParameterizedShape.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Vector/VectorHelper.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Vector/VectorHelper.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Date Picker User Mannual.pdf create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Date Picker User Mannual.pdf.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Modules.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Modules/Cell.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Modules/Cell/BoldStandardCell.prefab create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Modules/Cell/BoldStandardCell.prefab.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Modules/Cell/SmallStandardCell 1.prefab create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Modules/Cell/SmallStandardCell 1.prefab.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Modules/Cell/StandardCell.prefab create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Modules/Cell/StandardCell.prefab.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Modules/Cell/WhiteCell.prefab create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Modules/Cell/WhiteCell.prefab.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Prefabs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Prefabs/Title Box.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Prefabs/Title Box/Month and Year Buttons.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Prefabs/Title Box/Month and Year Buttons/Centered.prefab create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Prefabs/Title Box/Month and Year Buttons/Centered.prefab.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Prefabs/Title Box/Month and Year Buttons/Sided.prefab create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Prefabs/Title Box/Month and Year Buttons/Sided.prefab.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Prefabs/Title Box/Month buttons only.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Prefabs/Title Box/Month buttons only/Centered.prefab create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Prefabs/Title Box/Month buttons only/Centered.prefab.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Prefabs/Title Box/Month buttons only/Sided.prefab create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Prefabs/Title Box/Month buttons only/Sided.prefab.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Prefabs/UIDropDown.prefab create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Prefabs/UIDropDown.prefab.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Resources.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Resources/MenuPrefabs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Resources/MenuPrefabs/MenuDark.prefab create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Resources/MenuPrefabs/MenuDark.prefab.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Resources/MenuPrefabs/MenuLight.prefab create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Resources/MenuPrefabs/MenuLight.prefab.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/TextMeshPro.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/TextMeshPro/Prefabs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/TextMeshPro/Prefabs/Text Mesh Drop Down.prefab create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/TextMeshPro/Prefabs/Text Mesh Drop Down.prefab.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/TextMeshPro/Script.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/TextMeshPro/Script/DatePickerDropDownTextMeshPro.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/TextMeshPro/Script/DatePickerDropDownTextMeshPro.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/TextMeshPro/Script/DatePickerSettings.TextMeshPro.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/TextMeshPro/Script/DatePickerSettings.TextMeshPro.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/TextMeshPro/Script/DatePickerText.TextMeshPro.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/TextMeshPro/Script/DatePickerText.TextMeshPro.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/TextMeshPro/Script/TextMediator.TextMeshPro.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/TextMeshPro/Script/TextMediator.TextMeshPro.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/TextMeshPro/fonts.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/TextMeshPro/fonts/Lemon SDF.asset create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/TextMeshPro/fonts/Lemon SDF.asset.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/TextMeshPro/fonts/SourceSansPro-Regular SDF.asset create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/TextMeshPro/fonts/SourceSansPro-Regular SDF.asset.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/TextMeshPro/fonts/SourceSansPro-Semibold SDF.asset create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/TextMeshPro/fonts/SourceSansPro-Semibold SDF.asset.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Arrow.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Arrow/CC0.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Arrow/CC0/arrow_custom.png create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Arrow/CC0/arrow_custom.png.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Arrow/CC0/arrow_custom_2.png create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Arrow/CC0/arrow_custom_2.png.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Arrow/CC0/arrow_green.png create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Arrow/CC0/arrow_green.png.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Arrow/CC0/arrow_green_2.png create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Arrow/CC0/arrow_green_2.png.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Arrow/CC0/arrow_round_blue.png create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Arrow/CC0/arrow_round_blue.png.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Arrow/CC0/double_arrow_custom.png create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Arrow/CC0/double_arrow_custom.png.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Arrow/CC0/double_arrow_down_green.png create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Arrow/CC0/double_arrow_down_green.png.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Arrow/CC0/double_arrow_green.png create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Arrow/CC0/double_arrow_green.png.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Backgrounds.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Backgrounds/BlueGrad.png create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Backgrounds/BlueGrad.png.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Backgrounds/glass.png create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Backgrounds/glass.png.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Backgrounds/gradient1.png create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Backgrounds/gradient1.png.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Backgrounds/gradient2.png create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Backgrounds/gradient2.png.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Backgrounds/gradient3.png create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Backgrounds/gradient3.png.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Backgrounds/gradient4.png create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Backgrounds/gradient4.png.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Backgrounds/gradient5.png create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Backgrounds/gradient5.png.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Empty.png create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Empty.png.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Selection.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Selection/CC0.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Selection/CC0/round.png create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Selection/CC0/round.png.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Selection/CC0/round_gold.png create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Selection/CC0/round_gold.png.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Selection/CC0/round_yellow.png create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Selection/CC0/round_yellow.png.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Selection/CC0/square.png create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Selection/CC0/square.png.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Selection/Calendar.png create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/Selection/Calendar.png.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/point.png create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Textures/point.png.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Themes.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Themes/Classic Black.prefab create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Themes/Classic Black.prefab.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Themes/Cold White.prefab create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Themes/Cold White.prefab.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Themes/Dark Red.prefab create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Themes/Dark Red.prefab.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Themes/Flowing.prefab create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Themes/Flowing.prefab.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Themes/Paper.prefab create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Themes/Paper.prefab.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Themes/Playful 2.prefab create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Themes/Playful 2.prefab.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Themes/Playful.prefab create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Themes/Playful.prefab.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Themes/Warm White.prefab create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Themes/Warm White.prefab.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Tutorials.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Tutorials/Display.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Tutorials/Display/Display.unity create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Tutorials/Display/Display.unity.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Tutorials/Display/DisplayTutorial.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Tutorials/Display/DisplayTutorial.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Tutorials/Selection.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Tutorials/Selection/Selection.unity create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Tutorials/Selection/Selection.unity.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Tutorials/Selection/SelectionTutorial.cs create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/Tutorials/Selection/SelectionTutorial.cs.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts/lemon.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts/lemon/Lemon.ttf create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts/lemon/Lemon.ttf.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts/lemon/License.txt create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts/lemon/License.txt.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts/source-sans-pro.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts/source-sans-pro/LICENSE.txt create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts/source-sans-pro/LICENSE.txt.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts/source-sans-pro/TTF.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts/source-sans-pro/TTF/SourceSansPro-Black.ttf create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts/source-sans-pro/TTF/SourceSansPro-Black.ttf.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts/source-sans-pro/TTF/SourceSansPro-BlackIt.ttf create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts/source-sans-pro/TTF/SourceSansPro-BlackIt.ttf.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts/source-sans-pro/TTF/SourceSansPro-Bold.ttf create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts/source-sans-pro/TTF/SourceSansPro-Bold.ttf.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts/source-sans-pro/TTF/SourceSansPro-BoldIt.ttf create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts/source-sans-pro/TTF/SourceSansPro-BoldIt.ttf.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts/source-sans-pro/TTF/SourceSansPro-ExtraLight.ttf create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts/source-sans-pro/TTF/SourceSansPro-ExtraLight.ttf.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts/source-sans-pro/TTF/SourceSansPro-ExtraLightIt.ttf create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts/source-sans-pro/TTF/SourceSansPro-ExtraLightIt.ttf.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts/source-sans-pro/TTF/SourceSansPro-It.ttf create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts/source-sans-pro/TTF/SourceSansPro-It.ttf.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts/source-sans-pro/TTF/SourceSansPro-Light.ttf create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts/source-sans-pro/TTF/SourceSansPro-Light.ttf.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts/source-sans-pro/TTF/SourceSansPro-LightIt.ttf create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts/source-sans-pro/TTF/SourceSansPro-LightIt.ttf.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts/source-sans-pro/TTF/SourceSansPro-Regular.ttf create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts/source-sans-pro/TTF/SourceSansPro-Regular.ttf.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts/source-sans-pro/TTF/SourceSansPro-Semibold.ttf create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts/source-sans-pro/TTF/SourceSansPro-Semibold.ttf.meta create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts/source-sans-pro/TTF/SourceSansPro-SemiboldIt.ttf create mode 100644 xiaofang/Assets/Bitsplash/Modular Date Picker/fonts/SIL Open Fonts/source-sans-pro/TTF/SourceSansPro-SemiboldIt.ttf.meta create mode 100644 xiaofang/Assets/Prefabs/PanelPrefabs/scheduled_5.prefab create mode 100644 xiaofang/Assets/Prefabs/PanelPrefabs/scheduled_5.prefab.meta create mode 100644 xiaofang/Assets/Prefabs/itemPrefabs/btnDutyChoose.prefab create mode 100644 xiaofang/Assets/Prefabs/itemPrefabs/btnDutyChoose.prefab.meta create mode 100644 xiaofang/Assets/Resources/Plug.meta create mode 100644 xiaofang/Assets/Script/UI/DutyItem.cs create mode 100644 xiaofang/Assets/Script/UI/DutyItem.cs.meta create mode 100644 xiaofang/Assets/TextMesh Pro.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Documentation.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Documentation/TextMesh Pro User Guide 2016.pdf create mode 100644 xiaofang/Assets/TextMesh Pro/Documentation/TextMesh Pro User Guide 2016.pdf.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Fonts.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Fonts/LiberationSans - OFL.txt create mode 100644 xiaofang/Assets/TextMesh Pro/Fonts/LiberationSans - OFL.txt.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Fonts/LiberationSans.ttf create mode 100644 xiaofang/Assets/TextMesh Pro/Fonts/LiberationSans.ttf.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Resources.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Resources/Fonts & Materials.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Drop Shadow.mat create mode 100644 xiaofang/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Drop Shadow.mat.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset create mode 100644 xiaofang/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Outline.mat create mode 100644 xiaofang/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Outline.mat.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF.asset create mode 100644 xiaofang/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF.asset.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Resources/LineBreaking Following Characters.txt create mode 100644 xiaofang/Assets/TextMesh Pro/Resources/LineBreaking Following Characters.txt.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Resources/LineBreaking Leading Characters.txt create mode 100644 xiaofang/Assets/TextMesh Pro/Resources/LineBreaking Leading Characters.txt.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Resources/Sprite Assets.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Resources/Sprite Assets/EmojiOne.asset create mode 100644 xiaofang/Assets/TextMesh Pro/Resources/Sprite Assets/EmojiOne.asset.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Resources/Style Sheets.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Resources/Style Sheets/Default Style Sheet.asset create mode 100644 xiaofang/Assets/TextMesh Pro/Resources/Style Sheets/Default Style Sheet.asset.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Resources/TMP Settings.asset create mode 100644 xiaofang/Assets/TextMesh Pro/Resources/TMP Settings.asset.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMP_Bitmap-Custom-Atlas.shader create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMP_Bitmap-Custom-Atlas.shader.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMP_Bitmap-Mobile.shader create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMP_Bitmap-Mobile.shader.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMP_Bitmap.shader create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMP_Bitmap.shader.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMP_SDF Overlay.shader create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMP_SDF Overlay.shader.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMP_SDF SSD.shader create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMP_SDF SSD.shader.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile Masking.shader create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile Masking.shader.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile Overlay.shader create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile Overlay.shader.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile SSD.shader create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile SSD.shader.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile.shader create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile.shader.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMP_SDF-Surface-Mobile.shader create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMP_SDF-Surface-Mobile.shader.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMP_SDF-Surface.shader create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMP_SDF-Surface.shader.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMP_SDF.shader create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMP_SDF.shader.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMP_Sprite.shader create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMP_Sprite.shader.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMPro.cginc create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMPro.cginc.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMPro_Mobile.cginc create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMPro_Mobile.cginc.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMPro_Properties.cginc create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMPro_Properties.cginc.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMPro_Surface.cginc create mode 100644 xiaofang/Assets/TextMesh Pro/Shaders/TMPro_Surface.cginc.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Sprites.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Sprites/EmojiOne Attribution.txt create mode 100644 xiaofang/Assets/TextMesh Pro/Sprites/EmojiOne Attribution.txt.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Sprites/EmojiOne.json create mode 100644 xiaofang/Assets/TextMesh Pro/Sprites/EmojiOne.json.meta create mode 100644 xiaofang/Assets/TextMesh Pro/Sprites/EmojiOne.png create mode 100644 xiaofang/Assets/TextMesh Pro/Sprites/EmojiOne.png.meta diff --git a/xiaofang/Assets/Bitsplash.meta b/xiaofang/Assets/Bitsplash.meta new file mode 100644 index 00000000..e03e6318 --- /dev/null +++ b/xiaofang/Assets/Bitsplash.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 74f1aa4695d10664a965c00f6614a39b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker.meta b/xiaofang/Assets/Bitsplash/Modular Date Picker.meta new file mode 100644 index 00000000..5cac5aeb --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6c518e84f27ffeb439ab28aa3e8747cb +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base.meta b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base.meta new file mode 100644 index 00000000..c49d6477 --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: dd9c40c69d2ff0d468bd5811d09bd0d1 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Editor.meta b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Editor.meta new file mode 100644 index 00000000..809e412b --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4664c16ec00c057459379ec8124e229f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Editor/EditorMenu.cs b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Editor/EditorMenu.cs new file mode 100644 index 00000000..521fcd7c --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Editor/EditorMenu.cs @@ -0,0 +1,50 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + +public class EditorMenu +{ + private static void InstanciateCanvas(string path) + { + Canvas[] canvases = GameObject.FindObjectsOfType(); + if (canvases == null || canvases.Length == 0) + { + EditorUtility.DisplayDialog("No canvas in scene", "Please add a canvas to the scene and try again", "Ok"); + return; + } + Canvas canvas = null; + foreach (Canvas c in canvases) + { + if (c.transform.parent == null) + { + canvas = c; + break; + } + } + + if (canvas == null) + { + EditorUtility.DisplayDialog("No canvas in scene", "Please add a canvas to the scene and try again", "Ok"); + return; + } + GameObject obj = Resources.Load(path); + GameObject newObj = (GameObject)GameObject.Instantiate(obj); + newObj.transform.SetParent(canvas.transform, false); + newObj.name = newObj.name.Replace("(Clone)", ""); + Undo.RegisterCreatedObjectUndo(newObj, "Create Object"); + } + + + [MenuItem("Tools/Date Picker/Light Theme")] + public static void AddLightTheme() + { + InstanciateCanvas("MenuPrefabs/MenuLight"); + } + + [MenuItem("Tools/Date Picker/Dark Theme")] + public static void AddDarkTheme() + { + InstanciateCanvas("MenuPrefabs/MenuDark"); + } +} diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Editor/EditorMenu.cs.meta b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Editor/EditorMenu.cs.meta new file mode 100644 index 00000000..26f8b930 --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Editor/EditorMenu.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 81f0f1ae76414204b9fbccc3116b2ccb +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script.meta b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script.meta new file mode 100644 index 00000000..a7ebeb5d --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c7c7633203ecd45469316a291a0b5385 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Calendar.cs b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Calendar.cs new file mode 100644 index 00000000..3a2c53bc --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Calendar.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Bitsplash.DatePicker +{ + class Calendar + { + } +} diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Calendar.cs.meta b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Calendar.cs.meta new file mode 100644 index 00000000..abac1f96 --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/Calendar.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5522f7b0412313140b60210c2cdd74f0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/CellAddon.cs b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/CellAddon.cs new file mode 100644 index 00000000..46a3850e --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/CellAddon.cs @@ -0,0 +1,78 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.EventSystems; + +namespace Bitsplash.DatePicker +{ + public class CellAddon : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler, IPointerClickHandler,IBeginDragHandler,IEndDragHandler,IDragHandler,IPointerDownHandler + { + DatePickerContent mParent; + int mChildIndex; + + public void OnBeginDrag(PointerEventData eventData) + { + if (mParent != null) + ((IDatePickerPrivate)mParent).RaiseStartSelection(mChildIndex); + } + + public void OnDrag(PointerEventData eventData) + { + + } + + public void OnEndDrag(PointerEventData eventData) + { + if (mParent != null) + ((IDatePickerPrivate)mParent).EndSelection(); + } + + public void OnPointerClick(PointerEventData eventData) + { + + } + + public void OnPointerDown(PointerEventData eventData) + { + if (mParent != null) + ((IDatePickerPrivate)mParent).RaiseClick(mChildIndex); + } + + public void OnPointerEnter(PointerEventData eventData) + { + if (eventData.pointerDrag != null) + { + var cellAddon = eventData.pointerDrag.GetComponent(); + if (cellAddon != null && mParent != null) + ((IDatePickerPrivate)mParent).RaiseSelectionEnter(mChildIndex, cellAddon.mChildIndex); + } + } + + public void OnPointerExit(PointerEventData eventData) + { + if (eventData.pointerDrag != null) + { + var cellAddon = eventData.pointerDrag.GetComponent(); + if (cellAddon != null && mParent != null) + ((IDatePickerPrivate)mParent).RaiseSelectionExit(mChildIndex, cellAddon.mChildIndex); + } + } + + public void SetParent(DatePickerContent parent,int childIndex) + { + mParent = parent; + mChildIndex = childIndex; + } + // Start is called before the first frame update + void Start() + { + + } + + // Update is called once per frame + void Update() + { + + } + } +} \ No newline at end of file diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/CellAddon.cs.meta b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/CellAddon.cs.meta new file mode 100644 index 00000000..bf54e0e2 --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/CellAddon.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e3355eceaf15fbb41b9a55f5f8839175 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/CommonMethods.cs b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/CommonMethods.cs new file mode 100644 index 00000000..9af43ce8 --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/CommonMethods.cs @@ -0,0 +1,145 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UnityEngine; +using UnityEngine.UI; + +namespace Bitsplash +{ + class CommonMethods + { + public static readonly Rect UVAbsolute = new Rect(0f, 0f, 1f, 1f); + internal static T EnsureComponent(GameObject obj,bool hide = false) where T : Component + { + T comp = obj.GetComponent(); + if (comp == null) + comp = obj.AddComponent(); + if (Application.isPlaying == false && Application.isEditor == true) + { + // comp.tag = "EditorOnly"; + comp.hideFlags = HideFlags.DontSaveInEditor; + } + return comp; + } + + public static void HideObject(GameObject obj) + { + if (Application.isPlaying == false && Application.isEditor == true) + { + obj.tag = "EditorOnly"; + obj.hideFlags = HideFlags.DontSaveInEditor; + } + obj.hideFlags = obj.hideFlags | HideFlags.HideInHierarchy | HideFlags.HideInInspector; + } + + public static void SafeDestroy( UnityEngine.Object obj) + { + if (obj == null) + return; + if (Application.isEditor && Application.isPlaying == false) + UnityEngine.Object.DestroyImmediate(obj); + else + UnityEngine.Object.Destroy(obj); + obj = null; + + } + public static Rect HorizontalTextureTile(float amount) + { + return new Rect(0f, 0f, amount, 1f); + } + public static Rect VerticalTextureTile(float amount) + { + return new Rect(0f, 0f,1f, amount); + } + + public static float InterpolateInRectX(float v,Rect r) + { + return r.x + v * r.width; + } + public static float InterpolateInRectY(float v, Rect r) + { + return r.y + v * r.height; + } + + public static Vector2 InterpolateInRect(Vector2 v,Rect r) + { + return new Vector2(r.x + v.x * r.width, r.y + v.y * r.height); + } + public static void DrawVertical(float x, Rect bounds, float thickness, Rect uv, Color color, VertexHelper vh) + { + Rect r = new Rect(x-thickness*0.5f, bounds.y, thickness,bounds.height); + DrawRect(r, uv, color, vh); + } + + public static void DrawHorizontal(float y,Rect bounds,float thickness,Rect uv, Color color,VertexHelper vh) + { + Rect r = new Rect(bounds.x, y - thickness * 0.5f, bounds.width, thickness); + DrawRect(r, uv, color, vh); + } + public static void DrawRect(Rect rect,Rect uv,Color color,VertexHelper vh) + { + int index = vh.currentVertCount; + vh.AddVert(new Vector3(rect.xMin, rect.yMin, 0f), color, new Vector2(uv.xMin, uv.yMin)); + vh.AddVert(new Vector3(rect.xMin, rect.yMax, 0f), color, new Vector2(uv.xMin, uv.yMax)); + vh.AddVert(new Vector3(rect.xMax, rect.yMax, 0f), color, new Vector2(uv.xMax, uv.yMax)); + vh.AddVert(new Vector3(rect.xMax, rect.yMin, 0f), color, new Vector2(uv.xMax, uv.yMin)); + vh.AddTriangle(index, index+ 1, index+2); + vh.AddTriangle(index+2, index+3, index); + } + public static bool IsRangeSelected(DateTime from, DateTime to, HashSet selection) + { + from = from.Date; + to = to.Date; + if (from == to) + { + return selection.Count == 1 && selection.Contains(from); + } + if (from > to) + { + DateTime tmp = from; + from = to; + to = tmp; + } + + DateTime iterator = from; + int count = 0; + while (iterator <= to) + { + if (selection.Contains(iterator.Date) == false) + return false; + count++; + iterator += TimeSpan.FromDays(1); + } + if (selection.Count != count) + return false; + return true; + } + public static void SelectRange(DateTime from, DateTime to, HashSet selection) + { + selection.Clear(); + from = from.Date; + to = to.Date; + if (from == to) + { + selection.Add(from); + return; + } + if (from > to) + { + DateTime tmp = from; + from = to; + to = tmp; + } + + DateTime iterator = from; + while (iterator <= to) + { + selection.Add(iterator.Date); + iterator += TimeSpan.FromDays(1); + } + } + + } +} diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/CommonMethods.cs.meta b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/CommonMethods.cs.meta new file mode 100644 index 00000000..a56b2a5a --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/CommonMethods.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9ed3373f404cfdb41971280286fab7b2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker.meta b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker.meta new file mode 100644 index 00000000..d603d6af --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 09a8fdbf9b2de994c813d6dd6f8c84a0 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePicker.Selection.cs b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePicker.Selection.cs new file mode 100644 index 00000000..e1ec888f --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePicker.Selection.cs @@ -0,0 +1,244 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UnityEngine; + +namespace Bitsplash.DatePicker +{ + /// + /// + /// + public partial class DatePickerContent : IDatePickerPrivate + { + DateTime? mSelectionFirst; + DateTime? mDragFirst; + DateTime? mDragTo; + + HashSet mDragSelectionRange = new HashSet(); + bool mDragSelectionChanged = false; + + + Dictionary mMarkerColors = new Dictionary(); + public void SetAllMarkerColors(Dictionary markers) + { + + mMarkerColors.Clear(); + foreach (var pair in markers) + mMarkerColors.Add(pair.Key.Date, pair.Value); + RefreshSelection(); + } + public void SetMarkerColor(DateTime date, Color color) + { + mMarkerColors[date.Date] = color; + RefreshSelection(); + } + public void ClearMarker(DateTime date) + { + mMarkerColors.Remove(date.Date); + RefreshSelection(); + } + public void ClearMarkerColor() + { + mMarkerColors.Clear(); + RefreshSelection(); + + } + void SelectOne(DateTime date) + { + mSelection.SelectOne(date); + mSelectionFirst = date; + } + + void ToogleOne(DateTime date) + { + if (mSelection.IsSingleDateSelected(date) && AllowEmptySelection) + { + mSelection.Clear(); + mSelectionFirst = null; + } + else + SelectOne(date); + } + void UpdateSelection() + { + if(mDragSelectionChanged || ((IDatePickerCollectionPrivate) mSelection).Changed) + { + ((IDatePickerCollectionPrivate)mSelection).Changed = false; + mDragSelectionChanged = false; + RefreshSelection(); + } + } + void RefreshSelection() + { + for (int i = 0; i < mCells.Length; i++) + { + var date = mCells[i].DayValue.Date; + bool withinMonth = date.Month == DisplayDate.Month && date.Year == DisplayDate.Year; + Color markerColor; + if (mMarkerColors.TryGetValue(date, out markerColor) == false) + markerColor = new Color(0f, 0f, 0f, 0f); + if (mCells[i].MarkerColor != markerColor) + mCells[i].MarkerColor = markerColor; + if ((mSelection.Contains(date) || mDragSelectionRange.Contains(date)) && withinMonth) + { + if (mCells[i].CellSelected == false) + mCells[i].CellSelected = true; + } + else + { + if(mCells[i].CellSelected == true) + mCells[i].CellSelected = false; + } + } + } + + void LimitRangeToMonth(HashSet selection,DateTime month) + { + selection.RemoveWhere((x) => x.Month != month.Month || x.Year != month.Year); + } + + + void SelectRange(DateTime from,DateTime to) + { + mSelection.SelectRange(from, to); + } + + void ToogleMultiple(DateTime date) + { + if (mSelection.Contains(date)) + { + if (mSelection.Count > 1 || AllowEmptySelection) + mSelection.Remove(date); + } + else + { + mSelection.Add(date); + } + } + + void ConnectSelection(DateTime date) + { + date = date.Date; + if (mSelection.Contains(date)) // already within the selection + return; + if(mSelection.Count == 0 || mSelectionFirst.HasValue == false) + { + SelectOne(date); + return; + } + SelectRange(mSelectionFirst.Value, date); + } + + void ProcessRangeClick(DatePickerCell cell, int cellChildIndex) + { + if (mDatePickerInput.MultipleSelectionValue == MultipleSelectionInputValue.Append) + ConnectSelection(cell.DayValue); + else if (mDatePickerInput.MultipleSelectionValue == MultipleSelectionInputValue.Singular) + ToogleOne(cell.DayValue); + } + + void ProcessMultipleClick(DatePickerCell cell, int cellChildIndex) + { + if (mDatePickerInput.MultipleSelectionValue == MultipleSelectionInputValue.Append) + ToogleMultiple(cell.DayValue); + else if (mDatePickerInput.MultipleSelectionValue == MultipleSelectionInputValue.Singular) + ToogleOne(cell.DayValue); + } + void ProcessSelectionClick(DatePickerCell cell,int cellChildIndex) + { + switch (SelectionMode) + { + case SelectionType.Single: + ToogleOne(cell.DayValue); + break; + case SelectionType.Range: + ProcessRangeClick(cell, cellChildIndex); + break; + case SelectionType.Multiple: + ProcessMultipleClick(cell, cellChildIndex); + break; + } + } + + protected virtual void OnCellClick(DatePickerCell cell, int cellChildIndex) + { + if (cell.CellEnabled == false) + return; + if (mDragFirst.HasValue || mDragTo.HasValue) + return; + ProcessSelectionClick(cell, cellChildIndex); + } + + void RaiseSelectionChanged() + { + if (OnSelectionChanged != null) + OnSelectionChanged.Invoke(); + } + void IDatePickerPrivate.RaiseClick(int childIndex) + { + OnCellClick(mCells[childIndex], childIndex); + } + + void IDatePickerPrivate.RaiseStartSelection(int childIndex) + { + if (SelectionMode == SelectionType.Single) + return; + DateTime dayValue = mCells[childIndex].DayValue; + if (SelectionMode == SelectionType.Range || (SelectionMode == SelectionType.Multiple && mDatePickerInput.MultipleSelectionValue == MultipleSelectionInputValue.Singular)) + mSelection.SelectOne(dayValue); + mDragFirst = dayValue; + if (mDragTo.HasValue && mDragFirst.HasValue) + { + CommonMethods.SelectRange(mDragTo.Value, mDragFirst.Value, mDragSelectionRange); + } + else + { + mDragSelectionRange.Clear(); + mDragSelectionRange.Add(dayValue); + } + mSelectionFirst = null; + LimitRangeToMonth(mDragSelectionRange, mMonthFirst); + mDragSelectionChanged = true; + } + + void IDatePickerPrivate.EndSelection() + { + if (SelectionMode == SelectionType.Single) + return; + if (mDragTo.HasValue && mDragFirst.HasValue) + { + CommonMethods.SelectRange(mDragTo.Value, mDragFirst.Value, mDragSelectionRange); + LimitRangeToMonth(mDragSelectionRange, mMonthFirst); + mSelection.AddItems(mDragSelectionRange); + } + mDragSelectionRange.Clear(); + mDragSelectionChanged = true; + mDragTo = null; + mDragFirst = null; + } + + void IDatePickerPrivate.RaiseSelectionEnter(int childIndex, int fromChildIndex) + { + if (SelectionMode == SelectionType.Single) + return; + mSelectionFirst = null; + mDragTo = mCells[childIndex].DayValue; + if (mDragTo.HasValue && mDragFirst.HasValue) + { + CommonMethods.SelectRange(mDragTo.Value, mDragFirst.Value, mDragSelectionRange); + LimitRangeToMonth(mDragSelectionRange, mMonthFirst); + } + mDragSelectionChanged = true; + } + + void IDatePickerPrivate.RaiseSelectionExit(int childIndex, int fromChildIndex) + { + if (SelectionMode == SelectionType.Single) + return; +// if (mDragTo.HasValue && mDragTo.Value == mCells[childIndex].DayValue) +// mDragTo = null; + } + } +} diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePicker.Selection.cs.meta b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePicker.Selection.cs.meta new file mode 100644 index 00000000..8a957d83 --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePicker.Selection.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7503219deb4b33f4e9303c6234e05568 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePickerCollection.cs b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePickerCollection.cs new file mode 100644 index 00000000..8346eb65 --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePickerCollection.cs @@ -0,0 +1,190 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Bitsplash.DatePicker +{ + /// + /// holds dates selected by the date picker + /// + public class DatePickerCollection : IDatePickerCollectionPrivate + { + bool mInvalid = false; + HashSet mData = new HashSet(); + bool mChanged = false; + bool mAllowEmpty = false; + + DateTime[] mItems; + + bool IDatePickerCollectionPrivate.Changed { get { return mChanged; } set { mChanged = value; } } + + bool IDatePickerCollectionPrivate.AllowEmpty { get { return mAllowEmpty; } set + { + mAllowEmpty = value; + if(mAllowEmpty == false && mData.Count ==0) + { + ValidateNonEmpty(); + Invalidate(); + } + } + } + + event Action InnerSelectionModified; + + event Action IDatePickerCollectionPrivate.SelectionModified + { + add + { + InnerSelectionModified += value; + } + + remove + { + InnerSelectionModified -= value; + } + } + + public int Count + { + get { return mData.Count; } + } + + /// + /// selects a range of dates , clearing all other dates + /// + /// + /// + public void SelectRange(DateTime from,DateTime to) + { + if (CommonMethods.IsRangeSelected(from, to, mData)) + return; + CommonMethods.SelectRange(from, to, mData); + Invalidate(); + } + + void Invalidate() + { + mChanged = true; + mInvalid = true; + if (InnerSelectionModified != null) + InnerSelectionModified(); + } + + /// + /// returns true if a date is the only date selected + /// + /// + /// + public bool IsSingleDateSelected(DateTime date) + { + date = date.Date; + if (mData.Contains(date) && mData.Count == 1) + return true; + return false; + } + + /// + /// selects one date clearing all other dates + /// + /// + public void SelectOne(DateTime date) + { + date = date.Date; + if (mData.Contains(date) && mData.Count == 1) + return; + + mData.Clear(); + Add(date); + } + + void ValidateNonEmpty() + { + if (mAllowEmpty == false && mData.Count == 0) + mData.Add(DateTime.Today.Date); + } + + /// + /// clears all selected dates. If the selection cannot be empty , DateTime.Today is set as the selection + /// + public void Clear() + { + if (mData.Count == 0) + return; + if (mAllowEmpty == false && IsSingleDateSelected(DateTime.Today)) + return; + mData.Clear(); + ValidateNonEmpty(); + Invalidate(); + } + + /// + /// appends all the items to the date collection + /// + /// + public void AddItems(HashSet range) + { + bool changed = false; + foreach(DateTime d in range) + { + if (mData.Add(d)) + changed = true; + } + if (changed) + Invalidate(); + } + + /// + /// adds a date into the date selection. + /// + /// + public void Add(DateTime date) + { + if(mData.Add(date.Date)) + Invalidate(); + } + + /// + /// returns true if the date collection contains the specified date + /// + /// + /// + public bool Contains(DateTime date) + { + return mData.Contains(date.Date); + } + + /// + /// gets the date item at index + /// + /// + /// + public DateTime GetItem(int index) + { + if(mInvalid || mItems == null) + { + mInvalid = false; + mItems = mData.OrderBy(x => x).ToArray(); + } + return mItems[index]; + } + + /// + /// removes a date from the collection if it present. returns true if the date was present and was removed + /// + /// + /// + public bool Remove(DateTime date) + { + + if (mData.Remove(date.Date)) + { + ValidateNonEmpty(); + Invalidate(); + return true; + } + return false; + } + } +} diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePickerCollection.cs.meta b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePickerCollection.cs.meta new file mode 100644 index 00000000..2945b7c1 --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePickerCollection.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5ffa37277c4fcc84898295747af4801a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePickerContent.cs b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePickerContent.cs new file mode 100644 index 00000000..76f7bde2 --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePickerContent.cs @@ -0,0 +1,464 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UnityEngine; +using UnityEngine.Events; +using UnityEngine.Serialization; +using UnityEngine.UI; + +namespace Bitsplash.DatePicker +{ + [ExecuteInEditMode] + public partial class DatePickerContent : MonoBehaviour , IDatePickerSettingsItem + { + [SerializeField] + [HideInInspector] + private bool isOpen; + + const int RowCount = 6; + const int ColumnCount = 7; + + [FormerlySerializedAs("FirstDayOfWeek")] + [SerializeField] + [Tooltip("the first day of the week for the content")] + private DayOfWeek firstDayOfWeek = DayOfWeek.Sunday; + + [FormerlySerializedAs("RightToLeft")] + [SerializeField] + private bool rightToLeft = false; + + [FormerlySerializedAs("BottomToTop")] + [SerializeField] + private bool bottomToTop = false; + + [FormerlySerializedAs("CellPrefab")] + [SerializeField] + [Tooltip("drag a cell template here to use it with the datepicker")] + private DatePickerCell cellPrefab = null; + + [FormerlySerializedAs("SelectionMode")] + [SerializeField] + [Tooltip("single,range and multiple selection types. ")] + private SelectionType selectionMode; + + [FormerlySerializedAs("AllowEmptySelection")] + [SerializeField] + private bool allowEmptySelection = false; + + [SerializeField] + private DateTime startDate = new DateTime(1960,1,1); + + [SerializeField] + private DateTime endDate = new DateTime(2030, 12, 31); + + void ValidateYear() + { + if (endDate < startDate) + endDate = startDate; + mMonthFirst = new DateTime(mMonthFirst.Year, mMonthFirst.Month, 1); + if(mMonthFirst > endDate) + { + mMonthFirst = new DateTime(endDate.Year, endDate.Month, 1); + } + if(mMonthFirst < startDate) + { + mMonthFirst = new DateTime(startDate.Year, startDate.Month, 1); + } + } + public DateTime StartDate + { + get { return startDate; } + set + { + startDate = value.Date; + ValidateYear(); + Invalidate(); + OnSettingsChanged(); + } + } + + public DateTime EndDate + { + get { return endDate; } + set + { + endDate = value.Date; + ValidateYear(); + Invalidate(); + OnSettingsChanged(); + } + } + + /// + /// the first day of the week for the date picker + /// + public DayOfWeek FirstDayOfWeek + { + get { return firstDayOfWeek; } + set + { + firstDayOfWeek = value; + OnSettingsChanged(); + } + } + + /// + /// set the date picker to right to left mode + /// + public bool RightToLeft + { + get { return rightToLeft; } + set + { + rightToLeft = value; + OnSettingsChanged(); + } + } + + + /// + /// show days from bottom to top instead of top to bottom + /// + public bool BottomToTop + { + get { return bottomToTop; } + set + { + bottomToTop = value; + OnSettingsChanged(); + } + } + + + //public DatePickerCell CellPrefab + //{ + // get { return cellPrefab; } + // set + // { + // cellPrefab = value; + // } + //} + + + /// + /// set the selection mode for the date picker. Single ,Range or Multiple + /// + public SelectionType SelectionMode + { + get { return selectionMode; } + set + { + selectionMode = value; + OnSettingsChanged(); + } + } + + + /// + /// allows selection of the date picker to be empty + /// + public bool AllowEmptySelection + { + get { return allowEmptySelection; } + set + { + allowEmptySelection = value; + OnSettingsChanged(); + } + } + + + /// + /// used for internal purpose + /// + public event Action SettingsChanged; + /// + /// currently the displayed month and year + /// + DateTime mMonthFirst = DateTime.Today; + /// + /// genearted cells + /// + DatePickerCell[] mCells; + /// + /// the selection collection object for the content + /// + DatePickerCollection mSelection = new DatePickerCollection(); + /// + /// a date to cell map for quick lookup + /// + Dictionary mDateToCell = new Dictionary(); + + /// + /// an input delegation for the date picker + /// + DatePickerInput mDatePickerInput; + + /// + /// true if the datepicker should be recreated + /// + bool mInvalidated = true; + + /// + /// This event triggers when the use navigates the datepicker + /// + public UnityEvent OnDisplayChanged; + /// + /// this event triggers when the date selection has changed + /// + public UnityEvent OnSelectionChanged; + + /// + /// the date picker selection collection. Use this object to change and query the current date selection + /// + public DatePickerCollection Selection { get { return mSelection; } } + + void EnsureInput() + { + mDatePickerInput = GetComponent(); + if (mDatePickerInput == null) + mDatePickerInput = gameObject.AddComponent(); + } + + /// + /// the currently displayed date in the datepicker + /// + public DateTime DisplayDate { get { return mMonthFirst; } } + + /// + /// sets the month and year being displayed in the date picker. + /// + /// + /// + public void SetMonthAndYear(int year,int month) + { + FillCells(new DateTime(year, month, 1)); + } + /// + /// sets the year being displayed in the date picker + /// + /// + public void SetYear(int year) + { + FillCells(new DateTime(year, mMonthFirst.Month, 1)); + } + /// + /// sets the month being displayed in the date picker + /// + /// + public void SetMonth(int month) + { + FillCells(new DateTime(mMonthFirst.Year,month, 1)); + } + /// + /// used internally + /// + public string EditorTitle { get {return "Board"; } } + + /// + /// used internally + /// + public int Order { get { return 0; } } + + /// + /// advances the display by 1 year + /// + public void NextYear() + { + FillCells(mMonthFirst.AddYears(1)); + } + void OnSettingsChanged() + { + if (SettingsChanged != null) + SettingsChanged(); + } + /// + /// retracts the display by 1 year + /// + public void PrevYear() + { + FillCells(mMonthFirst.AddYears(-1)); + } + /// + /// advances the display by 1 month + /// + public void NextMonth() + { + FillCells(mMonthFirst.AddMonths(1)); + } + /// + /// retracts the display by 1 month + /// + public void PrevMonth() + { + FillCells(mMonthFirst.AddMonths(-1)); + } + + public virtual string DateToString(DateTime date) + { + return date.Day.ToString(); + } + void GenerateCells() + { + Clear(); + if (cellPrefab == null) + return; + + mCells = new DatePickerCell[((int)RowCount) * ((int)ColumnCount)]; + + float ColumnSize = 1f / ColumnCount; + float RowSize = 1f / RowCount; + + for(float i=0; i()); + CommonMethods.HideObject(newObj); + newObj.name = String.Format("day_{0}_{1}", j, i); + newObj.SetActive(true); + CommonMethods.EnsureComponent(newObj); + var rect = newObj.GetComponent(); + rect.anchorMin = new Vector2(startX, startY); + rect.anchorMax = new Vector2(endX, endY); + rect.anchoredPosition = new Vector2(0f, 0f); + rect.sizeDelta = new Vector2(0f, 0f); + int childIndex = (int)(i * ColumnCount + j); + childIndex = (int)(i * ColumnCount + j); + mCells[childIndex] = newObj.GetComponent(); + var addon = CommonMethods.EnsureComponent(newObj); + addon.SetParent(this, childIndex); + + } + } + + FillCells(mMonthFirst); + } + DateTime MonthFromDate(DateTime date) + { + return new DateTime(date.Year, date.Month, 1); + } + DatePickerCell getCell(int day,int week) + { + return mCells[week * ColumnCount + day]; + } + + void FillCells(DateTime monthFirst) + { + monthFirst = monthFirst.Date; + mMonthFirst = monthFirst; + ValidateYear(); + if (mCells == null) + return; + + monthFirst = mMonthFirst; + int monthDayOfWeek = (int)monthFirst.DayOfWeek; + int span = monthDayOfWeek - (int)FirstDayOfWeek; + if (span < 0) + span += 7; + + DateTime startFrom = (monthFirst - TimeSpan.FromDays(span)).Date; + DateTime endIn = startFrom + TimeSpan.FromDays(RowCount * ColumnCount); + DateTime monthLast = monthFirst + TimeSpan.FromDays(DateTime.DaysInMonth(monthFirst.Year, monthFirst.Month) - 1); + DateTime current = startFrom; + mDateToCell.Clear(); + for (int i=0; i monthLast || current < startDate || current > endDate) + cellenabled = false; + mCells[i].SetInitialSettings(cellenabled, false); + mDateToCell[current.Date] = mCells[i]; + current += TimeSpan.FromDays(1); + } + RefreshSelection(); + if (OnDisplayChanged != null) + OnDisplayChanged.Invoke(); + } + + protected void Clear() + { + IDateTimeItem[] children = GetComponentsInChildren(); + for (int i = 0; i < children.Length; ++i) + { + if (children[i] != null) + { + if (children[i].gameObject.GetComponentInParent() != this) + continue; + if (children[i].gameObject != gameObject) + CommonMethods.SafeDestroy(children[i].gameObject); + } + } + } + + public void Invalidate() + { + mInvalidated = true; + } + void HookEvents() + { + ((IDatePickerCollectionPrivate)mSelection).SelectionModified -= DatePicker_SelectionModified; + ((IDatePickerCollectionPrivate)mSelection).SelectionModified += DatePicker_SelectionModified; + } + + private void DatePicker_SelectionModified() + { + RaiseSelectionChanged(); + } + + public void Start() + { + HookEvents(); + EnsureInput(); + GenerateCells(); + // if (AllowEmptySelection == false) + // SelectOne(DateTime.Today); + } + + public void Update() + { + if(AllowEmptySelection != ((IDatePickerCollectionPrivate)mSelection).AllowEmpty) + ((IDatePickerCollectionPrivate)mSelection).AllowEmpty = AllowEmptySelection; + UpdateSelection(); + if(mInvalidated) + { + GenerateCells(); + mInvalidated = false; + } + } + + public void OnValidate() + { + ValidateYear(); + OnSettingsChanged(); + Invalidate(); + } + + /// + /// retrives the underlaying gameobject specified by dateTime. If the dateTime is not currently displayed , null is returned + /// + /// + /// + public DatePickerCell GetCellObjectByDate(DateTime dateTime) + { + DatePickerCell res = null; + if (mDateToCell.TryGetValue(dateTime.Date, out res)) + return res; + return null; + } + } +} diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePickerContent.cs.meta b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePickerContent.cs.meta new file mode 100644 index 00000000..bc73f5f5 --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/DatePickerContent.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bce6f4381e832d24583a1b0c14c9e752 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/IDatePickerCollectionPrivate.cs b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/IDatePickerCollectionPrivate.cs new file mode 100644 index 00000000..8a01b39b --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/IDatePickerCollectionPrivate.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Bitsplash.DatePicker +{ + interface IDatePickerCollectionPrivate + { + bool Changed { get; set; } + bool AllowEmpty { get; set; } + event Action SelectionModified; + } +} diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/IDatePickerCollectionPrivate.cs.meta b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/IDatePickerCollectionPrivate.cs.meta new file mode 100644 index 00000000..63c82338 --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePicker/IDatePickerCollectionPrivate.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 229d73d069ddf9b4d9736254e8837601 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerBackgroundSetting.cs b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerBackgroundSetting.cs new file mode 100644 index 00000000..96f371af --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerBackgroundSetting.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UnityEngine; + +namespace Bitsplash.DatePicker +{ + public class DatePickerBackgroundSetting : MonoBehaviour, IDatePickerSettingsItem + { + [SerializeField] + [HideInInspector] + private bool isOpen; + + public string EditorTitle { get { return gameObject.name; } } + + public int Order { get { return 1; } } + } +} diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerBackgroundSetting.cs.meta b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerBackgroundSetting.cs.meta new file mode 100644 index 00000000..e39363a6 --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerBackgroundSetting.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 898e866135fe96b45a03ddabbde1a61f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerCell.cs b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerCell.cs new file mode 100644 index 00000000..aaf9e4ab --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerCell.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UnityEngine; + +namespace Bitsplash.DatePicker +{ + [RequireComponent(typeof(RectTransform))] + public abstract class DatePickerCell : MonoBehaviour + { + public abstract Color MarkerColor { get; set; } + public abstract bool CellSelected { get; set; } + public abstract bool CellEnabled { get; set; } + public abstract DateTime DayValue { get; set; } + public abstract void SetText(string text); + public abstract void SetInitialSettings(bool enabled, bool selected); + } +} diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerCell.cs.meta b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerCell.cs.meta new file mode 100644 index 00000000..c5d8e104 --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerCell.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5131c682cad278d46b142466fb127d5e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerCellTemplate.cs b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerCellTemplate.cs new file mode 100644 index 00000000..6aad9bc4 --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerCellTemplate.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UnityEngine; + +namespace Bitsplash.DatePicker +{ + public class DatePickerCellTemplate : MonoBehaviour, IDatePickerSettingsItem + { + [SerializeField] + [HideInInspector] + private bool isOpen; + + public string EditorTitle { get { return gameObject.name; } } + + public int Order { get { return 2; } } + } +} diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerCellTemplate.cs.meta b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerCellTemplate.cs.meta new file mode 100644 index 00000000..e43103f4 --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerCellTemplate.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 746317b581967e24a9b69effdf5b1106 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerElement.cs b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerElement.cs new file mode 100644 index 00000000..062e05c6 --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerElement.cs @@ -0,0 +1,66 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace Bitsplash.DatePicker +{ + /// + /// base class for date picker elements. They included buttons and texts + /// + public abstract class DatePickerElement : MonoBehaviour + { + + [SerializeField] + [HideInInspector] + private bool isOpen; + + protected virtual void Start() + { + SetLinkedElements(); + } + + /// + /// notifys the date picker element of the DatePickerSettings and DatePickerContent objects that govern it. + /// these objects are used to query and modify the date picker + /// + void SetLinkedElements() + { + var main = GetComponentInParent(); + if (main == null) + Debug.LogError("Date Picker elements must have a parent GameObject with the behviour DatePickerSettings"); + else + { + var content = main.Content; + if (content != null) + { + SetMain(main); + SetContent(content); + content.SettingsChanged -= OnSettingsChanged; + content.SettingsChanged += OnSettingsChanged; + } + } + } + + protected virtual void OnSettingsChanged() + { + + } + + public virtual void OnValidate() + { + if(isActiveAndEnabled) + SetLinkedElements(); + } + + /// + /// sets the main DatePickerSettings object assicuated with this script + /// + /// + protected abstract void SetMain(DatePickerSettings main); + /// + /// sets the main DatePickerContent object assicuated with this script + /// + /// + protected abstract void SetContent(DatePickerContent content); + } +} \ No newline at end of file diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerElement.cs.meta b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerElement.cs.meta new file mode 100644 index 00000000..8de039a2 --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerElement.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 913e98d0ced5ea44e8d1f7b4af557965 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerInput.cs b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerInput.cs new file mode 100644 index 00000000..dc6dca47 --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerInput.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UnityEngine; + +namespace Bitsplash.DatePicker +{ + public abstract class DatePickerInput : MonoBehaviour + { + public abstract MultipleSelectionInputValue MultipleSelectionValue { get; } + } +} diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerInput.cs.meta b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerInput.cs.meta new file mode 100644 index 00000000..bb1d016a --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerInput.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 142eee2af40bc2543abe91bc216a3278 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerLabel.cs b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerLabel.cs new file mode 100644 index 00000000..29fcb1c4 --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerLabel.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UnityEngine; + +namespace Bitsplash.DatePicker +{ + public abstract class DatePickerLabel : MonoBehaviour + { + public abstract void SetText(string text); + } +} \ No newline at end of file diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerLabel.cs.meta b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerLabel.cs.meta new file mode 100644 index 00000000..af318b18 --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerLabel.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f4f4126f9c9f47645840eab33f9a5e50 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerSettings.cs b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerSettings.cs new file mode 100644 index 00000000..0ec21270 --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerSettings.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UnityEngine; + +namespace Bitsplash.DatePicker +{ + + public partial class DatePickerSettings : MonoBehaviour + { + [SerializeField] + private Font textFont; + + /// + /// the text font used for UI.Text + /// + public Font TextFont + { + get { return textFont; } + set + { + textFont = value; + if (TextTypeChanged != null) + TextTypeChanged(); + } + } + + public event Action TextTypeChanged; + DatePickerContent mContent = null; + + /// + /// the datepicker content object for this date picker. + /// + public DatePickerContent Content + { + get + { + if (mContent == null) + { + var contents = GetComponentsInChildren(); + if (contents.Length == 0) + Debug.LogError("A DatePickerSettings behaviour must parent a DatePickerContent behaviour in a child GameObject"); + else + if (contents.Length > 1) + Debug.LogError("A DatePickerSettings behaviout may only have one child DatePickerContent behaviour "); + else + mContent = contents[0]; + } + return mContent; + } + } + private void Start() + { + + } + + private void OnValidate() + { + foreach (var elem in GetComponentsInChildren()) + { + elem.OnValidate(); + } + } + } +} diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerSettings.cs.meta b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerSettings.cs.meta new file mode 100644 index 00000000..a076ef8b --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerSettings.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c0fe3789ee2a1824eab74683544502a9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerStandardInput.cs b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerStandardInput.cs new file mode 100644 index 00000000..a2826bd6 --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerStandardInput.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UnityEngine; + +namespace Bitsplash.DatePicker +{ + public class DatePickerStandardInput : DatePickerInput + { + public override MultipleSelectionInputValue MultipleSelectionValue + { + get + { + if (Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightControl) || Input.GetKey(KeyCode.RightCommand) || Input.GetKey(KeyCode.LeftCommand)) + return MultipleSelectionInputValue.Append; + if (Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift)) + return MultipleSelectionInputValue.Append; + return MultipleSelectionInputValue.Singular; + } + } + } +} diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerStandardInput.cs.meta b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerStandardInput.cs.meta new file mode 100644 index 00000000..21e7bdf7 --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DatePickerStandardInput.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5b41254ad534f5f4dbe3c4807a84449f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DayTitle.cs b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DayTitle.cs new file mode 100644 index 00000000..69ecea5f --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DayTitle.cs @@ -0,0 +1,124 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using UnityEngine; + +namespace Bitsplash.DatePicker +{ + /// + /// shows the week day names on top the date picker + /// + [ExecuteInEditMode] + public class DayTitle : DatePickerElement , IDatePickerSettingsItem + { + public string EditorTitle { get { return "Day Title"; } } + + public DatePickerCell CellPrefab; + public string Format = "ddd"; + DatePickerContent mContent; + bool mInvalid = true; + + public int Order { get { return 8; } } + + void GenerateCells() + { + Clear(); + if (CellPrefab == null || mContent == null) + return; + + float ColumnSize = 1f / 7f; + DateTime baseDate = DateTime.Today.Date; + int monthDayOfWeek = (int)baseDate.DayOfWeek; + int span = monthDayOfWeek - (int)mContent.FirstDayOfWeek; + if (span < 0) + span += 7; + DateTime startFrom = (baseDate - TimeSpan.FromDays(span)).Date; + for (int i = 0; i < 7; i++) + { + DateTime current = startFrom.Add(TimeSpan.FromDays(i)).Date; + float startX = ((float)i) / 7f; + if (mContent.RightToLeft) + startX = 1f - startX - ColumnSize; + float endX = startX + ColumnSize; + + GameObject newObj = GameObject.Instantiate(CellPrefab.gameObject, transform); + CommonMethods.SafeDestroy(newObj.GetComponent()); + CommonMethods.HideObject(newObj); + newObj.name = String.Format("day_{0}", i); + newObj.SetActive(true); + CommonMethods.EnsureComponent(newObj); + var rect = newObj.GetComponent(); + rect.anchorMin = new Vector2(startX, 0f); + rect.anchorMax = new Vector2(endX, 1f); + rect.anchoredPosition = new Vector2(0f, 0f); + rect.sizeDelta = new Vector2(0f, 0f); + var cell = newObj.GetComponent(); + cell.SetInitialSettings(true, false); + cell.DayValue = current; + try + { + cell.SetText(current.ToString(Format)); + } + catch(Exception) + { + Debug.LogWarning("invalid format in day title"); + } + } + } + public void Clear() + { + IDateTimeItem[] children = GetComponentsInChildren(); + for (int i = 0; i < children.Length; ++i) + { + if (children[i] != null) + { + if (children[i].gameObject.GetComponentInParent() != this) + continue; + if (children[i].gameObject != gameObject) + CommonMethods.SafeDestroy(children[i].gameObject); + } + } + } + public void Invalidate() + { + mInvalid = true; + } + public override void OnValidate() + { + base.OnValidate(); + Invalidate(); + } + // Start is called before the first frame update + protected override void Start() + { + base.Start(); + Invalidate(); + } + protected override void OnSettingsChanged() + { + base.OnSettingsChanged(); + Invalidate(); + } + // Update is called once per frame + void Update() + { + if(mInvalid == true) + { + mInvalid = false; + GenerateCells(); + } + } + + protected override void SetContent(DatePickerContent content) + { + mContent = content; + Invalidate(); + } + + protected override void SetMain(DatePickerSettings main) + { + + } + } +} diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DayTitle.cs.meta b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DayTitle.cs.meta new file mode 100644 index 00000000..74ae3589 --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DayTitle.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5cde14b682a49eb4fa7cdce34de69813 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DropDown.meta b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DropDown.meta new file mode 100644 index 00000000..7f3c61c9 --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DropDown.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: eb00ea298ab962c40a0f91bb43ec1297 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DropDown/DatePickerDropDown.cs b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DropDown/DatePickerDropDown.cs new file mode 100644 index 00000000..3846d6ab --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DropDown/DatePickerDropDown.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UnityEngine.UI; + +namespace Bitsplash.DatePicker +{ + /// + /// this is a UI.Text implementation of the drop down + /// + public class DatePickerDropDown : DatePickerDropDownBase + { + public Text Label; + + protected override void SetText(string text) + { + if (Label != null) + Label.text = text; + } + } +} diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DropDown/DatePickerDropDown.cs.meta b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DropDown/DatePickerDropDown.cs.meta new file mode 100644 index 00000000..5bef7a30 --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DropDown/DatePickerDropDown.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 137f420b74ffe624ba4e39c0746e5cd4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DropDown/DatePickerDropDownBase.cs b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DropDown/DatePickerDropDownBase.cs new file mode 100644 index 00000000..5af81761 --- /dev/null +++ b/xiaofang/Assets/Bitsplash/Modular Date Picker/Base/Script/DropDown/DatePickerDropDownBase.cs @@ -0,0 +1,159 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Events; +using UnityEngine.UI; + +namespace Bitsplash.DatePicker +{ + public abstract class DatePickerDropDownBase : MonoBehaviour + { + + /// + /// + /// + public string NoSelectionPrompt = "Select a date..."; + /// + /// the date format of the label + /// + public string labelDateFormat = "d"; + /// + /// the date picker settings object for the drop down + /// + public DatePickerSettings DropDownContent; + /// + /// the drop down button + /// + public Button DropDownButton; + + GameObject mBlocker; + // Start is called before the first frame update + void Start() + { + InitDropDown(); + } + + /// + /// initializes the drop down events + /// + void InitDropDown() + { + if(DropDownButton == null) + Debug.LogWarning("Drop Down Button Not Assigned"); // show warninig + else + DropDownButton.onClick.AddListener(ButtonClicked); // listen to drop down button clicks + if (DropDownContent == null) + Debug.LogWarning("Drop Down Content Not Assigned");// show warninig + else + { + // set the selection mode to single. + DropDownContent.Content.SelectionMode = SelectionType.Single; + // listen to selection changed events on the date picker + DropDownContent.Content.OnSelectionChanged.AddListener(SelectionChanged); + // disable the drop down object + DropDownContent.gameObject.SetActive(false); + Canvas canvas = CommonMethods.EnsureComponent(DropDownContent.gameObject); + CommonMethods.EnsureComponent(DropDownContent.gameObject); + + + } + } + + protected abstract void SetText(string text); + + /// + /// shows the drop down + /// + void Show() + { + var canvas = DropDownContent.GetComponent(); + if (canvas == null) + return; + DropDownContent.gameObject.SetActive(true); + canvas.overrideSorting = true; + canvas.sortingOrder = 30000; + mBlocker = CreateBlocker(); + } + /// + /// returnes the selected date from the drop down , or null if non is selected + /// + /// + public System.DateTime? GetSelectedDate() + { + if (DropDownContent == null) + return null; + if (DropDownContent.Content.Selection.Count != 1) + return null; + return DropDownContent.Content.Selection.GetItem(0); + } + //hides the drop down + void Hide() + { + DropDownContent.gameObject.SetActive(false); + CommonMethods.SafeDestroy(mBlocker); + } + /// + /// called when the date picker selection has changed + /// + void SelectionChanged() + { + var d = GetSelectedDate(); // get the selected date + string t = NoSelectionPrompt; + try + { + if (d.HasValue) + t = d.Value.ToString(labelDateFormat); // find the correct string to show for the selected date + } + catch(Exception) + { + Debug.LogWarning("the format specified for the drop down is not valid"); + } + SetText(t); // show the selected date + Hide(); + } + + protected virtual GameObject CreateBlocker() + { + var canvasItems = GetComponentsInParent(); + if (canvasItems.Length == 0) + return null; + + Canvas rootCanvas = canvasItems[0]; + GameObject gameObject = new GameObject("Blocker"); + RectTransform rectTransform = gameObject.AddComponent(); + rectTransform.SetParent(rootCanvas.transform, false); + rectTransform.anchorMin = (Vector2)Vector3.zero; + rectTransform.anchorMax = (Vector2)Vector3.one; + rectTransform.sizeDelta = Vector2.zero; + Canvas canvas = gameObject.AddComponent(); + canvas.overrideSorting = true; + Canvas component = DropDownContent.GetComponent(); + canvas.sortingLayerID = component.sortingLayerID; + canvas.sortingOrder = component.sortingOrder - 1; + gameObject.AddComponent(); + gameObject.AddComponent().color = Color.clear; + gameObject.AddComponent