修改UISlider

This commit is contained in:
MuHua-123
2025-04-24 11:53:43 +08:00
parent a5fa5fe56c
commit 1d4c7605f1
29 changed files with 166 additions and 41 deletions
@@ -0,0 +1,97 @@
.window {
position: absolute;
top: auto;
left: auto;
width: 400px;
height: 300px;
background-color: rgba(0, 0, 0, 0);
border-radius: 10px;
padding: 20px;
display: flex;
flex-direction: column;
opacity: 1;
padding-top: 0;
padding-right: 0;
padding-bottom: 0;
padding-left: 0;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.window-top {
justify-content: space-between;
background-color: rgb(44, 62, 80);
border-top-left-radius: 10px;
border-top-right-radius: 10px;
padding-left: 10px;
height: 50px;
flex-direction: row;
flex-shrink: 1;
flex-grow: 0;
align-items: center;
}
.window-title {
font-size: 24px;
color: rgb(236, 240, 241);
margin-bottom: 0;
margin-top: 0;
margin-right: 0;
margin-left: 0;
padding-top: 0;
padding-right: 0;
padding-bottom: 0;
padding-left: 0;
-unity-text-align: middle-left;
}
.window-close-button {
background-color: rgb(231, 76, 60);
color: rgb(236, 240, 241);
border-radius: 5px;
margin-top: 10px;
margin-right: 10px;
margin-bottom: 10px;
margin-left: 10px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
border-bottom-left-radius: 5px;
border-top-width: 2px;
border-right-width: 2px;
border-bottom-width: 2px;
border-left-width: 2px;
border-left-color: rgba(0, 0, 0, 0);
border-right-color: rgba(0, 0, 0, 0);
border-top-color: rgba(0, 0, 0, 0);
border-bottom-color: rgba(0, 0, 0, 0);
height: 30px;
width: 30px;
}
.window-close-button:hover {
background-color: rgb(192, 57, 43);
border-top-width: 2px;
border-right-width: 2px;
border-bottom-width: 2px;
border-left-width: 2px;
border-left-color: rgb(0, 157, 255);
border-right-color: rgb(0, 157, 255);
border-top-color: rgb(0, 157, 255);
border-bottom-color: rgb(0, 157, 255);
}
.window-container {
border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
background-color: rgb(242, 242, 242);
overflow: hidden;
height: 300px;
}
.window-hidden {
display: none;
opacity: 0;
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 71fd1505cc1aa1e4297e4f4534cc0124
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0}
disableValidation: 0
@@ -0,0 +1,10 @@
<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/UI%20Toolkit/Component/Window/Window.uss?fileID=7433441132597879392&amp;guid=71fd1505cc1aa1e4297e4f4534cc0124&amp;type=3#Window" />
<ui:VisualElement name="Window" class="window" style="width: 510px; height: auto;">
<ui:VisualElement name="Top" class="window-top">
<ui:Label text="窗口" name="Title" class="window-title" />
<ui:VisualElement name="Close" class="window-close-button" style="background-image: url(&quot;project://database/Assets/UI%20Toolkit/Assets/Icon/close-fill@1x.png?fileID=2800000&amp;guid=5011cba5253bf9446bf6ccb122f800b6&amp;type=3#close-fill@1x&quot;);" />
</ui:VisualElement>
<ui:VisualElement name="Container" class="window-container" />
</ui:VisualElement>
</ui:UXML>
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: f58c5527cf4cda147b239b37b0afcb85
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}