Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: install/uninstall modules from welcome window #593

Merged
merged 19 commits into from
Feb 21, 2021
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions Assets/Mirage/Editor/WelcomeWindow/Resources/WelcomeWindow.uss
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
-unity-text-align: upper-left;
padding-left: 10px;
padding-right: 10px;
padding-bottom: 10px;
padding-top: 5px;
padding-bottom: 15px;
padding-top: 0;
flex: 3;
white-space: normal;
}
Expand Down Expand Up @@ -98,3 +98,11 @@ Button {
flex-direction: column;
justify-content: space-between;
}

#Module {
flex-basis: 20px;
flex-direction: row;
justify-content: space-between;
align-items: center;
margin-bottom: 3px;
}
25 changes: 23 additions & 2 deletions Assets/Mirage/Editor/WelcomeWindow/Resources/WelcomeWindow.uxml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="False">
<Style src="WelcomeWindow.uss" />
<ui:VisualElement name="Banner">
<ui:VisualElement name="Banner" style="background-color: rgb(11, 12, 11);">
erikas-taroza marked this conversation as resolved.
Show resolved Hide resolved
<ui:Label name="VersionText" text="Placeholder" />
<ui:Image name="Icon" style="background-image: url(&apos;/Assets/Mirage/Editor/WelcomeWindow/Resources/MirageIcon.png&apos;);" />
</ui:VisualElement>
Expand All @@ -9,6 +9,7 @@
<ui:VisualElement name="LeftColumnBox">
<ui:Button name="WelcomeButton" text="Welcome" />
<ui:Button name="QuickStartButton" text="Quick Start Guide" />
<ui:Button name="PackagesButton" text="Packages" />
<ui:Button name="FaqButton" text="FAQ" />
<ui:Button name="BestPracticesButton" text="Best Practices" />
<ui:Button name="ChangeLogButton" text="Change Log" />
Expand All @@ -17,7 +18,7 @@
</ui:VisualElement>
<ui:VisualElement name="Spacer" />
<ui:VisualElement name="RightColumnBox">
<ui:VisualElement name="Welcome" style="flex-grow: 0; width: 100%; height: 100%;">
<ui:VisualElement name="Welcome" style="flex-grow: 0; width: 100%; height: 100%; display: none;">
erikas-taroza marked this conversation as resolved.
Show resolved Hide resolved
<ui:Label name="Header" text="Welcome" />
<ui:Label name="Description" text="Hello! Thank you for installing Mirage. Please visit all the pages on this window. Clicking the button at the bottom of the pages will redirect you to a webpage. Additionally, there are example projects that you can import from the Unity Package Manager. &#10;&#10;Have fun using Mirage!" style="-unity-text-align: upper-left;" />
<ui:VisualElement name="Spacer" />
Expand Down Expand Up @@ -59,6 +60,26 @@
<ui:VisualElement name="Spacer" />
<ui:Button name="Redirect" text="Join Discord" class="redirect" />
</ui:VisualElement>
<ui:ScrollView name="Packages">
<ui:Label name="Header" text="Packages" />
<ui:Label name="Description" text="Mirage is a modular networking library. It ships with the foundation that you can build upon by installing packages." style="flex-basis: auto; flex-grow: 0; flex-shrink: 0;" />
<ui:Label text="Available Packages" display-tooltip-when-elided="True" style="padding-left: 10px; -unity-font-style: bold;" />
<ui:VisualElement name="ModulesList" style="flex-grow: 1; padding-left: 10px; padding-right: 10px;">
<ui:VisualElement name="Module" tooltip="Automatically find games within the same network.">
<ui:Label text="LAN Discovery" name="Name" />
<ui:Button text="Install" display-tooltip-when-elided="True" name="InstallButton" style="flex-shrink: 1; height: auto;" />
</ui:VisualElement>
<ui:VisualElement name="Module" tooltip="A transport that uses Facepunch&apos;s Steam SDK.">
<ui:Label text="Steam (Facepunch)" name="Name" />
<ui:Button text="Install" display-tooltip-when-elided="True" name="InstallButton" style="flex-shrink: 1; height: auto;" />
</ui:VisualElement>
<ui:VisualElement name="Module" tooltip="A transport that uses Steamworks.NET.">
<ui:Label text="Steam (Steamworks.NET)" name="Name" />
<ui:Button text="Install" display-tooltip-when-elided="True" name="InstallButton" style="flex-shrink: 1; height: auto;" />
</ui:VisualElement>
</ui:VisualElement>
<ui:VisualElement name="Spacer" />
</ui:ScrollView>
</ui:VisualElement>
</ui:Box>
</ui:UXML>
Loading