fix ui layout add progressBar
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
.panel {
|
||||
-unity-background-image-tint-color: rgba(2, 2, 2, 0.64);
|
||||
background-color: rgba(0, 0, 0, 0.75);
|
||||
align-items: auto;
|
||||
height: 100px;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
.container
|
||||
{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
height:50px;
|
||||
}
|
||||
|
||||
.player-image{
|
||||
flex-grow: 1;
|
||||
height:50px;
|
||||
max-width:40px;
|
||||
background-image: url("project://database/Assets/Characters/pics/Sophie.png?fileID=2800000&guid=4999eb6bfdcacae48a7ed2020bd489d0&type=3#Sophie");
|
||||
}
|
||||
|
||||
.panel {
|
||||
flex-grow: 2;
|
||||
-unity-background-image-tint-color: rgba(2, 2, 2, 0.64);
|
||||
background-color: rgba(0, 0, 0, 0.75);
|
||||
align-items: auto;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.progress-bar-container {
|
||||
width: 100px;
|
||||
height: 7px;
|
||||
background-color: rgba(255, 255, 255, 0.3);
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.progress-bar-fill {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
background-color: #00FF00;
|
||||
border-radius: 10px 0 0 10px; /* Rounded corners on the left side */
|
||||
}
|
||||
@@ -1,6 +1,11 @@
|
||||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="False">
|
||||
<Style src="project://database/Assets/UI/inGameGud.uss?fileID=7433441132597879392&guid=b1b33e86ffa27d840968609d368bc1ac&type=3#inGameGud" />
|
||||
<ui:VisualElement class="panel" style="flex-grow: 1; height: 50px; margin-bottom: 0; align-self: auto; justify-content: space-between; align-items: auto; max-height: 50px;">
|
||||
<ui:VisualElement name="CharacterImage" style="flex-grow: 1; align-items: auto; align-self: flex-start; background-image: url("project://database/Assets/Characters/pics/Sophie.png?fileID=2800000&guid=4999eb6bfdcacae48a7ed2020bd489d0&type=3#Sophie"); background-color: rgba(255, 255, 255, 0); justify-content: flex-end; max-width: none; width: 43px;" />
|
||||
<Style src="project://database/Assets/UI/inGameHud.uss?fileID=7433441132597879392&guid=b1b33e86ffa27d840968609d368bc1ac&type=3#inGameHud" />
|
||||
<ui:VisualElement class="container">
|
||||
<ui:VisualElement name="CharacterImage" class="player-image" style="background-image: url("project://database/Assets/Characters/pics/Sophie.png?fileID=2800000&guid=4999eb6bfdcacae48a7ed2020bd489d0&type=3#Sophie");" />
|
||||
<ui:VisualElement name="Panel" class="panel">
|
||||
<ui:VisualElement name="VisualElement" class="progress-bar-container">
|
||||
<ui:VisualElement class="progress-bar-fill" name="progressFill" />
|
||||
</ui:VisualElement>
|
||||
</ui:VisualElement>
|
||||
</ui:VisualElement>
|
||||
</ui:UXML>
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 755fc3f2b04b5014794dec9f2787b86e
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0}
|
||||
disableValidation: 0
|
||||
Reference in New Issue
Block a user