Skip to content

Commit

Permalink
✨Feature: life UI using UI Toolkit
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyago-Teoi committed Feb 2, 2023
1 parent a1c7fc1 commit eef7d2c
Show file tree
Hide file tree
Showing 13 changed files with 436 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Assets/Editor.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Assets/Editor/Life.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Assets/Editor/Life/UI_LifeBar.uxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<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="project://database/Assets/Editor/Life/lifebar.uss?fileID=7433441132597879392&amp;guid=0671ba6214d544f419b808fe652f6206&amp;type=3#lifebar" />
<ui:IMGUIContainer name="lifebar-container" style="height: 20%; width: 50%; left: 25%; right: 25%; position: absolute;">
<ui:GroupBox name="hearts" style="height: 90%; width: 80%; left: 10%; right: 10%; top: 5%; bottom: 5%; margin-left: 0; margin-right: 0; margin-top: 0; margin-bottom: 0; padding-left: 0; padding-right: 0; padding-top: 0; padding-bottom: 0;">
<ui:GroupBox name="first-line" class="line" style="width: 100%; height: 50%; top: 0; margin-left: 0; margin-right: 0; margin-top: 0; margin-bottom: 0; padding-left: 0; padding-right: 0; padding-top: 0; padding-bottom: 0;" />
<ui:GroupBox name="second-line" class="line" style="width: 100%; height: 50%; top: 0; margin-left: 0; margin-right: 0; margin-top: 0; margin-bottom: 0; padding-left: 0; padding-right: 0; padding-top: 0; padding-bottom: 0;" />
</ui:GroupBox>
</ui:IMGUIContainer>
</ui:UXML>
10 changes: 10 additions & 0 deletions Assets/Editor/Life/UI_LifeBar.uxml.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions Assets/Editor/Life/lifebar.uss
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.line {
padding-left: 1%;
padding-right: 1%;
padding-top: 1%;
padding-bottom: 1%;
flex-direction: row;
align-items: stretch;
}

.heart {
width: 10%;
height: 100%;
}
11 changes: 11 additions & 0 deletions Assets/Editor/Life/lifebar.uss.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Assets/Sprites/UI/Life.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added Assets/Sprites/UI/Life/heart1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
123 changes: 123 additions & 0 deletions Assets/Sprites/UI/Life/heart1.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added Assets/Sprites/UI/Life/heart2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
123 changes: 123 additions & 0 deletions Assets/Sprites/UI/Life/heart2.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added Assets/Sprites/UI/Life/heart3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit eef7d2c

Please sign in to comment.