├── Documentation ├── toc.yml ├── api │ ├── toc.yml.meta │ ├── com.chwar.xrui.yml.meta │ ├── com.chwar.xrui.XRUI.yml.meta │ ├── com.chwar.xrui.UIElements.yml.meta │ ├── com.chwar.xrui.XRUIPanel.yml.meta │ ├── com.chwar.xrui.XRUI.AlertType.yml.meta │ ├── com.chwar.xrui.XRUI.XRUIFormat.yml.meta │ ├── com.chwar.xrui.XRUIConfiguration.yml.meta │ ├── com.chwar.xrui.XRUIGridController.yml.meta │ ├── com.chwar.xrui.UIElements.XRUIAlert.yml.meta │ ├── com.chwar.xrui.UIElements.XRUICard.yml.meta │ ├── com.chwar.xrui.UIElements.XRUIElement.yml.meta │ ├── com.chwar.xrui.UIElements.XRUIList.yml.meta │ ├── com.chwar.xrui.UIElements.XRUIMenu.yml.meta │ ├── com.chwar.xrui.UIElements.XRUIModal.yml.meta │ ├── com.chwar.xrui.UIElements.XRUINavbar.yml.meta │ ├── com.chwar.xrui.UIElements.WorldUIParameters.yml.meta │ ├── com.chwar.xrui.XRUIGridController.XRUIGrid.yml.meta │ ├── com.chwar.xrui.XRUIWorldSpaceInteraction.yml.meta │ ├── com.chwar.xrui.UIElements.XRUIContextualMenu.yml.meta │ ├── toc.yml │ ├── com.chwar.xrui.yml │ ├── com.chwar.xrui.XRUI.XRUIFormat.yml │ ├── com.chwar.xrui.UIElements.yml │ ├── com.chwar.xrui.UIElements.XRUIFormatOverride.yml │ ├── com.chwar.xrui.XRUIGridController.XRUIGrid.yml │ ├── com.chwar.xrui.UIElements.XRUIAlert.AlertType.yml │ ├── com.chwar.xrui.XRUIGridController.yml │ └── com.chwar.xrui.XRUIPanel.yml ├── index.md.meta ├── toc.yml.meta ├── docfx.json.meta ├── filterConfig.yml.meta ├── api.meta ├── obj.meta ├── manual.meta ├── resources.meta ├── filterConfig.yml └── docfx.json ├── Resources ├── OpenSans-Light.ttf ├── Roboto-Regular.ttf ├── Templates.meta ├── OpenSans-Light.ttf.meta ├── Roboto-Regular.ttf.meta ├── Default2DPanelSettings.asset.meta ├── XRUIRoot.uxml ├── DefaultXRUI2DConfiguration.asset.meta ├── DefaultWorldUIPanelSettings.asset.meta ├── DefaultXRUIWorldUIConfiguration.asset.meta ├── DefaultMenuElement.uxml ├── DefaultNavBar.uss ├── DefaultList.uss ├── XRUIRoot.uxml.meta ├── DefaultAlert.uxml.meta ├── DefaultCard.uxml.meta ├── DefaultList.uxml.meta ├── DefaultMenu.uxml.meta ├── DefaultModal.uxml.meta ├── DefaultNavBar.uxml.meta ├── TestUIElement.uxml.meta ├── DefaultListElement.uxml.meta ├── DefaultMenuElement.uxml.meta ├── Templates │ ├── Button.uxml.meta │ ├── Separator.uxml.meta │ ├── TextFieldWithButton.uxml.meta │ ├── Separator.uxml │ ├── TextFieldWithButton.uxml │ └── Button.uxml ├── DefaultContextualMenu.uxml.meta ├── DefaultContextualMenuElement.uxml.meta ├── Buttons.uss.meta ├── XRUI.uss.meta ├── DefaultAlert.uss.meta ├── DefaultCard.uss.meta ├── DefaultList.uss.meta ├── DefaultMenu.uss.meta ├── DefaultModal.uss.meta ├── DefaultNavBar.uss.meta ├── Scrollbar.uss.meta ├── DefaultListElement.uss.meta ├── XRUIRuntimeTheme.tss.meta ├── DefaultContextualMenu.uss.meta ├── TestUIElement.uxml ├── DefaultAlert.uxml ├── XRUIRuntimeTheme.tss ├── DefaultContextualMenu.uxml ├── DefaultListElement.uss ├── DefaultListElement.uxml ├── DefaultContextualMenuElement.uxml ├── DefaultCard.uss ├── DefaultMenu.uxml ├── DefaultContextualMenu.uss ├── DefaultList.uxml ├── DefaultXRUI2DConfiguration.asset ├── Default2DPanelSettings.asset ├── DefaultWorldUIPanelSettings.asset ├── DefaultMenu.uss ├── Scrollbar.uss ├── DefaultXRUIWorldUIConfiguration.asset ├── XRUI.uss ├── DefaultCard.uxml ├── DefaultAlert.uss ├── DefaultNavBar.uxml ├── DefaultModal.uxml ├── Buttons.uss └── DefaultModal.uss ├── Scripts.meta ├── Resources.meta ├── AssemblyInfo.cs.meta ├── Scripts ├── Editor.meta ├── UIElements.meta ├── UIElements │ ├── XRUIAlert.cs.meta │ ├── XRUIList.cs.meta │ ├── XRUIMenu.cs.meta │ ├── XRUIModal.cs.meta │ ├── XRUINavbar.cs.meta │ ├── XRUIContextualMenu.cs.meta │ ├── XRUICard.cs.meta │ ├── XRUIElement.cs.meta │ ├── XRUINavbar.cs │ ├── XRUICard.cs │ ├── XRUIMenu.cs │ ├── XRUIAlert.cs │ ├── XRUIList.cs │ └── XRUIContextualMenu.cs ├── XRUIConfiguration.cs.meta ├── XRUIWorldSpaceInteraction.cs.meta ├── Editor │ ├── obj.meta │ ├── XRUIEditor.cs.meta │ └── XRUIEditor.cs ├── XRUI.cs.meta ├── XRUIPanel.cs.meta ├── XRUIGridController.cs.meta ├── XRUIConfiguration.cs ├── XRUIPanel.cs ├── XRUIWorldSpaceInteraction.cs └── XRUIGridController.cs ├── Tests ├── XRUITest.cs.meta ├── AlertTest.cs.meta ├── ContextualMenuTest.cs.meta ├── XRUIElementsTest.cs.meta ├── Tests.asmdef.meta ├── Editor.meta ├── Editor │ ├── Editor.asmdef.meta │ ├── XRUIEditorTest.cs.meta │ ├── Editor.asmdef │ └── XRUIEditorTest.cs ├── ModalTest.cs.meta ├── Tests.asmdef ├── XRUITest.cs ├── ContextualMenuTest.cs └── AlertTest.cs ├── Demo ├── MyModalContent.cs.meta ├── XRUIDemo.unity.meta ├── XRUIDemoWorldUIInteraction.unity.meta ├── XRUIDemo.cs.meta ├── MyModalContent.cs └── XRUIDemo.cs ├── AssemblyInfo.cs ├── LICENSE.md.meta ├── README.md.meta ├── package.json.meta ├── Demo.meta ├── Tests.meta ├── Documentation.meta ├── com.chwar.xrui.asmdef.meta ├── com.chwar.xrui.asmdef ├── package.json ├── LICENSE.md └── .gitignore /Documentation/toc.yml: -------------------------------------------------------------------------------- 1 | - name: Manual 2 | href: index.md 3 | - name: Scripting API 4 | href: api/ -------------------------------------------------------------------------------- /Resources/OpenSans-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chwar/XRUI/HEAD/Resources/OpenSans-Light.ttf -------------------------------------------------------------------------------- /Resources/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chwar/XRUI/HEAD/Resources/Roboto-Regular.ttf -------------------------------------------------------------------------------- /Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 07569d55d15544e9bef2f01a836f40c9 3 | timeCreated: 1626109112 -------------------------------------------------------------------------------- /Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8cd4ea369271419496fb5446f4d6d8cb 3 | timeCreated: 1626108973 -------------------------------------------------------------------------------- /AssemblyInfo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0adcb59eb97e49489335fed321d03683 3 | timeCreated: 1628161217 -------------------------------------------------------------------------------- /Scripts/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 05b0a940781b4a698f25b1be219c7b9e 3 | timeCreated: 1626109167 -------------------------------------------------------------------------------- /Tests/XRUITest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ad5c0b18aee041389a81cd374561b20a 3 | timeCreated: 1628185869 -------------------------------------------------------------------------------- /Demo/MyModalContent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9eed005f2fc846bb81a18a5c0a4c80a0 3 | timeCreated: 1636718933 -------------------------------------------------------------------------------- /Resources/Templates.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 245a988d38b34014b31a0eb964d243c2 3 | timeCreated: 1626108973 -------------------------------------------------------------------------------- /Scripts/UIElements.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d410e916e4b24264a12f4941bc0348b0 3 | timeCreated: 1626109112 -------------------------------------------------------------------------------- /Tests/AlertTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a71651293181456688ef86dd5fb945f9 3 | timeCreated: 1628169112 -------------------------------------------------------------------------------- /Tests/ContextualMenuTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 223416a5e21747d58fc0f1d515df6616 3 | timeCreated: 1638101585 -------------------------------------------------------------------------------- /Tests/XRUIElementsTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 857bbc7f088f4ee693e0a2aee6641df1 3 | timeCreated: 1628189652 -------------------------------------------------------------------------------- /Resources/OpenSans-Light.ttf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7e515e1e03e24d128c86808b3aae2940 3 | timeCreated: 1626109040 -------------------------------------------------------------------------------- /Resources/Roboto-Regular.ttf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 592d70d658374731aa954931937724e0 3 | timeCreated: 1626109040 -------------------------------------------------------------------------------- /Scripts/UIElements/XRUIAlert.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 69d10172c95c427994459d9000c3d860 3 | timeCreated: 1627386128 -------------------------------------------------------------------------------- /Scripts/UIElements/XRUIList.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 08a8319a5cb94f4fbe979445cffcd5ed 3 | timeCreated: 1625736899 -------------------------------------------------------------------------------- /Scripts/UIElements/XRUIMenu.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 69bb1c75fe7b421caf0e22acecfa117d 3 | timeCreated: 1625931471 -------------------------------------------------------------------------------- /Scripts/UIElements/XRUIModal.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fa72cd215f614d2c9a3c1bdfa43d8008 3 | timeCreated: 1626102765 -------------------------------------------------------------------------------- /Scripts/UIElements/XRUINavbar.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c43e2faa06c94cc282692fa4349938b8 3 | timeCreated: 1625758910 -------------------------------------------------------------------------------- /Scripts/XRUIConfiguration.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5c1bbb45cc4b43d99d98e95bf35482d3 3 | timeCreated: 1627380725 -------------------------------------------------------------------------------- /Scripts/XRUIWorldSpaceInteraction.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b98380d798704b88908acbd024d35b88 3 | timeCreated: 1631277430 -------------------------------------------------------------------------------- /Resources/Default2DPanelSettings.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1e56d56428c545e79309860adf7f0207 3 | timeCreated: 1626109040 -------------------------------------------------------------------------------- /Scripts/UIElements/XRUIContextualMenu.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4bc0d7f7f11541f0b4d219bea32ec830 3 | timeCreated: 1632429463 -------------------------------------------------------------------------------- /Resources/XRUIRoot.uxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | [assembly:InternalsVisibleTo("com.chwar.xrui.Tests")] 3 | [assembly:InternalsVisibleTo("com.chwar.xrui.Tests.Editor")] -------------------------------------------------------------------------------- /LICENSE.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 743f938378f2ef8e7850ff01fe7307f9 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d8c44286914dfb1749030899483a1578 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Demo/XRUIDemo.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 11630c93ba235dea4a580c62809ea938 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bab2535b780327c99a6c336dfb3fb122 3 | PackageManifestImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Demo.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6461b5e1053f8639abe84728dce7ab2c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Documentation/api/toc.yml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2712097188214af41a57588c6d33eb6c 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Documentation/index.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5b773ea69b73abe499a2facf8376e56e 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Documentation/toc.yml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ca19de5e697b2f54db2a6e69f64107ac 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Documentation/docfx.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 61528f6280c52a040a5255d3ca071f78 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Documentation/filterConfig.yml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1b9376cabc81c7e4db04969b726b4803 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Tests.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e0871429ef3ba0c7fb31921e29892c01 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Tests/Tests.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d0ff4009fb103e7878a9bb96fdbd68d4 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Documentation.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 607f71c464b2420d48cf1cdc76ec69a5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Tests/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a18cf1c42a7bd7f2abb7e6d251c06892 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /com.chwar.xrui.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 68658e158af212ab286d2d648e7cff9f 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Demo/XRUIDemoWorldUIInteraction.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 66122bd275e394d63814903c903c736e 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Documentation/api.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 220372fff22a4c746a098cb603b70f33 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Documentation/api/com.chwar.xrui.yml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 571397f05993caf4080a57502828d5ef 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Documentation/obj.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f5e273b93e35be74bba99b50696c7790 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Scripts/Editor/obj.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0357ad066902fcc44a163d72da1c3a93 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Tests/Editor/Editor.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 76780efe2dc0dc916bdca8df2c0dff0d 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Documentation/api/com.chwar.xrui.XRUI.yml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3d02f53dad9f2ae438d57410a0fa0501 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Documentation/manual.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5301089bcbdcf9e4b91a2a5425b81faf 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Documentation/resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fd63ec0dd7e77e54c934854102512ee2 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Documentation/api/com.chwar.xrui.UIElements.yml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 45479c6d7299f7845bf93db9d83fbed8 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Documentation/api/com.chwar.xrui.XRUIPanel.yml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 20c9a22a4f420b4489d49650d567672d 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Documentation/api/com.chwar.xrui.XRUI.AlertType.yml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f8e21c8ea25690d4e8d64ae38fdc91bf 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Documentation/api/com.chwar.xrui.XRUI.XRUIFormat.yml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e8e3ed6075415004ab180339b47d9ba3 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Documentation/api/com.chwar.xrui.XRUIConfiguration.yml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9eecbe0db981ce045a5c61f181198c22 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Documentation/api/com.chwar.xrui.XRUIGridController.yml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b3bdd7764f349fe41881ae84dfe6a8cd 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Documentation/api/com.chwar.xrui.UIElements.XRUIAlert.yml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fd0123c973e7b82468cf7ccd2445c96b 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Documentation/api/com.chwar.xrui.UIElements.XRUICard.yml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bf4109616a64d3b499431e49636d20ed 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Documentation/api/com.chwar.xrui.UIElements.XRUIElement.yml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 085b80210cf72ff449b193fa7a815025 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Documentation/api/com.chwar.xrui.UIElements.XRUIList.yml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eb949973a9cab4148902aeb22f2e7ae5 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Documentation/api/com.chwar.xrui.UIElements.XRUIMenu.yml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ebc1f26d51d9a9043ba7f2e7df3b227a 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Documentation/api/com.chwar.xrui.UIElements.XRUIModal.yml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 22bad7a07053fc142b1f02f37cff0d6d 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Documentation/api/com.chwar.xrui.UIElements.XRUINavbar.yml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 17146fda31d791644be56931c28fa393 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Documentation/api/com.chwar.xrui.UIElements.WorldUIParameters.yml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bdfece23d881edc4c9cbe378791f699e 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Documentation/api/com.chwar.xrui.XRUIGridController.XRUIGrid.yml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 730f85e701e50064ba006b5183cd79e4 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Documentation/api/com.chwar.xrui.XRUIWorldSpaceInteraction.yml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 97c55458040d8014aa6a6ab1fc585d2c 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Documentation/api/com.chwar.xrui.UIElements.XRUIContextualMenu.yml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 01b4dc7ae07e5fd448c2a42cf441e0c0 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Documentation/filterConfig.yml: -------------------------------------------------------------------------------- 1 | apiRules: 2 | - include: 3 | uidRegex: ^com.chwar.xrui 4 | type: Namespace 5 | - include: 6 | uidRegex: ^com.chwar.xrui.UIElements 7 | type: Namespace 8 | - exclude: 9 | uidRegex: .* 10 | type: Namespace -------------------------------------------------------------------------------- /Resources/DefaultXRUI2DConfiguration.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5c81f767ce39c4a1f81f4631ca30706a 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Resources/DefaultWorldUIPanelSettings.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 999da42db6bab400abfb9623cc778804 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Resources/DefaultXRUIWorldUIConfiguration.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0fdf877da6f7498e6b0038e4a8f94ceb 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Resources/DefaultMenuElement.uxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Demo/XRUIDemo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f05b5295af4a9883786f2cb1a5d4e785 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/XRUI.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b7a8f2f1abdbf906cae39f9df48a0b7a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Tests/ModalTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 402d735fd45ad15e29530ce2119b7604 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/XRUIPanel.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e6964f1d81fc14445998291883d62da6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/Editor/XRUIEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e386347a4aeadef66829c2366fbb6140 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/XRUIGridController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fbdd4704364f41b38ae1353ac468441b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Resources/DefaultNavBar.uss: -------------------------------------------------------------------------------- 1 | .xrui-navbar { 2 | background-color: var(--xrui-dark); 3 | } 4 | 5 | .xrui-navbar.twodimensional.landscape .xrui-navbar.twodimensional.portrait{ 6 | width: 100%; 7 | height: 50px; 8 | } 9 | 10 | .xrui-navbar.threedimensional { 11 | width: 300px; 12 | height: 50px; 13 | } 14 | -------------------------------------------------------------------------------- /Scripts/UIElements/XRUICard.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d1b638efb99a37e179a19c2d5eb8477e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Scripts/UIElements/XRUIElement.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1fb921de3998d3aac87566fd65e6e65f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Tests/Editor/XRUIEditorTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5def253d1c88e44c5be384a559043676 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Resources/DefaultList.uss: -------------------------------------------------------------------------------- 1 | .xrui-list.twodimensional.landscape, .xrui-list.twodimensional.portrait { 2 | width: 300px; 3 | flex-grow: 1; 4 | } 5 | 6 | .xrui-list.threedimensional { 7 | width: 300px; 8 | height: 500px; 9 | } 10 | 11 | .xrui-list__container { 12 | width: 100%; 13 | height: auto; 14 | max-height: 85%; 15 | } -------------------------------------------------------------------------------- /Resources/XRUIRoot.uxml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 723a2d4fe6e258f24b688733d5ea2a4a 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0} 11 | -------------------------------------------------------------------------------- /Resources/DefaultAlert.uxml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cc67f1ff5ea71055c83c51dca6a00f07 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0} 11 | -------------------------------------------------------------------------------- /Resources/DefaultCard.uxml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b98a165502e4faaffb5e5ce2b8e00adb 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0} 11 | -------------------------------------------------------------------------------- /Resources/DefaultList.uxml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 382f13292466f923db35d9729fd23878 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0} 11 | -------------------------------------------------------------------------------- /Resources/DefaultMenu.uxml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 67c1c9d1ba298f6d891001f97ed79e76 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0} 11 | -------------------------------------------------------------------------------- /Resources/DefaultModal.uxml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 62037ff7f3841c25283f18f1bb6f3861 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0} 11 | -------------------------------------------------------------------------------- /Resources/DefaultNavBar.uxml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d07d4a5f4eaff12aeb3dded84e7cb019 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0} 11 | -------------------------------------------------------------------------------- /Resources/TestUIElement.uxml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bf5f9b83d6b7318b28f4ae472bd42617 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0} 11 | -------------------------------------------------------------------------------- /Resources/DefaultListElement.uxml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d23a0e1836e6e918bafffe0b1eb757e8 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0} 11 | -------------------------------------------------------------------------------- /Resources/DefaultMenuElement.uxml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2dadee764299b942281a055856ce0fda 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0} 11 | -------------------------------------------------------------------------------- /Resources/Templates/Button.uxml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f18c2f2b59b907659996344dcdf137d7 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0} 11 | -------------------------------------------------------------------------------- /Resources/Templates/Separator.uxml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 36fcc5ece828d2d7da84ae9e0d8de693 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0} 11 | -------------------------------------------------------------------------------- /Resources/DefaultContextualMenu.uxml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6dba8ade0d049ed0c99ad1b4b9cdb80e 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0} 11 | -------------------------------------------------------------------------------- /Resources/DefaultContextualMenuElement.uxml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9142b8b7e41b488c68762c4e5591f2c7 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0} 11 | -------------------------------------------------------------------------------- /Resources/Templates/TextFieldWithButton.uxml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1c843e8c6a81b4491b0e509f18efaf76 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0} 11 | -------------------------------------------------------------------------------- /Resources/Buttons.uss.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b202e3a27f13af06db0ffcb825af94ea 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} 11 | disableValidation: 0 12 | -------------------------------------------------------------------------------- /Resources/XRUI.uss.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e0642dbf8a0a2c835b54e88a42e27b5a 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} 11 | disableValidation: 0 12 | -------------------------------------------------------------------------------- /Resources/DefaultAlert.uss.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1ae2d2504906b91ce8252b45d049ba16 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} 11 | disableValidation: 0 12 | -------------------------------------------------------------------------------- /Resources/DefaultCard.uss.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8d5e237fe0e9974d086d8a5f5647dc0c 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} 11 | disableValidation: 0 12 | -------------------------------------------------------------------------------- /Resources/DefaultList.uss.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0e4b8f43f1e9cdce6a5c0b8233f6d01d 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} 11 | disableValidation: 0 12 | -------------------------------------------------------------------------------- /Resources/DefaultMenu.uss.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 735b8a87166d2feeea39426705f4f012 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} 11 | disableValidation: 0 12 | -------------------------------------------------------------------------------- /Resources/DefaultModal.uss.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7599ee0eb4369f9db8b1de476403a797 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} 11 | disableValidation: 0 12 | -------------------------------------------------------------------------------- /Resources/DefaultNavBar.uss.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f498e54c8ba330f84b05c096c12b0e42 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} 11 | disableValidation: 0 12 | -------------------------------------------------------------------------------- /Resources/Scrollbar.uss.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2341f254b5007435e822807bb06779a1 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} 11 | disableValidation: 0 12 | -------------------------------------------------------------------------------- /Resources/DefaultListElement.uss.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2179f2756108bc3ef9e2f97f34676617 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} 11 | disableValidation: 0 12 | -------------------------------------------------------------------------------- /Resources/XRUIRuntimeTheme.tss.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 152df19c55f620451be410c016ce2ea4 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 12388, guid: 0000000000000000e000000000000000, type: 0} 11 | disableValidation: 0 12 | -------------------------------------------------------------------------------- /Resources/DefaultContextualMenu.uss.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 39585f1f8a2525a1188fa18ba3186ce7 3 | ScriptedImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 2 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} 11 | disableValidation: 0 12 | -------------------------------------------------------------------------------- /Resources/TestUIElement.uxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /com.chwar.xrui.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.chwar.xrui", 3 | "rootNamespace": "com.chwar.xrui", 4 | "references": [ 5 | "Unity.XR.Interaction.Toolkit" 6 | ], 7 | "includePlatforms": [], 8 | "excludePlatforms": [], 9 | "allowUnsafeCode": true, 10 | "overrideReferences": false, 11 | "precompiledReferences": [], 12 | "autoReferenced": true, 13 | "defineConstraints": [], 14 | "versionDefines": [], 15 | "noEngineReferences": false 16 | } -------------------------------------------------------------------------------- /Resources/DefaultAlert.uxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Resources/XRUIRuntimeTheme.tss: -------------------------------------------------------------------------------- 1 | @import url("unity-theme://default"); 2 | 3 | @import url("XRUI.uss"); 4 | @import url("DefaultAlert.uss"); 5 | @import url("DefaultCard.uss"); 6 | @import url("DefaultList.uss"); 7 | @import url("DefaultMenu.uss"); 8 | @import url("DefaultContextualMenu.uss"); 9 | @import url("DefaultModal.uss"); 10 | @import url("DefaultNavBar.uss"); 11 | @import url("DefaultListElement.uss"); 12 | @import url("Buttons.uss"); 13 | @import url("Scrollbar.uss"); 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Resources/DefaultContextualMenu.uxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Tests/Tests.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.chwar.xrui.Tests", 3 | "rootNamespace": "com.chwar.xrui", 4 | "references": [ 5 | "com.chwar.xrui", 6 | "UnityEngine.TestRunner", 7 | "UnityEditor.TestRunner" 8 | ], 9 | "includePlatforms": [], 10 | "excludePlatforms": [], 11 | "allowUnsafeCode": false, 12 | "overrideReferences": true, 13 | "precompiledReferences": [ 14 | "nunit.framework.dll" 15 | ], 16 | "autoReferenced": false, 17 | "defineConstraints": [ 18 | "UNITY_INCLUDE_TESTS" 19 | ], 20 | "versionDefines": [], 21 | "noEngineReferences": false 22 | } -------------------------------------------------------------------------------- /Tests/Editor/Editor.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.chwar.xrui.Tests.Editor", 3 | "rootNamespace": "com.chwar.xrui", 4 | "references": [ 5 | "com.chwar.xrui", 6 | "UnityEngine.TestRunner", 7 | "UnityEditor.TestRunner" 8 | ], 9 | "includePlatforms": [ 10 | "Editor" 11 | ], 12 | "excludePlatforms": [], 13 | "allowUnsafeCode": false, 14 | "overrideReferences": true, 15 | "precompiledReferences": [ 16 | "nunit.framework.dll" 17 | ], 18 | "autoReferenced": false, 19 | "defineConstraints": [ 20 | "UNITY_INCLUDE_TESTS" 21 | ], 22 | "versionDefines": [], 23 | "noEngineReferences": false 24 | } -------------------------------------------------------------------------------- /Resources/DefaultListElement.uss: -------------------------------------------------------------------------------- 1 | .xrui-list-item--selected { 2 | background-color: var(--xrui-primary); 3 | } 4 | 5 | .xrui-list-item > .xrui-list-item__icon { 6 | display: none; 7 | } 8 | 9 | .xrui-list-item--default > .xrui-list-item__icon { 10 | display: flex; 11 | -unity-background-image-tint-color: rgb(0, 0, 0); 12 | } 13 | 14 | .xrui-list-item--selected > .xrui-list-item__text { 15 | font-size: 18px; 16 | color: rgb(255, 255, 255); 17 | -unity-font-style: bold; 18 | } 19 | 20 | .xrui-list-item--selected .unity-text-element { 21 | color: rgb(255, 255, 255); 22 | } 23 | 24 | .xrui-list-item--selected.xrui-list-item--default > .xrui-list-item__icon { 25 | -unity-background-image-tint-color: rgb(255, 255, 255); 26 | } 27 | -------------------------------------------------------------------------------- /Resources/Templates/Separator.uxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Resources/Templates/TextFieldWithButton.uxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Resources/DefaultListElement.uxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Resources/DefaultContextualMenuElement.uxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.chwar.xrui", 3 | "version": "1.0.2-pre", 4 | "displayName": "XRUI Framework", 5 | "description": "XRUI is a responsive UI framework for making cross-platform XR applications with the Unity 3D editor. Its purpose is to assist users in creating efficient and adaptive UIs that can adjust depending on the deployed platform, supporting 2D rendering in Landscape and Portrait modes as well as World Space rendering for XR.", 6 | "unity": "2021.2", 7 | "keywords": [ 8 | "UI", 9 | "XR" 10 | ], 11 | "author": { 12 | "name": "Chris Warin", 13 | "email": "chris.warin@uni-goettingen.de" 14 | }, 15 | "repository": { 16 | "url": "https://github.com/chwar/XRUI.git", 17 | "type": "git" 18 | }, 19 | "documentationUrl": "https://chwar.github.io/xrui", 20 | "changelogUrl": "https://github.com/chwar/xrui/releases/latest", 21 | "type": "tool", 22 | "dependencies": { 23 | "com.unity.xr.interaction.toolkit": "2.2.0" 24 | } 25 | } -------------------------------------------------------------------------------- /Resources/DefaultCard.uss: -------------------------------------------------------------------------------- 1 | .xrui-card.twodimensional.landscape { 2 | position: absolute; 3 | right: 20px; 4 | top: 20px; 5 | min-width: 25%; 6 | height: 50%; 7 | margin: 0; 8 | padding-right: 0; 9 | padding-top: 0; 10 | } 11 | 12 | .xrui-card.twodimensional.portrait { 13 | position: absolute; 14 | bottom: 0; 15 | left: 0; 16 | right: 0; 17 | height: 40%; 18 | align-items: stretch; 19 | flex-shrink: 0; 20 | } 21 | 22 | .xrui-card.threedimensional { 23 | height: 500px; 24 | width: 400px; 25 | } 26 | 27 | .xrui-card__header { 28 | background-color: var(--xrui-primary); 29 | max-height: 100px; 30 | border-top-left-radius: 5px; 31 | border-top-right-radius: 5px; 32 | padding: 10px; 33 | width: 100%; 34 | min-height: 20%; 35 | flex-shrink: 0; 36 | } 37 | 38 | .xrui-card__container { 39 | width: 100%; 40 | height: 90%; 41 | border-bottom-left-radius: 5px; 42 | border-bottom-right-radius: 5px; 43 | } 44 | -------------------------------------------------------------------------------- /Resources/DefaultMenu.uxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Resources/DefaultContextualMenu.uss: -------------------------------------------------------------------------------- 1 | .xrui-contextual-menu, .xrui-contextual-menu__container { 2 | border-top-left-radius: 5px; 3 | border-bottom-left-radius: 5px; 4 | border-top-right-radius: 5px; 5 | border-bottom-right-radius: 5px; 6 | background-color: rgb(255, 255, 255); 7 | } 8 | 9 | .xrui-contextual-menu__container { 10 | overflow: hidden; 11 | flex: 0 0; 12 | flex-basis: 102%; 13 | width: 100%; 14 | height: 100%; 15 | } 16 | 17 | .xrui-contextual-menu.threedimensional { 18 | position: relative; 19 | width: 200px; 20 | height: auto; 21 | } 22 | 23 | .xrui-contextual-menu__arrow { 24 | background-color: rgb(255, 255, 255); 25 | transform-origin: center; 26 | translate: -5px -33px; 27 | rotate: 45deg; 28 | } 29 | 30 | .xrui-contextual-menu__item:hover { 31 | background-color: var(--xrui-primary); 32 | } 33 | 34 | .xrui-contextual-menu__item:hover > .unity-label { 35 | color: rgba(255, 255, 255, 255); 36 | } 37 | 38 | .xrui-contextual-menu__item:hover > .xrui-icon { 39 | -unity-background-image-tint-color: rgba(255, 255, 255, 255); 40 | } 41 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 chwar 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Resources/DefaultList.uxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Scripts/UIElements/XRUINavbar.cs: -------------------------------------------------------------------------------- 1 | // MIT License 2 | // Copyright (c) 2021 Chris Warin 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 5 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 6 | namespace com.chwar.xrui.UIElements 7 | { 8 | /// 9 | /// XRUI Navbar class. 10 | /// 11 | public class XRUINavbar : XRUIElement 12 | { 13 | 14 | } 15 | } -------------------------------------------------------------------------------- /Resources/DefaultXRUI2DConfiguration.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 5c1bbb45cc4b43d99d98e95bf35482d3, type: 3} 13 | m_Name: DefaultXRUI2DConfiguration 14 | m_EditorClassIdentifier: 15 | panelSettings: {fileID: 11400000, guid: 1e56d56428c545e79309860adf7f0207, type: 2} 16 | defaultModalTemplate: {fileID: 9197481963319205126, guid: 62037ff7f3841c25283f18f1bb6f3861, type: 3} 17 | defaultAlertTemplate: {fileID: 9197481963319205126, guid: cc67f1ff5ea71055c83c51dca6a00f07, type: 3} 18 | defaultCardTemplate: {fileID: 9197481963319205126, guid: b98a165502e4faaffb5e5ce2b8e00adb, type: 3} 19 | defaultListTemplate: {fileID: 9197481963319205126, guid: 382f13292466f923db35d9729fd23878, type: 3} 20 | defaultMenuTemplate: {fileID: 9197481963319205126, guid: 67c1c9d1ba298f6d891001f97ed79e76, type: 3} 21 | defaultNavbarTemplate: {fileID: 9197481963319205126, guid: d07d4a5f4eaff12aeb3dded84e7cb019, type: 3} 22 | defaultContextualMenuTemplate: {fileID: 9197481963319205126, guid: 6dba8ade0d049ed0c99ad1b4b9cdb80e, type: 3} 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | /[Mm]emoryCaptures/ 12 | /[Dd]ocumentation/obj/ 13 | /[Ss]cripts/Editor/obj/ 14 | 15 | # Asset meta data should only be ignored when the corresponding asset is also ignored 16 | !/[Aa]ssets/**/*.meta 17 | 18 | # Uncomment this line if you wish to ignore the asset store tools plugin 19 | # /[Aa]ssets/AssetStoreTools* 20 | 21 | # Autogenerated Jetbrains Rider plugin 22 | [Aa]ssets/Plugins/Editor/JetBrains* 23 | 24 | # Visual Studio cache directory 25 | .vs/ 26 | .idea/ 27 | 28 | # Gradle cache directory 29 | .gradle/ 30 | 31 | # Autogenerated VS/MD/Consulo solution and project files 32 | ExportedObj/ 33 | .consulo/ 34 | *.csproj 35 | *.unityproj 36 | *.sln 37 | *.suo 38 | *.tmp 39 | *.user 40 | *.userprefs 41 | *.pidb 42 | *.booproj 43 | *.svd 44 | *.pdb 45 | *.mdb 46 | *.opendb 47 | *.VC.db 48 | 49 | # Unity3D generated meta files 50 | *.pidb.meta 51 | *.pdb.meta 52 | *.mdb.meta 53 | 54 | # Unity3D generated file on crash reports 55 | sysinfo.txt 56 | 57 | # Builds 58 | *.apk 59 | *.unitypackage 60 | 61 | # Crashlytics generated file 62 | crashlytics-build.properties 63 | -------------------------------------------------------------------------------- /Resources/Default2DPanelSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 19101, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: Default2DPanelSettings 14 | m_EditorClassIdentifier: 15 | themeUss: {fileID: -4733365628477956816, guid: 152df19c55f620451be410c016ce2ea4, type: 3} 16 | m_TargetTexture: {fileID: 0} 17 | m_ScaleMode: 0 18 | m_Scale: 2 19 | m_ReferenceDpi: 192 20 | m_FallbackDpi: 192 21 | m_ReferenceResolution: {x: 1832, y: 1920} 22 | m_ScreenMatchMode: 1 23 | m_Match: 0 24 | m_SortingOrder: 1 25 | m_TargetDisplay: 0 26 | m_ClearDepthStencil: 1 27 | m_ClearColor: 0 28 | m_ColorClearValue: {r: 0, g: 0, b: 0, a: 0} 29 | m_DynamicAtlasSettings: 30 | m_MinAtlasSize: 2048 31 | m_MaxAtlasSize: 4096 32 | m_MaxSubTextureSize: 128 33 | m_ActiveFilters: 31 34 | m_AtlasBlitShader: {fileID: 9101, guid: 0000000000000000f000000000000000, type: 0} 35 | m_RuntimeShader: {fileID: 9100, guid: 0000000000000000f000000000000000, type: 0} 36 | m_RuntimeWorldShader: {fileID: 9102, guid: 0000000000000000f000000000000000, type: 0} 37 | textSettings: {fileID: 0} 38 | -------------------------------------------------------------------------------- /Resources/DefaultWorldUIPanelSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 19101, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: DefaultWorldUIPanelSettings 14 | m_EditorClassIdentifier: 15 | themeUss: {fileID: -4733365628477956816, guid: 152df19c55f620451be410c016ce2ea4, type: 3} 16 | m_TargetTexture: {fileID: 0} 17 | m_ScaleMode: 0 18 | m_Scale: 1 19 | m_ReferenceDpi: 192 20 | m_FallbackDpi: 192 21 | m_ReferenceResolution: {x: 1832, y: 1920} 22 | m_ScreenMatchMode: 2 23 | m_Match: 0 24 | m_SortingOrder: 1 25 | m_TargetDisplay: 0 26 | m_ClearDepthStencil: 1 27 | m_ClearColor: 0 28 | m_ColorClearValue: {r: 0, g: 0, b: 0, a: 0} 29 | m_DynamicAtlasSettings: 30 | m_MinAtlasSize: 2048 31 | m_MaxAtlasSize: 4096 32 | m_MaxSubTextureSize: 128 33 | m_ActiveFilters: 31 34 | m_AtlasBlitShader: {fileID: 9101, guid: 0000000000000000f000000000000000, type: 0} 35 | m_RuntimeShader: {fileID: 9100, guid: 0000000000000000f000000000000000, type: 0} 36 | m_RuntimeWorldShader: {fileID: 9102, guid: 0000000000000000f000000000000000, type: 0} 37 | textSettings: {fileID: 0} 38 | -------------------------------------------------------------------------------- /Resources/DefaultMenu.uss: -------------------------------------------------------------------------------- 1 | .xrui-menu.twodimensional.portrait { 2 | width: 100%; 3 | height: 100%; 4 | } 5 | 6 | .xrui-menu.twodimensional.landscape { 7 | width: 40%; 8 | height: 100%; 9 | } 10 | 11 | .xrui-menu.threedimensional { 12 | width: 500px; 13 | height: 500px; 14 | } 15 | 16 | .xrui-menu { 17 | background-color: var(--xrui-dark); 18 | padding: 20px; 19 | } 20 | 21 | .xrui-menu__container { 22 | margin-bottom: 10px; 23 | flex: 1 1; 24 | width: 100%; 25 | } 26 | 27 | .xrui-menu__btn-container { 28 | flex: 0 0; 29 | min-height: 75px; 30 | align-items: flex-end; 31 | } 32 | 33 | .xrui-menu__title { 34 | height: auto; 35 | margin: 0; 36 | padding: 0; 37 | font-size: 48px; 38 | color: white; 39 | } 40 | 41 | .xrui-menu__subtitle { 42 | margin: 0; 43 | margin-bottom: 20px; 44 | padding: 0; 45 | font-size: 24px; 46 | color: white; 47 | white-space: normal; 48 | } 49 | 50 | .xrui-menu__close-btn { 51 | position: absolute; 52 | right: 20px; 53 | top: 20px; 54 | width: 30px; 55 | height: 30px; 56 | margin: 0; 57 | padding: 0; 58 | } 59 | 60 | .xrui Button.xrui-menu__main-btn { 61 | flex: 1 1; 62 | margin: 0; 63 | padding: 0; 64 | height: 75px; 65 | width: 75px; 66 | border-radius: 50%; 67 | border-width: 0; 68 | -unity-text-align: lower-center; 69 | font-size: 70px; 70 | } 71 | -------------------------------------------------------------------------------- /Documentation/api/toc.yml: -------------------------------------------------------------------------------- 1 | ### YamlMime:TableOfContent 2 | - uid: com.chwar.xrui 3 | name: com.chwar.xrui 4 | items: 5 | - uid: com.chwar.xrui.XRUI 6 | name: XRUI 7 | - uid: com.chwar.xrui.XRUI.XRUIFormat 8 | name: XRUI.XRUIFormat 9 | - uid: com.chwar.xrui.XRUIConfiguration 10 | name: XRUIConfiguration 11 | - uid: com.chwar.xrui.XRUIGridController 12 | name: XRUIGridController 13 | - uid: com.chwar.xrui.XRUIGridController.XRUIGrid 14 | name: XRUIGridController.XRUIGrid 15 | - uid: com.chwar.xrui.XRUIPanel 16 | name: XRUIPanel 17 | - uid: com.chwar.xrui.XRUIWorldSpaceInteraction 18 | name: XRUIWorldSpaceInteraction 19 | - uid: com.chwar.xrui.UIElements 20 | name: com.chwar.xrui.UIElements 21 | items: 22 | - uid: com.chwar.xrui.UIElements.WorldUIParameters 23 | name: WorldUIParameters 24 | - uid: com.chwar.xrui.UIElements.XRUIAlert 25 | name: XRUIAlert 26 | - uid: com.chwar.xrui.UIElements.XRUIAlert.AlertType 27 | name: XRUIAlert.AlertType 28 | - uid: com.chwar.xrui.UIElements.XRUICard 29 | name: XRUICard 30 | - uid: com.chwar.xrui.UIElements.XRUIContextualMenu 31 | name: XRUIContextualMenu 32 | - uid: com.chwar.xrui.UIElements.XRUIElement 33 | name: XRUIElement 34 | - uid: com.chwar.xrui.UIElements.XRUIFormatOverride 35 | name: XRUIFormatOverride 36 | - uid: com.chwar.xrui.UIElements.XRUIList 37 | name: XRUIList 38 | - uid: com.chwar.xrui.UIElements.XRUIMenu 39 | name: XRUIMenu 40 | - uid: com.chwar.xrui.UIElements.XRUIModal 41 | name: XRUIModal 42 | - uid: com.chwar.xrui.UIElements.XRUINavbar 43 | name: XRUINavbar 44 | -------------------------------------------------------------------------------- /Resources/Templates/Button.uxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Demo/MyModalContent.cs: -------------------------------------------------------------------------------- 1 | // MIT License 2 | // Copyright (c) 2021 Chris Warin 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 5 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 6 | using com.chwar.xrui.UIElements; 7 | using UnityEngine; 8 | using UnityEngine.UIElements; 9 | 10 | namespace com.chwar.xrui 11 | { 12 | public class MyModalContent : MonoBehaviour 13 | { 14 | private XRUIModal _xruiModal; 15 | 16 | void Start() 17 | { 18 | _xruiModal = GetComponent(); 19 | StartPage(); 20 | } 21 | 22 | private void StartPage() 23 | { 24 | _xruiModal.UpdateModalFlow("TestUIElement", "xrui-modal__container", () => 25 | { 26 | _xruiModal.SetCancelButtonAction(() => Destroy(_xruiModal.gameObject)); 27 | _xruiModal.SetValidateButtonAction(Validate); 28 | }); 29 | } 30 | 31 | private void Validate() 32 | { 33 | var field = _xruiModal.RootElement.Q(null, "unity-text-field"); 34 | _xruiModal.SetFieldError(field); 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /Resources/Scrollbar.uss: -------------------------------------------------------------------------------- 1 | .xrui .unity-scroller--vertical { 2 | align-items: center; 3 | opacity: 0.61; 4 | border-left-width: 0; 5 | border-right-width: 0; 6 | border-top-width: 0; 7 | border-bottom-width: 0; 8 | background-color: rgba(0, 0, 0, 0); 9 | width: 8px; 10 | } 11 | 12 | .xrui .unity-scroll-view__vertical-scroller > .unity-repeat-button { 13 | display: none; 14 | } 15 | 16 | .xrui #unity-drag-container { 17 | min-width: 8px; 18 | width: 100%; 19 | } 20 | 21 | .xrui #unity-dragger:hover { 22 | background-color: rgb(0, 0, 0); 23 | } 24 | 25 | .xrui #unity-tracker { 26 | background-color: rgb(142, 142, 142); 27 | border-left-width: 0; 28 | border-right-width: 0; 29 | border-top-width: 0; 30 | border-bottom-width: 0; 31 | border-top-left-radius: 5px; 32 | border-bottom-left-radius: 5px; 33 | border-top-right-radius: 5px; 34 | border-bottom-right-radius: 5px; 35 | margin-left: 0; 36 | margin-right: 0; 37 | margin-top: 0; 38 | margin-bottom: 0; 39 | width: 100%; 40 | padding-left: 0; 41 | padding-right: 0; 42 | padding-top: 0; 43 | padding-bottom: 0; 44 | position: absolute; 45 | left: 0; 46 | } 47 | 48 | .xrui #unity-dragger { 49 | background-color: rgb(24, 24, 24); 50 | border-top-left-radius: 5px; 51 | border-bottom-left-radius: 5px; 52 | border-top-right-radius: 5px; 53 | border-bottom-right-radius: 5px; 54 | width: 100%; 55 | margin-left: 0; 56 | margin-right: 0; 57 | margin-top: 0; 58 | margin-bottom: 0; 59 | padding-left: 0; 60 | padding-right: 0; 61 | padding-top: 0; 62 | padding-bottom: 0; 63 | border-left-width: 0; 64 | border-right-width: 0; 65 | border-top-width: 0; 66 | border-bottom-width: 0; 67 | position: absolute; 68 | left: 0; 69 | } 70 | 71 | .xrui #unity-slider { 72 | margin-left: 0; 73 | margin-right: 0; 74 | margin-top: 5px; 75 | margin-bottom: 5px; 76 | align-items: center; 77 | min-width: 5px; 78 | width: 100%; 79 | } 80 | -------------------------------------------------------------------------------- /Resources/DefaultXRUIWorldUIConfiguration.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 5c1bbb45cc4b43d99d98e95bf35482d3, type: 3} 13 | m_Name: DefaultXRUIWorldUIConfiguration 14 | m_EditorClassIdentifier: 15 | panelSettings: {fileID: 11400000, guid: 999da42db6bab400abfb9623cc778804, type: 2} 16 | defaultModalTemplate: {fileID: 9197481963319205126, guid: 62037ff7f3841c25283f18f1bb6f3861, type: 3} 17 | defaultAlertTemplate: {fileID: 9197481963319205126, guid: cc67f1ff5ea71055c83c51dca6a00f07, type: 3} 18 | defaultCardTemplate: {fileID: 9197481963319205126, guid: b98a165502e4faaffb5e5ce2b8e00adb, type: 3} 19 | defaultListTemplate: {fileID: 9197481963319205126, guid: 382f13292466f923db35d9729fd23878, type: 3} 20 | defaultMenuTemplate: {fileID: 9197481963319205126, guid: 67c1c9d1ba298f6d891001f97ed79e76, type: 3} 21 | defaultNavbarTemplate: {fileID: 9197481963319205126, guid: d07d4a5f4eaff12aeb3dded84e7cb019, type: 3} 22 | defaultContextualMenuTemplate: {fileID: 9197481963319205126, guid: 6dba8ade0d049ed0c99ad1b4b9cdb80e, type: 3} 23 | defaultAlertWorldUIParameters: 24 | bendPanel: 0 25 | anchorPanelToCamera: 1 26 | cameraFollowThreshold: 0.2 27 | customPanelDimensions: {x: 0, y: 0} 28 | customPanelPosition: {x: 0, y: 0, z: 0} 29 | panelScale: 0.5 30 | defaultContextualMenuWorldUIParameters: 31 | bendPanel: 0 32 | anchorPanelToCamera: 1 33 | cameraFollowThreshold: 0.2 34 | customPanelDimensions: {x: 0, y: 0} 35 | customPanelPosition: {x: 0, y: 0, z: 0} 36 | panelScale: 0.5 37 | defaultModalWorldUIParameters: 38 | bendPanel: 1 39 | anchorPanelToCamera: 1 40 | cameraFollowThreshold: 0.2 41 | customPanelDimensions: {x: 0, y: 0} 42 | customPanelPosition: {x: 0, y: 0, z: 0} 43 | panelScale: 1 44 | -------------------------------------------------------------------------------- /Documentation/docfx.json: -------------------------------------------------------------------------------- 1 | { 2 | "metadata": [ 3 | { 4 | "src": [ 5 | { 6 | "src": "..", 7 | "files": [ 8 | "Scripts/**/*.cs" 9 | ] 10 | } 11 | ], 12 | "globalNamespaceId": "Global", 13 | "filter": "filterConfig.yml", 14 | "dest": "api" 15 | } 16 | ], 17 | "build": { 18 | "globalMetadata": { 19 | "_appTitle": "XRUI Framework", 20 | "_appFooter": "XRUI Framework", 21 | "_enableSearch": true 22 | }, 23 | "content": [ 24 | { 25 | "files": [ 26 | "toc.yml", 27 | "index.md" 28 | ] 29 | }, 30 | { 31 | "src": "api", 32 | "files": [ 33 | "*.yml" 34 | ], 35 | "dest": "api" 36 | }, 37 | { 38 | "src": "manual", 39 | "files": [ 40 | "toc.yml", 41 | "*.md" 42 | ], 43 | "dest": "manual" 44 | } 45 | ], 46 | "overwrite": [ 47 | { 48 | "src": "..", 49 | "files": [ 50 | "Scripts/**/*.md" 51 | ] 52 | } 53 | ], 54 | "resource": [ 55 | { 56 | "files": [ 57 | "resources/**/*" 58 | ] 59 | } 60 | ], 61 | "sitemap": { 62 | "baseUrl": "https://chwar.github.io/xrui", 63 | "changefreq": "weekly", 64 | "fileOptions": { 65 | "api/*": { 66 | "changefreq": "daily" 67 | } 68 | } 69 | }, 70 | "xref": [ 71 | "https://normanderwan.github.io/UnityXrefMaps/xrefmap.yml" 72 | ], 73 | "xrefService": [ 74 | "https://xref.docs.microsoft.com/query?uid={uid}" 75 | ], 76 | "dest": "../xrui" 77 | } 78 | } -------------------------------------------------------------------------------- /Resources/XRUI.uss: -------------------------------------------------------------------------------- 1 | :root { 2 | --xrui-primary: rgb(13, 110, 253); 3 | --xrui-primary-hover: rgb(10, 87, 191); 4 | --xrui-secondary: rgb(108, 117, 125); 5 | --xrui-secondary-hover: rgb(76, 83, 88); 6 | --xrui-success: rgb(20, 167, 68); 7 | --xrui-success-hover: rgb(25, 135, 84); 8 | --xrui-warning: rgb(255, 193, 7); 9 | --xrui-warning-hover: rgb(255, 222, 7); 10 | --xrui-danger: rgb(220, 53, 69); 11 | --xrui-danger-hover: rgb(250, 0, 0); 12 | --xrui-info: rgb(13, 202, 240); 13 | --xrui-info-hover: rgb(9, 147, 173); 14 | --xrui-light-grey: rgb(233, 236, 239); 15 | --xrui-grey: rgb(173, 181, 189); 16 | --xrui-dark-grey: rgb(73, 80, 87); 17 | --xrui-dark: rgb(33, 37, 41); 18 | } 19 | 20 | .xrui .xrui-background--primary { 21 | background-color: var(--xrui-primary); 22 | } 23 | 24 | .xrui .xrui-background--secondary { 25 | background-color: var(--xrui-secondary); 26 | } 27 | 28 | .xrui .xrui-background--warning { 29 | background-color: var(--xrui-warning); 30 | } 31 | 32 | .xrui .xrui-background--success { 33 | background-color: var(--xrui-success); 34 | } 35 | 36 | .xrui .xrui-background--danger { 37 | background-color: var(--xrui-danger); 38 | } 39 | 40 | .xrui .xrui-background--info { 41 | background-color: var(--xrui-info); 42 | } 43 | 44 | .xrui .xrui-background--light-grey { 45 | background-color: var(--xrui-light-grey); 46 | } 47 | 48 | .xrui .xrui-background--primary:hover, .xrui-alert.primary:hover { 49 | background-color: var(--xrui-primary-hover); 50 | } 51 | 52 | .xrui .xrui-background--secondary:hover, .xrui-alert.secondary:hover { 53 | background-color: var(--xrui-secondary-hover); 54 | } 55 | 56 | .xrui .xrui-background--warning:hover, .xrui-alert.warning:hover { 57 | background-color: var(--xrui-warning-hover); 58 | } 59 | 60 | .xrui .xrui-background--success:hover, .xrui-alert.success:hover { 61 | background-color: var(--xrui-success-hover); 62 | } 63 | 64 | .xrui .xrui-background--danger:hover, .xrui-alert.danger:hover { 65 | background-color: var(--xrui-danger-hover); 66 | } 67 | 68 | .xrui .xrui-background--info:hover, .xrui-alert.info:hover { 69 | background-color: var(--xrui-info-hover); 70 | } 71 | 72 | .xrui-background--dark { 73 | background-color: rgba(0, 0, 0, 0.5); 74 | } 75 | 76 | .xrui--hide { 77 | display: none; 78 | } -------------------------------------------------------------------------------- /Documentation/api/com.chwar.xrui.yml: -------------------------------------------------------------------------------- 1 | ### YamlMime:ManagedReference 2 | items: 3 | - uid: com.chwar.xrui 4 | commentId: N:com.chwar.xrui 5 | id: com.chwar.xrui 6 | children: 7 | - com.chwar.xrui.XRUI 8 | - com.chwar.xrui.XRUI.XRUIFormat 9 | - com.chwar.xrui.XRUIConfiguration 10 | - com.chwar.xrui.XRUIGridController 11 | - com.chwar.xrui.XRUIGridController.XRUIGrid 12 | - com.chwar.xrui.XRUIPanel 13 | - com.chwar.xrui.XRUIWorldSpaceInteraction 14 | langs: 15 | - csharp 16 | - vb 17 | name: com.chwar.xrui 18 | nameWithType: com.chwar.xrui 19 | fullName: com.chwar.xrui 20 | type: Namespace 21 | assemblies: 22 | - cs.temp.dll 23 | references: 24 | - uid: com.chwar.xrui.XRUI 25 | commentId: T:com.chwar.xrui.XRUI 26 | parent: com.chwar.xrui 27 | name: XRUI 28 | nameWithType: XRUI 29 | fullName: com.chwar.xrui.XRUI 30 | - uid: com.chwar.xrui.XRUI.XRUIFormat 31 | commentId: T:com.chwar.xrui.XRUI.XRUIFormat 32 | parent: com.chwar.xrui 33 | name: XRUI.XRUIFormat 34 | nameWithType: XRUI.XRUIFormat 35 | fullName: com.chwar.xrui.XRUI.XRUIFormat 36 | - uid: com.chwar.xrui.XRUIConfiguration 37 | commentId: T:com.chwar.xrui.XRUIConfiguration 38 | name: XRUIConfiguration 39 | nameWithType: XRUIConfiguration 40 | fullName: com.chwar.xrui.XRUIConfiguration 41 | - uid: com.chwar.xrui.XRUIGridController 42 | commentId: T:com.chwar.xrui.XRUIGridController 43 | parent: com.chwar.xrui 44 | name: XRUIGridController 45 | nameWithType: XRUIGridController 46 | fullName: com.chwar.xrui.XRUIGridController 47 | - uid: com.chwar.xrui.XRUIGridController.XRUIGrid 48 | commentId: T:com.chwar.xrui.XRUIGridController.XRUIGrid 49 | name: XRUIGridController.XRUIGrid 50 | nameWithType: XRUIGridController.XRUIGrid 51 | fullName: com.chwar.xrui.XRUIGridController.XRUIGrid 52 | - uid: com.chwar.xrui.XRUIPanel 53 | commentId: T:com.chwar.xrui.XRUIPanel 54 | name: XRUIPanel 55 | nameWithType: XRUIPanel 56 | fullName: com.chwar.xrui.XRUIPanel 57 | - uid: com.chwar.xrui.XRUIWorldSpaceInteraction 58 | commentId: T:com.chwar.xrui.XRUIWorldSpaceInteraction 59 | name: XRUIWorldSpaceInteraction 60 | nameWithType: XRUIWorldSpaceInteraction 61 | fullName: com.chwar.xrui.XRUIWorldSpaceInteraction 62 | - uid: com.chwar.xrui 63 | commentId: N:com.chwar.xrui 64 | name: com.chwar.xrui 65 | nameWithType: com.chwar.xrui 66 | fullName: com.chwar.xrui 67 | -------------------------------------------------------------------------------- /Resources/DefaultCard.uxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Resources/DefaultAlert.uss: -------------------------------------------------------------------------------- 1 | .xrui-alert { 2 | border-radius: 5px; 3 | margin: 0; 4 | position: absolute; 5 | transition-property: bottom, top, opacity; 6 | transition-timing-function: ease-in-out, ease-in-out; 7 | transition-delay: 0.5s, 0.5s, 0.5s; 8 | transition-duration: 0.5s, 0.5s, 0.5s; 9 | } 10 | 11 | .xrui-alert.twodimensional.landscape { 12 | right: 2%; 13 | bottom: 2%; 14 | padding: 20px; 15 | max-width: 50%; 16 | min-width: 20%; 17 | } 18 | 19 | .xrui-alert.twodimensional.portrait { 20 | padding: 5%; 21 | top: 0%; 22 | right: 0%; 23 | left: 0%; 24 | border-radius: 0; 25 | } 26 | 27 | .xrui-alert.threedimensional { 28 | border-radius: 5px; 29 | padding: 10px; 30 | font-size: 24px; 31 | width: 500px; 32 | min-height: 100px; 33 | } 34 | 35 | .xrui-alert__title { 36 | font-size: 24px; 37 | } 38 | 39 | .xrui-alert__content { 40 | font-size: 18px; 41 | } 42 | 43 | .xrui-alert__content { 44 | flex-grow: 1; 45 | white-space: normal; 46 | } 47 | 48 | .xrui-alert.twodimensional.landscape.animate { 49 | bottom: -30%; 50 | transition-property: bottom, top; 51 | transition-timing-function: ease-in-out, ease-in-out; 52 | transition-delay: 0.1s, 0.1s; 53 | transition-duration: 0.5s, 0.5s; 54 | } 55 | 56 | .xrui-alert.twodimensional.portrait.animate { 57 | top: -30%; 58 | transition-property: bottom, top; 59 | transition-timing-function: ease-in-out, ease-in-out; 60 | transition-delay: 0.1s, 0.1s; 61 | transition-duration: 0.5s, 0.5s; 62 | } 63 | 64 | .xrui-alert.threedimensional.animate { 65 | transition-property: bottom, top, opacity; 66 | transition-timing-function: ease-in-out, ease-in-out; 67 | transition-delay: 0.1s, 0.1s, 0.1s; 68 | transition-duration: 0.5s, 0.5s, 0.5s; 69 | } 70 | 71 | .primary { 72 | background-color: var(--xrui-primary); 73 | } 74 | 75 | .success { 76 | background-color: var(--xrui-success); 77 | } 78 | 79 | .warning { 80 | background-color: var(--xrui-warning); 81 | } 82 | 83 | .danger { 84 | background-color: var(--xrui-danger); 85 | } 86 | 87 | .info { 88 | background-color: var(--xrui-info); 89 | } 90 | 91 | .xrui-alert > Label { 92 | color: rgba(255, 255, 255, 255); 93 | } 94 | 95 | .warning > Label { 96 | color: rgba(0, 0, 0, 255); 97 | } 98 | 99 | .info > Label { 100 | color: rgba(0, 0, 0, 255); 101 | } 102 | -------------------------------------------------------------------------------- /Resources/DefaultNavBar.uxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Resources/DefaultModal.uxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Resources/Buttons.uss: -------------------------------------------------------------------------------- 1 | .xrui Button { 2 | background-color: var(--xrui-primary); 3 | color: rgb(255, 255, 255); 4 | border-left-width: 0; 5 | border-right-width: 0; 6 | border-top-width: 0; 7 | border-bottom-width: 0; 8 | border-top-left-radius: 4px; 9 | border-bottom-left-radius: 4px; 10 | border-top-right-radius: 4px; 11 | border-bottom-right-radius: 4px; 12 | margin-left: 10px; 13 | margin-right: 10px; 14 | margin-top: 10px; 15 | margin-bottom: 10px; 16 | padding-left: 0; 17 | padding-right: 0; 18 | padding-top: 0; 19 | padding-bottom: 0; 20 | min-height: 48px; 21 | } 22 | 23 | .xrui Button:hover, .xrui Button:disabled { 24 | background-color: var(--xrui-primary-hover); 25 | } 26 | 27 | .xrui Button.xrui-background--primary { 28 | background-color: var(--xrui-primary); 29 | } 30 | 31 | .xrui Button.xrui-background--secondary { 32 | background-color: var(--xrui-secondary); 33 | } 34 | 35 | .xrui Button.xrui-background--warning { 36 | background-color: var(--xrui-warning); 37 | } 38 | 39 | .xrui Button.xrui-background--success { 40 | background-color: var(--xrui-success); 41 | } 42 | 43 | .xrui Button.xrui-background--danger { 44 | background-color: var(--xrui-danger); 45 | } 46 | 47 | .xrui Button.xrui-background--info { 48 | background-color: var(--xrui-info); 49 | } 50 | 51 | .xrui Button.xrui-background--primary:hover { 52 | background-color: var(--xrui-primary-hover); 53 | } 54 | 55 | .xrui Button.xrui-background--secondary:hover { 56 | background-color: var(--xrui-secondary-hover); 57 | } 58 | 59 | .xrui Button.xrui-background--warning:hover { 60 | background-color: var(--xrui-warning-hover); 61 | } 62 | 63 | .xrui Button.xrui-background--success:hover { 64 | background-color: var(--xrui-success-hover); 65 | } 66 | 67 | .xrui Button.xrui-background--danger:hover { 68 | background-color: var(--xrui-danger-hover); 69 | } 70 | 71 | .xrui Button.xrui-background--info:hover { 72 | background-color: var(--xrui-info-hover); 73 | } 74 | 75 | .xrui Button.xrui-icon { 76 | background-color: rgba(0,0,0,0); 77 | min-height: auto; 78 | } 79 | 80 | .xrui Button.xrui-icon--white { 81 | -unity-background-image-tint-color: rgb(255, 255, 255); 82 | } 83 | 84 | .xrui Button.xrui-icon--white:hover { 85 | -unity-background-image-tint-color: var(--xrui-grey); 86 | } 87 | 88 | .xrui Button.xrui-icon--black { 89 | -unity-background-image-tint-color: rgb(0, 0, 0); 90 | } 91 | 92 | .xrui Button.xrui-icon--black:hover { 93 | -unity-background-image-tint-color: var(--xrui-secondary); 94 | } 95 | 96 | .xrui Button.xrui-modal__cancel-btn { 97 | background-color: var(--xrui-secondary); 98 | } 99 | 100 | .xrui Button.xrui-modal__cancel-btn:hover { 101 | background-color: var(--xrui-dark); 102 | } 103 | -------------------------------------------------------------------------------- /Documentation/api/com.chwar.xrui.XRUI.XRUIFormat.yml: -------------------------------------------------------------------------------- 1 | ### YamlMime:ManagedReference 2 | items: 3 | - uid: com.chwar.xrui.XRUI.XRUIFormat 4 | commentId: T:com.chwar.xrui.XRUI.XRUIFormat 5 | id: XRUI.XRUIFormat 6 | parent: com.chwar.xrui 7 | children: 8 | - com.chwar.xrui.XRUI.XRUIFormat.ThreeDimensional 9 | - com.chwar.xrui.XRUI.XRUIFormat.TwoDimensional 10 | langs: 11 | - csharp 12 | - vb 13 | name: XRUI.XRUIFormat 14 | nameWithType: XRUI.XRUIFormat 15 | fullName: com.chwar.xrui.XRUI.XRUIFormat 16 | type: Enum 17 | source: 18 | id: XRUIFormat 19 | path: '' 20 | startLine: 60 21 | assemblies: 22 | - cs.temp.dll 23 | namespace: com.chwar.xrui 24 | summary: "\nDefines the nature of the UI in order to fit the desired XR device as best as possible.\n" 25 | example: [] 26 | syntax: 27 | content: public enum XRUIFormat 28 | content.vb: Public Enum XRUIFormat 29 | modifiers.csharp: 30 | - public 31 | - enum 32 | modifiers.vb: 33 | - Public 34 | - Enum 35 | - uid: com.chwar.xrui.XRUI.XRUIFormat.TwoDimensional 36 | commentId: F:com.chwar.xrui.XRUI.XRUIFormat.TwoDimensional 37 | id: TwoDimensional 38 | parent: com.chwar.xrui.XRUI.XRUIFormat 39 | langs: 40 | - csharp 41 | - vb 42 | name: TwoDimensional 43 | nameWithType: XRUI.XRUIFormat.TwoDimensional 44 | fullName: com.chwar.xrui.XRUI.XRUIFormat.TwoDimensional 45 | type: Field 46 | source: 47 | id: TwoDimensional 48 | path: '' 49 | startLine: 65 50 | assemblies: 51 | - cs.temp.dll 52 | namespace: com.chwar.xrui 53 | summary: "\nTwo Dimensional UI, for use on traditional screens, e.g. PC, smartphones, tablets, etc.\n" 54 | example: [] 55 | syntax: 56 | content: TwoDimensional = 0 57 | return: 58 | type: com.chwar.xrui.XRUI.XRUIFormat 59 | modifiers.csharp: 60 | - public 61 | - const 62 | modifiers.vb: 63 | - Public 64 | - Const 65 | - uid: com.chwar.xrui.XRUI.XRUIFormat.ThreeDimensional 66 | commentId: F:com.chwar.xrui.XRUI.XRUIFormat.ThreeDimensional 67 | id: ThreeDimensional 68 | parent: com.chwar.xrui.XRUI.XRUIFormat 69 | langs: 70 | - csharp 71 | - vb 72 | name: ThreeDimensional 73 | nameWithType: XRUI.XRUIFormat.ThreeDimensional 74 | fullName: com.chwar.xrui.XRUI.XRUIFormat.ThreeDimensional 75 | type: Field 76 | source: 77 | id: ThreeDimensional 78 | path: '' 79 | startLine: 69 80 | assemblies: 81 | - cs.temp.dll 82 | namespace: com.chwar.xrui 83 | summary: "\nThree Dimensional or World Space UI. Needed for displaying UI for MR/VR applications (can also be used for AR).\n" 84 | example: [] 85 | syntax: 86 | content: ThreeDimensional = 1 87 | return: 88 | type: com.chwar.xrui.XRUI.XRUIFormat 89 | modifiers.csharp: 90 | - public 91 | - const 92 | modifiers.vb: 93 | - Public 94 | - Const 95 | references: 96 | - uid: com.chwar.xrui 97 | commentId: N:com.chwar.xrui 98 | name: com.chwar.xrui 99 | nameWithType: com.chwar.xrui 100 | fullName: com.chwar.xrui 101 | - uid: com.chwar.xrui.XRUI.XRUIFormat 102 | commentId: T:com.chwar.xrui.XRUI.XRUIFormat 103 | parent: com.chwar.xrui 104 | name: XRUI.XRUIFormat 105 | nameWithType: XRUI.XRUIFormat 106 | fullName: com.chwar.xrui.XRUI.XRUIFormat 107 | -------------------------------------------------------------------------------- /Resources/DefaultModal.uss: -------------------------------------------------------------------------------- 1 | .xrui-modal.twodimensional.landscape { 2 | border-top-left-radius: 5px; 3 | border-bottom-left-radius: 5px; 4 | border-top-right-radius: 5px; 5 | border-bottom-right-radius: 5px; 6 | width: 600px; 7 | height: 500px; 8 | } 9 | 10 | .xrui-modal.twodimensional.portrait { 11 | width: 100%; 12 | height: 100%; 13 | } 14 | 15 | .xrui-modal.threedimensional { 16 | width: 600px; 17 | height: 500px; 18 | } 19 | 20 | .xrui-modal { 21 | background-color: rgb(255, 255, 255); 22 | } 23 | 24 | .xrui .unity-base-text-field { 25 | margin-left: 10px; 26 | margin-right: 10px; 27 | margin-top: 5px; 28 | margin-bottom: 5px; 29 | } 30 | 31 | .xrui .unity-base-text-field__input { 32 | background-color: rgba(0, 0, 0, 0); 33 | border-left-width: 1.5px; 34 | border-right-width: 1.5px; 35 | border-top-width: 1.5px; 36 | border-bottom-width: 1.5px; 37 | border-left-color: var(--xrui-grey); 38 | border-right-color: var(--xrui-grey); 39 | border-top-color: var(--xrui-grey); 40 | border-bottom-color: var(--xrui-grey); 41 | border-top-left-radius: 4px; 42 | border-bottom-left-radius: 4px; 43 | border-top-right-radius: 4px; 44 | border-bottom-right-radius: 4px; 45 | min-height: 48px; 46 | color: rgb(0, 0, 0); 47 | padding-left: 15px; 48 | padding-right: 15px; 49 | padding-top: 15px; 50 | padding-bottom: 15px; 51 | background-image: none; 52 | margin-left: 0; 53 | margin-right: 0; 54 | margin-top: 0; 55 | margin-bottom: 0; 56 | } 57 | 58 | .xrui .unity-text-field__label { 59 | color: var(--xrui-dark-grey); 60 | margin-left: 0; 61 | margin-right: 0; 62 | margin-top: 0; 63 | margin-bottom: 0; 64 | padding-left: 0; 65 | padding-right: 0; 66 | padding-top: 0; 67 | padding-bottom: 0; 68 | } 69 | 70 | .unity-toggle { 71 | flex-direction: row-reverse; 72 | justify-content: flex-end; 73 | margin-left: 10px; 74 | margin-right: 10px; 75 | margin-top: 0; 76 | margin-bottom: 10px; 77 | } 78 | 79 | .unity-toggle__input { 80 | margin-right: 15px; 81 | overflow: visible; 82 | flex-grow: 0; 83 | } 84 | 85 | .unity-toggle__label { 86 | /*-unity-text-align: middle-left;*/ 87 | /*color: rgb(0, 0, 0);*/ 88 | margin-left: 15px; 89 | margin-right: 10px; 90 | margin-top: 0; 91 | margin-bottom: 0; 92 | padding-left: 0; 93 | padding-right: 0; 94 | padding-top: 0; 95 | padding-bottom: 0; 96 | align-self: center; 97 | } 98 | 99 | .xrui .unity-text-field.error > Label { 100 | color: var(--xrui-danger); 101 | } 102 | 103 | .xrui .unity-text-field.error > #unity-text-input { 104 | border-left-color: var(--xrui-danger); 105 | border-right-color: var(--xrui-danger); 106 | border-top-color: var(--xrui-danger); 107 | border-bottom-color: var(--xrui-danger); 108 | } 109 | 110 | .xrui .unity-text-field:focus > Label { 111 | color: var(--xrui-primary); 112 | } 113 | 114 | .xrui .unity-text-field:focus > #unity-text-input { 115 | border-left-color: var(--xrui-primary); 116 | border-right-color: var(--xrui-primary); 117 | border-top-color: var(--xrui-primary); 118 | border-bottom-color: var(--xrui-primary); 119 | } 120 | 121 | .xrui .xrui--templates__textfield > Button { 122 | margin-bottom: 5px; 123 | margin-top: 5px; 124 | margin-left: 10px; 125 | margin-right: 10px; 126 | } -------------------------------------------------------------------------------- /Tests/XRUITest.cs: -------------------------------------------------------------------------------- 1 | // MIT License 2 | // Copyright (c) 2021 Chris Warin 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 5 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 6 | using System; 7 | using System.Collections; 8 | using NUnit.Framework; 9 | using UnityEngine; 10 | using UnityEngine.TestTools; 11 | using UnityEngine.UIElements; 12 | 13 | namespace com.chwar.xrui.Tests 14 | { 15 | [TestFixture] 16 | public class XRUITest 17 | { 18 | private XRUI _xrui; 19 | 20 | [OneTimeSetUp] 21 | public void Init() 22 | { 23 | if (GameObject.FindObjectOfType() is not null) return; 24 | _xrui = new GameObject() {name = "XRUI"}.AddComponent(); 25 | _xrui.gameObject.AddComponent().tag = "MainCamera"; 26 | _xrui.xruiConfigurationAsset = Resources.Load("DefaultXRUI2DConfiguration"); 27 | Debug.Log("XRUI Initialized"); 28 | } 29 | 30 | [Test] 31 | public void XRUITestCreateConfiguration() 32 | { 33 | XRUIConfiguration c = ScriptableObject.CreateInstance(); 34 | c.Reset(); 35 | Assert.NotNull(c.panelSettings); 36 | Assert.NotNull(c.defaultAlertTemplate); 37 | Assert.NotNull(c.defaultModalTemplate); 38 | Assert.NotNull(c.defaultCardTemplate); 39 | Assert.NotNull(c.defaultMenuTemplate); 40 | Assert.NotNull(c.defaultListTemplate); 41 | Assert.NotNull(c.defaultNavbarTemplate); 42 | Assert.NotNull(c.defaultContextualMenuTemplate); 43 | } 44 | 45 | [Test] 46 | public void XRUITestGetNonExistingUIElement() 47 | { 48 | Assert.Throws(() => XRUI.Instance.GetUIElement("NonExistingTemplate")); 49 | } 50 | 51 | [Test] 52 | public void XRUITestGetExistingUIElement() 53 | { 54 | XRUI.Instance.uiElements.Add(Resources.Load("TestUIElement")); 55 | Assert.NotNull(XRUI.Instance.GetUIElement("TestUIElement")); 56 | } 57 | 58 | [UnityTest] 59 | public IEnumerator XRUITestWorldUIPanel() 60 | { 61 | XRUI.Instance.SetGlobalXRUIFormat(XRUI.XRUIFormat.ThreeDimensional); 62 | XRUIEditor.AddCard(); 63 | XRUI.Instance.InitializeElements(); 64 | 65 | yield return new WaitForSeconds(1); 66 | var panel = GameObject.FindObjectOfType(); 67 | Assert.NotNull(panel); 68 | } 69 | 70 | [Test] 71 | public void XRUITestGlobalFormat() 72 | { 73 | XRUI.Instance.SetGlobalXRUIFormat(XRUI.XRUIFormat.ThreeDimensional); 74 | Assert.True(XRUI.GetGlobalXRUIFormat().Equals(XRUI.Instance.xruiFormat.ToString())); 75 | Assert.True(XRUI.IsGlobalXRUIFormat(XRUI.XRUIFormat.ThreeDimensional)); 76 | } 77 | } 78 | } -------------------------------------------------------------------------------- /Documentation/api/com.chwar.xrui.UIElements.yml: -------------------------------------------------------------------------------- 1 | ### YamlMime:ManagedReference 2 | items: 3 | - uid: com.chwar.xrui.UIElements 4 | commentId: N:com.chwar.xrui.UIElements 5 | id: com.chwar.xrui.UIElements 6 | children: 7 | - com.chwar.xrui.UIElements.WorldUIParameters 8 | - com.chwar.xrui.UIElements.XRUIAlert 9 | - com.chwar.xrui.UIElements.XRUIAlert.AlertType 10 | - com.chwar.xrui.UIElements.XRUICard 11 | - com.chwar.xrui.UIElements.XRUIContextualMenu 12 | - com.chwar.xrui.UIElements.XRUIElement 13 | - com.chwar.xrui.UIElements.XRUIFormatOverride 14 | - com.chwar.xrui.UIElements.XRUIList 15 | - com.chwar.xrui.UIElements.XRUIMenu 16 | - com.chwar.xrui.UIElements.XRUIModal 17 | - com.chwar.xrui.UIElements.XRUINavbar 18 | langs: 19 | - csharp 20 | - vb 21 | name: com.chwar.xrui.UIElements 22 | nameWithType: com.chwar.xrui.UIElements 23 | fullName: com.chwar.xrui.UIElements 24 | type: Namespace 25 | assemblies: 26 | - cs.temp.dll 27 | references: 28 | - uid: com.chwar.xrui.UIElements.XRUIAlert 29 | commentId: T:com.chwar.xrui.UIElements.XRUIAlert 30 | parent: com.chwar.xrui.UIElements 31 | name: XRUIAlert 32 | nameWithType: XRUIAlert 33 | fullName: com.chwar.xrui.UIElements.XRUIAlert 34 | - uid: com.chwar.xrui.UIElements.XRUIAlert.AlertType 35 | commentId: T:com.chwar.xrui.UIElements.XRUIAlert.AlertType 36 | parent: com.chwar.xrui.UIElements 37 | name: XRUIAlert.AlertType 38 | nameWithType: XRUIAlert.AlertType 39 | fullName: com.chwar.xrui.UIElements.XRUIAlert.AlertType 40 | - uid: com.chwar.xrui.UIElements.XRUICard 41 | commentId: T:com.chwar.xrui.UIElements.XRUICard 42 | name: XRUICard 43 | nameWithType: XRUICard 44 | fullName: com.chwar.xrui.UIElements.XRUICard 45 | - uid: com.chwar.xrui.UIElements.XRUIContextualMenu 46 | commentId: T:com.chwar.xrui.UIElements.XRUIContextualMenu 47 | parent: com.chwar.xrui.UIElements 48 | name: XRUIContextualMenu 49 | nameWithType: XRUIContextualMenu 50 | fullName: com.chwar.xrui.UIElements.XRUIContextualMenu 51 | - uid: com.chwar.xrui.UIElements.XRUIElement 52 | commentId: T:com.chwar.xrui.UIElements.XRUIElement 53 | parent: com.chwar.xrui.UIElements 54 | name: XRUIElement 55 | nameWithType: XRUIElement 56 | fullName: com.chwar.xrui.UIElements.XRUIElement 57 | - uid: com.chwar.xrui.UIElements.WorldUIParameters 58 | commentId: T:com.chwar.xrui.UIElements.WorldUIParameters 59 | parent: com.chwar.xrui.UIElements 60 | name: WorldUIParameters 61 | nameWithType: WorldUIParameters 62 | fullName: com.chwar.xrui.UIElements.WorldUIParameters 63 | - uid: com.chwar.xrui.UIElements.XRUIFormatOverride 64 | commentId: T:com.chwar.xrui.UIElements.XRUIFormatOverride 65 | parent: com.chwar.xrui.UIElements 66 | name: XRUIFormatOverride 67 | nameWithType: XRUIFormatOverride 68 | fullName: com.chwar.xrui.UIElements.XRUIFormatOverride 69 | - uid: com.chwar.xrui.UIElements.XRUIList 70 | commentId: T:com.chwar.xrui.UIElements.XRUIList 71 | name: XRUIList 72 | nameWithType: XRUIList 73 | fullName: com.chwar.xrui.UIElements.XRUIList 74 | - uid: com.chwar.xrui.UIElements.XRUIMenu 75 | commentId: T:com.chwar.xrui.UIElements.XRUIMenu 76 | name: XRUIMenu 77 | nameWithType: XRUIMenu 78 | fullName: com.chwar.xrui.UIElements.XRUIMenu 79 | - uid: com.chwar.xrui.UIElements.XRUIModal 80 | commentId: T:com.chwar.xrui.UIElements.XRUIModal 81 | parent: com.chwar.xrui.UIElements 82 | name: XRUIModal 83 | nameWithType: XRUIModal 84 | fullName: com.chwar.xrui.UIElements.XRUIModal 85 | - uid: com.chwar.xrui.UIElements.XRUINavbar 86 | commentId: T:com.chwar.xrui.UIElements.XRUINavbar 87 | name: XRUINavbar 88 | nameWithType: XRUINavbar 89 | fullName: com.chwar.xrui.UIElements.XRUINavbar 90 | - uid: com.chwar.xrui.UIElements 91 | commentId: N:com.chwar.xrui.UIElements 92 | name: com.chwar.xrui.UIElements 93 | nameWithType: com.chwar.xrui.UIElements 94 | fullName: com.chwar.xrui.UIElements 95 | -------------------------------------------------------------------------------- /Tests/Editor/XRUIEditorTest.cs: -------------------------------------------------------------------------------- 1 | // MIT License 2 | // Copyright (c) 2021 Chris Warin 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 5 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 6 | using com.chwar.xrui.UIElements; 7 | using NUnit.Framework; 8 | using UnityEngine; 9 | using UnityEngine.UIElements; 10 | 11 | namespace com.chwar.xrui.Tests.Editor 12 | { 13 | [TestFixture] 14 | public class XRUIEditorTest 15 | { 16 | [SetUp] 17 | public void Init() 18 | { 19 | XRUIEditor.AddController(); 20 | } 21 | 22 | [Test] 23 | public void XRUIEditorTestAddController() 24 | { 25 | var xrui = GameObject.FindObjectOfType(); 26 | Assert.NotNull(xrui); 27 | } 28 | 29 | [Test] 30 | public void XRUIEditorTestAddGrid() 31 | { 32 | XRUIEditor.AddGrid(); 33 | var xrui = GameObject.FindObjectOfType(); 34 | Assert.NotNull(xrui); 35 | } 36 | 37 | [Test] 38 | public void XRUIEditorTestAddCard() 39 | { 40 | XRUIEditor.AddCard(); 41 | var xrui = GameObject.FindObjectOfType(); 42 | Assert.NotNull(xrui); 43 | } 44 | 45 | [Test] 46 | public void XRUIEditorTestAddList() 47 | { 48 | XRUIEditor.AddList(); 49 | var xrui = GameObject.FindObjectOfType(); 50 | Assert.NotNull(xrui); 51 | } 52 | 53 | [Test] 54 | public void XRUIEditorTestAddNavbar() 55 | { 56 | XRUIEditor.AddNavbar(); 57 | var xrui = GameObject.FindObjectOfType(); 58 | Assert.NotNull(xrui); 59 | } 60 | 61 | [Test] 62 | public void XRUIEditorTestAddMenu() 63 | { 64 | XRUIEditor.AddMenu(); 65 | var xrui = GameObject.FindObjectOfType(); 66 | Assert.NotNull(xrui); 67 | } 68 | 69 | [Test] 70 | public void XRUIEditorTestAddCustomElement() 71 | { 72 | XRUIEditor.AddCustomElement(); 73 | var xrui = GameObject.FindObjectOfType(); 74 | var uid = xrui.gameObject.GetComponent(); 75 | uid.visualTreeAsset = Resources.Load("TestUIElement"); 76 | Assert.NotNull(xrui); 77 | } 78 | 79 | /*[Test] 80 | public void XRUIEditorTestSwitchToPC() 81 | { 82 | XRUIEditor.SwitchToPC(); 83 | Assert.True(XRUI.IsCurrentReality(XRUI.RealityType.PC)); 84 | } 85 | 86 | [Test] 87 | public void XRUIEditorTestSwitchToARAndroid() 88 | { 89 | XRUIEditor.SwitchToARAndroid(); 90 | Assert.True(XRUI.IsCurrentReality(XRUI.RealityType.AR)); 91 | } 92 | 93 | [Test] 94 | public void XRUIEditorTestSwitchToVR() 95 | { 96 | XRUIEditor.SwitchToVR(); 97 | Assert.True(XRUI.IsCurrentReality(XRUI.RealityType.VR)); 98 | }*/ 99 | } 100 | } -------------------------------------------------------------------------------- /Scripts/UIElements/XRUICard.cs: -------------------------------------------------------------------------------- 1 | // MIT License 2 | // Copyright (c) 2021 Chris Warin 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 5 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 6 | using System; 7 | using UnityEngine; 8 | using UnityEngine.UIElements; 9 | 10 | namespace com.chwar.xrui.UIElements 11 | { 12 | /// 13 | /// XRUI Card class. 14 | /// 15 | public class XRUICard : XRUIElement 16 | { 17 | /// 18 | /// The title UXML node of the card. 19 | /// 20 | private Label _title; 21 | /// 22 | /// The subtitle UXML node of the card. 23 | /// 24 | private Label _subtitle; 25 | /// 26 | /// The close button UXML node of the card. 27 | /// 28 | private Button _closeButton; 29 | 30 | /// 31 | /// The title property in the Inspector. 32 | /// 33 | [Tooltip("Title of the card")] 34 | [SerializeField] 35 | private string titleText; 36 | /// 37 | /// The subtitle property in the Inspector. 38 | /// 39 | [Tooltip("Subtitle of the card")] 40 | [SerializeField] 41 | private string subtitleText; 42 | 43 | /// 44 | /// Initializes the UI Element. 45 | /// 46 | protected internal override void Init() 47 | { 48 | base.Init(); 49 | _title = GetXRUIVisualElement