Commit 1c847220 authored by jang dong hyeok's avatar jang dong hyeok
Browse files

.

parent 076f0c68
<engine:UXML xmlns:engine="UnityEngine.UIElements">
<engine:VisualElement class="main-window__container grow">
</engine:VisualElement>
</engine:UXML>
# Assets
This directory contains the non-code assets for the Collaborate UI.
## Overview
```none
<root>
├── Icons/
├── Layouts/
├── Styles/
├── StringAssets.cs
└── UiConstants.cs
```
- `StringAssets.cs` contains all the static string resources for the package.
- `UiConstants.cs` conatins a number of static values used to control the UI.
## Editing
USS and UXML files are inspired by the respective CSS and XML files. USS is a non-struct subset of CSS and each View and
Component has the option of having its own USS and/or UXML file. For USS, to specifiy dark vs light style, prepend a `.dark`
or `.light` to the line. For example:
```css
.dark .divider-vertical {
background-color: var(--divider-dark);
}
.light .divider-vertical {
background-color: var(--divider-light);
}
```
Documentation about the two file types is provided within the Unity documentation for UiElements:
https://docs.unity3d.com/2020.1/Documentation/Manual/UIElements.html
In general each Component and View will have its own layout file. When adding new components with their uxml factories
the UIElements schema will need to updated within the editor if you want auto completion in your editor. Click
`Assets/Update UIElements Schema` in the Editor to update the definitions.
using System;
namespace Unity.Cloud.Collaborate.Assets
{
/// <summary>
/// Static string resources used throughout the UI.
/// </summary>
internal static class StringAssets
{
public const string searchResults = "Search Results";
public const string cannotPublishWhileSearching = "Please clear the search before publishing changes.";
public const string cannotPublishWhileConflicted = "Please fix the above conflicts before publishing.";
public const string cannotPublishWithoutFiles = "No files to publish.";
public const string cannotPublishWithIncomingChanges = "Please sync latest changes before publishing.";
public const string changeListFullHeader = "Publish Changes";
public const string changeListConflictedHeader = "Conflicted Items";
public const string changeListConflictedList = "conflicted";
public const string noticeNoRevisionsToDisplay = "No revisions to display.";
public const string noticeNoChangesToDisplay = "No changes to display.";
public const string noticeNoResultsForQuery = "No results found for this query.";
public const string publishButton = "Publish";
public const string publishSummaryPlaceholder = "Summary";
public const string menuDiscardToggledChanges = "Discard toggled changes";
public const string cancel = "Cancel";
public const string discardChanges = "Discard changes";
public const string confirmDiscardChangeMessage = "Are you sure you want to irreversibly discard changes to a file?";
public const string confirmDiscardChangesMessage = "Are you sure you want to irreversibly discard changes to {0} files?";
public const string confirmDiscardChangesTitle = "Collaborate: discard changes";
public const string search = "Search";
public const string syncRemoteRevisionMessage = "1 revision has been published to the server. Please sync to get the latest changes.";
public const string syncRemoteRevisionsMessage = "Some revisions have been published to the server. Please sync to get the latest changes.";
public const string syncLocalRevisionMessage = "1 revision has been made locally, but hasn't been published to the server. Please sync to ensure these changes are published.";
public const string syncLocalRevisionsMessage = "{0} revisions have been made locally, but haven't been published to the server. Please sync to ensure these changes are published.";
public const string sync = "Sync";
public const string confirmRollbackTitle = "Collaborate: rollback";
public const string confirmRollbackMessage = "Are you sure you want to rollback your project to this revision?";
public const string rollback = "Rollback";
public const string confirmRollbackDiscardChangesTitle = "Collaborate: rollback and discard changes";
public const string confirmRollbackDiscardChangeMessage = "Rollback will irreversibly discard changes to 1 file. Are you sure you want to rollback your project to this revision?";
public const string confirmRollbackDiscardChangesMessage = "Rollback will irreversibly discard changes to {0} files. Are you sure you want to rollback your project to this revision?";
public const string rollbackAndDiscard = "Discard and rollback";
public const string all = "All";
public const string includedToPublishByAnotherGitTool = "This file has been included to publish by another Git tool.";
public const string viewDiff = "View diff";
public const string useMyChanges = "Use my changes";
public const string useRemoteChanges = "Use remote changes";
public const string useMergeTool = "Use merge tool";
public const string noMergeToolIsConfigured = "You have not set any Diff/Merge tools. Check your Unity preferences.";
public const string showChange = "1 change";
public const string showChanges = "{0} changes";
public const string history = "History";
public const string changes = "Changes";
public const string loadingRevisions = "Please wait, loading revisions.";
public const string allHistory = "All History";
public const string restore = "Restore";
public const string goBackTo = "Go back to";
public const string update = "Update";
public const string clear = "Clear";
public const string changeGroupHeaderFormat = "{0} ( {1} )";
public const string conflictsDetected = "Conflicts detected. Please resolve them before continuing.";
public const string projectStatusTitleUnbound = "Welcome to Collaborate. Before starting, please click the button below to set a new or existing Unity Project ID for this project. Return to this window once it is set.";
public const string projectStatusTitleOffline = "No internet connection.";
public const string projectStatusTitleMaintenance = "Undergoing maintenance, please come back later.";
public const string projectStatusTitleLoggedOut = "Sign in to access Collaborate.";
public const string projectStatusTitleNoSeat = "Ask your project owner for access to Unity Teams.";
public const string projectStatusTitleBound = "Welcome to Collaborate. Please click the button below to start.";
public const string projectStatusTitleLoading = "Loading, please wait...";
public const string projectStatusButtonBound = "Start Collab";
public const string projectStatusButtonUnbound = "Set Project ID";
public const string projectStatusButtonLoggedOut = "Sign in...";
public const string projectStatusButtonNoSeat = "Learn More";
}
}
/* AlertBox Styles */
.alert-box {
flex: var(--fixed-size);
}
.alert-box__content {
padding: var(--standard-padding);
}
.alert-box__text {
margin-top: 1px;
}
.alert-box__button-box {
align-items: flex-end;
}
.alert-box__button {
margin-right: 0;
}
.alert-box__icon {
flex: var(--fixed-size);
width: var(--icon-size);
height: var(--icon-size);
margin-right: var(--icon-standard-margin);
}
.dark .alert-box__icon.icon-info {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/status-info-dark.png");
}
.light .alert-box__icon.icon-info {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/status-info-light.png");
}
.dark .alert-box__icon.icon-warning {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/status-warning-dark.png");
}
.light .alert-box__icon.icon-warning {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/status-warning-light.png");
}
.dark .alert-box__icon.icon-alert {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/status-error-dark.png");
}
.light .alert-box__icon.icon-alert {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/status-error-light.png");
}
/* BaseChangeEntry Styles */
.base-change-list-element {
height: var(--list-entry-height);
align-items: center;
}
.base-change-list-element__container {
flex: 1 1 auto;
align-items: center;
}
.base-change-list-element__buttons,
.base-change-list-element__icons {
align-items: center;
flex: var(--fixed-size);
flex-direction: row;
}
.base-change-list-element__button,
.base-change-list-element__icon {
flex: var(--fixed-size);
width: var(--icon-size);
height: var(--icon-size);
margin-right: var(--icon-standard-margin);
}
.base-change-list-element__container:hover .base-change-list-element__button {
display: flex;
}
.base-change-list-element__button,
.base-change-list-element__container:hover .base-change-list-element__button.hidden {
display: none;
}
.base-change-list-element__file-name {
flex: 0 0 auto;
margin: 0 var(--half-standard-margin) 0 0;
padding: 0;
overflow: hidden;
}
.base-change-list-element__file-path {
flex: 0 1 auto;
font-size: var(--list-entry-path-font-size);
padding: 0;
margin: 1px var(--half-standard-margin) 0 0;
overflow: hidden;
}
.dark .base-change-list-element__file-path {
color: var(--dark-list-entry-path-text-color);
}
.light .base-change-list-element__file-path {
color: var(--light-list-entry-path-text-color);
}
/* File status icons */
.dark .base-change-list-element__icon.added {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/added-file-dark.png");
}
.light .base-change-list-element__icon.added {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/added-file-light.png");
}
.dark .base-change-list-element__icon.moved {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/moved-file-dark.png");
}
.light .base-change-list-element__icon.moved {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/moved-file-light.png");
}
.dark .base-change-list-element__icon.edited {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/edited-file-dark.png");
}
.light .base-change-list-element__icon.edited {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/edited-file-light.png");
}
.dark .base-change-list-element__icon.deleted {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/deleted-file-dark.png");
}
.light .base-change-list-element__icon.deleted {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/deleted-file-light.png");
}
.dark .base-change-list-element__icon.conflicted {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/conflicted-file-dark.png");
}
.light .base-change-list-element__icon.conflicted {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/conflicted-file-light.png");
}
/* BetterTextField Styles */
.unity-better-text-field__placeholder {
position: absolute;
margin: 0;
padding: 2px 3px 3px;
}
.dark .unity-better-text-field__placeholder {
color: var(--dark-placeholder-text-color);
}
.light .unity-better-text-field__placeholder {
color: var(--light-placeholder-text-color);
}
.unity-better-text-field #unity-text-input {
overflow: hidden;
}
/* ChangesGroupHeader Styles */
.changes-group-header__title-bar {
flex-direction: row;
margin: var(--half-standard-margin) 0;
}
.changes-group-header__name {
-unity-text-align: middle-left;
-unity-font-style: bold;
flex: 1 1 auto;
padding-left: 0;
}
.changes-group-header__overflow-button {
margin-right: 0;
}
/* ChangesTabPageView Styles */
.changes-tab-page-view__text-field {
/* 36px (3 * 12px lines of text) + 5px in default padding + 1px extra */
height: 42px;
margin: var(--standard-margin) 0 0;
}
.changes-tab-page-view__text-field .unity-text-field__input {
-unity-text-align: upper-left;
}
.changes-tab-page-view__publish-button {
align-self: center;
width: 128px;
justify-content: center;
margin-top: var(--standard-margin);
}
.changes-tab-page-view__search-bar {
margin-bottom: var(--half-standard-margin);
margin-top: var(--standard-margin);
}
.changes-tab-page-view__list-view {
flex-basis: 288px;
margin-bottom: var(--standard-margin);
}
/* FloatingDialogue Styles */
.unity-floating-dialogue {
position: absolute;
border-width: 1px;
flex: 1 1 auto;
}
.dark .unity-floating-dialogue {
background-color: #383838;
border-color: rgba(35, 35, 35, 1);
}
.light .unity-floating-dialogue {
background-color: #C2C2C2;
border-color: rgba(107, 107, 107, 1);
}
/* FloatingMenu Styles */
.unity-floating-menu {
min-width: 144px;
min-height: 28px;
flex: 1 1 auto;
}
/* FloatingMenuItem Styles */
.unity-floating-menu-item {
justify-content: center;
padding: 0 var(--standard-padding);
}
.dark .unity-floating-menu-item:hover,
.dark .unity-floating-menu-item:focus {
background-color: var(--dark-button-hover-focus-bg-color);
}
.light .unity-floating-menu-item:hover,
.light .unity-floating-menu-item:focus {
background-color: var(--light-button-hover-focus-bg-color);
}
.dark .unity-floating-menu-item:active,
.dark .unity-floating-menu-item:hover:active {
background-color: var(--dark-button-active-bg-color);
}
.light .unity-floating-menu-item:active,
.light .unity-floating-menu-item:hover:active {
background-color: var(--light-button-active-bg-color);
}
/* HistoryEntryComponent Styles */
.history-entry-component__container {
margin-top: var(--standard-margin);
}
.history-entry-component__profile-background {
flex: var(--fixed-size);
width: var(--large-icon-size);
height: var(--large-icon-size);
margin-right: var(--standard-margin);
border-radius: var(--half-large-icon-size);
background-color: #018d98;
justify-content: center;
}
.history-entry-component__profile-initial {
padding: 0;
-unity-text-align: middle-center;
font-size: var(--profile-icon-font-size);
}
.history-entry-component__top-row {
justify-content: space-between;
align-items: center;
height: var(--large-icon-size);
}
.history-entry-component__top-row .row {
align-items: center;
}
.history-entry-component__author-name,
.history-entry-component__timestamp,
.history-entry-component__revision-id,
.history-entry-component__commit-message {
overflow: hidden;
}
.history-entry-component__commit-message {
white-space: normal;
margin: var(--standard-margin) 0;
}
.history-entry-component__changed-files-count {
-unity-text-align: middle-left;
-unity-font-style: bold;
flex: 1 1 auto;
padding-left: 0;
margin-top: var(--standard-margin);
}
.history-entry-component .divider-horizontal {
margin-top: var(--standard-margin);
}
.history-entry-component__changed-files {
flex-basis: 288px;
margin-bottom: var(--standard-margin);
}
/* IconButton Styles */
.unity-icon-button {
flex: var(--fixed-size);
width: var(--icon-size);
height: var(--icon-size);
border-radius: var(--half-icon-size);
background-color: var(--no-color);
}
.dark .unity-icon-button.btn-overflow {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/more-vert-dark.png");
}
.light .unity-icon-button.btn-overflow {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/more-vert-light.png");
}
.dark .unity-icon-button.btn-undo {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/undo-dark.png");
}
.light .unity-icon-button.btn-undo {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/undo-light.png");
}
.dark .unity-icon-button.btn-revert {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/revert-asset-dark.png");
}
.light .unity-icon-button.btn-revert {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/revert-asset-light.png");
}
.dark .unity-icon-button.btn-back {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/back-dark.png");
}
.light .unity-icon-button.btn-back {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/back-light.png");
}
.dark .unity-icon-button.btn-show {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/show-dark.png");
}
.light .unity-icon-button.btn-show {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/show-light.png");
}
.dark .unity-icon-button.btn-merge {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/merge-dark.png");
}
.light .unity-icon-button.btn-merge {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/merge-light.png");
}
.dark .unity-icon-button.btn-choose-remote {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/choose-remote-dark.png");
}
.light .unity-icon-button.btn-choose-remote {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/choose-remote-light.png");
}
.dark .unity-icon-button.btn-choose-mine {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/choose-mine-dark.png");
}
.light .unity-icon-button.btn-choose-mine {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/choose-mine-light.png");
}
.dark .unity-icon-button.btn-diff {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/diff-dark.png");
}
.light .unity-icon-button.btn-diff {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/diff-light.png");
}
.dark .unity-icon-button:focus {
background-color: var(--dark-button-hover-focus-bg-color);
}
.light .unity-icon-button:focus {
background-color: var(--light-button-hover-focus-bg-color);
}
.dark .unity-icon-button:active,
.dark .unity-icon-button:hover:active {
background-color: var(--dark-button-active-bg-color);
}
.light .unity-icon-button:active,
.light .unity-icon-button:hover:active {
background-color: var(--light-button-active-bg-color);
}
/* IconTextButton Styles */
.unity-icon-text-button {
flex-direction: row;
}
.unity-icon-text-button__image {
flex: var(--fixed-size);
width: var(--icon-size);
height: var(--icon-size);
}
.light .unity-icon-text-button.icon-publish .unity-icon-text-button__image {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/publish-light.png");
}
.dark .unity-icon-text-button.icon-publish .unity-icon-text-button__image {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/publish-dark.png");
}
/* ListNotice Styles */
.list-notice__container {
height: 32px;
align-items: center;
}
.list-notice__icon {
flex: var(--fixed-size);
width: var(--icon-size);
height: var(--icon-size);
background-color: darkslategrey;
margin-right: var(--icon-standard-margin);
}
.list-notice__text {
padding: 0;
margin: 0;
}
/* MainView Styles */
.main-page-view {
flex-grow: 1;
}
.main-page-view__top-bar {
margin: var(--half-standard-margin) var(--standard-margin);
}
.main-page-view__tab-view {
margin: 0 var(--standard-margin);
}
/* Paginator Styles */
.paginator__content {
align-items: center;
justify-content: space-between;
margin: var(--half-standard-margin) 0;
}
.paginator__page-text {
padding: 0;
}
.paginator__back-button {
border-width: 0;
margin-left: 0;
}
.paginator__forwards-button {
border-width: 0;
margin-right: 0;
}
/* ProgressView Styles */
.progress-view__label {
margin: var(--standard-margin);
padding: 0;
}
.progress-view__button {
margin: 0 var(--standard-margin) 0 0;
}
.progress-view__progress-bar {
margin: 0 var(--standard-margin);
padding: 0;
}
.progress-view__progress-bar .unity-progress-bar__progress {
background-image: none;
background-color: #388AFD;
}
/* SearchBar Styles */
.unity-search-bar {
flex-direction: row;
}
.unity-search-bar__search-field {
width: auto;
flex: 1 1 auto;
font-size: 12px;
padding: 1px;
border-radius: 2px;
margin: 1px 0;
}
.unity-search-bar__search-field #unity-text-input {
padding: 0;
margin-top: 1px;
font-size: 12px;
}
.unity-search-bar__search-field #unity-search {
flex: var(--fixed-size);
height: var(--icon-size);
width: var(--icon-size);
}
.dark .unity-search-bar__search-field #unity-search {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/search-dark.png");
}
.light .unity-search-bar__search-field #unity-search {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/search-light.png");
}
.unity-search-bar__search-field #unity-cancel {
flex: var(--fixed-size);
height: var(--icon-size);
width: var(--icon-size);
margin-top: 0;
}
.dark .unity-search-bar__search-field #unity-cancel {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/clear-dark.png");
}
.light .unity-search-bar__search-field #unity-cancel {
background-image: resource("Packages/com.unity.collab-proxy/Editor/Collaborate/Assets/Icons/clear-light.png");
}
.unity-search-bar__search-field #unity-cancel.unity-search-field-base__cancel-button--off {
background-image: none;
}
.unity-search-bar__placeholder {
position: absolute;
top: 4px;
left: 20px;
}
.dark .unity-search-bar__placeholder {
color: var(--dark-placeholder-text-color);
}
.light .unity-search-bar__placeholder {
color: var(--light-placeholder-text-color);
}
/* StartPageView Styles */
.start-page-view__title {
margin: var(--standard-margin) var(--standard-margin);
white-space: normal;
font-size: 13px;
}
.start-page-view__button {
margin: 0 var(--standard-margin);
width: 100%;
max-width: 128px;
height: 24px;
align-self: center;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment