Responsive UI for MainMenu & LoadingScreen
Convert MainMenu and LoadingScreen UXML/USS to responsive layouts (percent-based sizing, media queries for wide/tall screens), adjust spacing, fonts and colors, and refine spaceship icon and button styles. Update MainMenu and LoadingScreen controllers to force the root TemplateContainer to occupy the full screen. Add Assets/Resources.meta. Update metadata and LFS object IDs for several Unity assets (ReflectionProbe-0.exr.meta importer fields and AssetOrigin, Komikax font LFS oid, Loading.unity, DefaultVolumeProfile.asset, and project settings hashes) to reflect import/serialization changes.
This commit is contained in:
@@ -1,11 +1,20 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c2a0559c8ef49784ab28a89aa237f6fc
|
||||
timeCreated: 1528652846
|
||||
licenseType: Store
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Scenes/Scenes Data/Mansion Demo (point and
|
||||
click)/ReflectionProbe-0.exr
|
||||
uploadId: 814740
|
||||
TextureImporter:
|
||||
fileIDToRecycleName:
|
||||
8900000: generatedCubemap
|
||||
serializedVersion: 4
|
||||
internalIDToNameTable:
|
||||
- first:
|
||||
89: 8900000
|
||||
second: generatedCubemap
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
@@ -22,7 +31,12 @@ TextureImporter:
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 1
|
||||
@@ -45,39 +59,96 @@ TextureImporter:
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 2
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- buildTarget: DefaultTexturePlatform
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 100
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 100
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 1
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 100
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 1
|
||||
- serializedVersion: 4
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 100
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 1
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
spritePackingTag:
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Scenes/Scenes Data/Mansion Demo (point and
|
||||
click)/ReflectionProbe-0.exr
|
||||
uploadId: 814740
|
||||
|
||||
Binary file not shown.
@@ -1,47 +1,68 @@
|
||||
/* Contenedor Principal responsivo */
|
||||
/* === Base (16:9, ej. 1920x1080) === */
|
||||
.loading-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
flex-grow: 1;
|
||||
background-color: #000000;
|
||||
background-color: rgb(0, 0, 0);
|
||||
flex-direction: row;
|
||||
align-items: flex-end;
|
||||
justify-content: flex-end;
|
||||
position: relative;
|
||||
padding-right: 5%;
|
||||
padding-bottom: 5%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.spaceship-icon {
|
||||
width: 10%;
|
||||
min-width: 100px;
|
||||
max-width: 200px;
|
||||
aspect-ratio: 1;
|
||||
margin-right: 3%;
|
||||
margin-bottom: 0;
|
||||
-unity-background-scale-mode: scale-to-fit;
|
||||
}
|
||||
|
||||
/* Texto de Carga */
|
||||
.loading-text {
|
||||
font-size: 50px;
|
||||
color: #ffffff;
|
||||
color: rgb(255, 255, 255);
|
||||
-unity-font-style: bold;
|
||||
margin-right: 40px;
|
||||
margin-bottom: 40px;
|
||||
|
||||
/* 1. Hacemos la caja más ancha para que quepa "CARGANDO..." con la fuente Komika */
|
||||
width: 350px;
|
||||
|
||||
/* 2. Anclamos el texto a la izquierda de la caja */
|
||||
-unity-text-align: middle-left;
|
||||
|
||||
/* 3. Evitamos estrictamente que el texto salte a la siguiente línea */
|
||||
white-space: nowrap;
|
||||
-unity-text-align: middle-left;
|
||||
white-space: nowrap;
|
||||
width: 280px;
|
||||
margin-right: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* Contenedor de la Nave */
|
||||
.spaceship-icon {
|
||||
/* 1. Quitamos position: absolute para que respete el flujo y baje a la esquina */
|
||||
position: relative;
|
||||
|
||||
/* 2. Tamaño ajustado */
|
||||
width: 250px;
|
||||
height: 250px;
|
||||
|
||||
/* 3. Márgenes para alinearla con el texto (mismo margin-left que el texto) */
|
||||
margin-left: 40px;
|
||||
|
||||
/* 4. Un pequeño margen abajo para que no pegue con las letras */
|
||||
margin-bottom: -20px;
|
||||
|
||||
/* Ajuste de imagen */
|
||||
-unity-background-scale-mode: scale-to-fit;
|
||||
}
|
||||
/* === Responsive: 19:9 (ultra ancho, ej. 2280x1080, 3040x1440) === */
|
||||
@media (min-width: 2200px) {
|
||||
.loading-container {
|
||||
padding-right: 4.5%;
|
||||
padding-bottom: 5%;
|
||||
}
|
||||
|
||||
.spaceship-icon {
|
||||
width: 9%;
|
||||
max-width: 260px;
|
||||
}
|
||||
|
||||
.loading-text {
|
||||
font-size: 65px;
|
||||
width: 360px;
|
||||
}
|
||||
}
|
||||
|
||||
/* === Responsive: 16:10 (ej. 1920x1200, 2560x1600) === */
|
||||
@media (min-height: 1150px) and (max-width: 2199px) {
|
||||
.loading-container {
|
||||
padding-right: 5%;
|
||||
padding-bottom: 5.5%;
|
||||
}
|
||||
|
||||
.spaceship-icon {
|
||||
width: 10%;
|
||||
max-width: 215px;
|
||||
}
|
||||
|
||||
.loading-text {
|
||||
font-size: 52px;
|
||||
width: 290px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<ui:UXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="False">
|
||||
<Style src="project://database/Assets/Game/Menus/LoadingScreen/LoadingScreen.uss?fileID=7433441132597879392&guid=2338a47a6d4bdf04fb16da5ab852dee3&type=3#LoadingScreen"/>
|
||||
<ui:VisualElement name="Container" class="loading-container" style="aspect-ratio: 1.777778;">
|
||||
<ui:VisualElement name="Container" class="loading-container">
|
||||
<ui:VisualElement name="Spaceship" class="spaceship-icon"/>
|
||||
<ui:Label text="Cargando" name="LoadingText" class="loading-text" style="-unity-font-definition: url("project://database/Assets/Game/Menus/Fonts/KOMIKAX_.ttf?fileID=12800000&guid=afbd8b3e208400c4ebf47631612ef61f&type=3#KOMIKAX_");"/>
|
||||
</ui:VisualElement>
|
||||
|
||||
@@ -20,6 +20,11 @@ public class LoadingScreenController : MonoBehaviour
|
||||
_doc = GetComponent<UIDocument>();
|
||||
var root = _doc.rootVisualElement;
|
||||
|
||||
// Forzar que el TemplateContainer raíz ocupe toda la pantalla
|
||||
root.style.flexGrow = 1;
|
||||
root.style.width = new Length(100, LengthUnit.Percent);
|
||||
root.style.height = new Length(100, LengthUnit.Percent);
|
||||
|
||||
_loadingText = root.Q<Label>("LoadingText");
|
||||
_spaceship = root.Q<VisualElement>("Spaceship");
|
||||
|
||||
|
||||
@@ -1,54 +1,110 @@
|
||||
/* 1. Fondo y Contenedor Principal */
|
||||
.main-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
flex-grow: 1;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #2b0057;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
background-color: rgb(43, 0, 87);
|
||||
overflow: hidden;
|
||||
padding-left: 6%;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
/* 2. Título "Loco" */
|
||||
.game-title {
|
||||
font-size: 120px;
|
||||
color: #ffffff;
|
||||
color: rgb(255, 255, 255);
|
||||
-unity-font-style: bold;
|
||||
text-shadow: 5px 5px 0px #000000;
|
||||
margin-bottom: 50px;
|
||||
rotate: -5deg;
|
||||
text-shadow: 5px 5px 0 rgb(0, 0, 0);
|
||||
margin-bottom: 40px;
|
||||
rotate: -5deg;
|
||||
-unity-text-align: upper-left;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
/* 3. Botones Base */
|
||||
.menu-button {
|
||||
width: 300px;
|
||||
width: 20%;
|
||||
min-width: 220px;
|
||||
height: 80px;
|
||||
margin: 15px;
|
||||
background-color: #ffffff;
|
||||
border-radius: 40px;
|
||||
margin-top: 12px;
|
||||
margin-bottom: 12px;
|
||||
background-color: rgb(255, 255, 255);
|
||||
border-radius: 40px;
|
||||
border-width: 6px;
|
||||
border-color: #000000;
|
||||
font-size: 40px;
|
||||
border-color: rgb(0, 0, 0);
|
||||
font-size: 30px;
|
||||
-unity-font-style: bold;
|
||||
color: #000000;
|
||||
color: rgb(0, 0, 0);
|
||||
transition-property: scale, rotate, background-color;
|
||||
transition-duration: 0.2s;
|
||||
transition-timing-function: ease-out-back;
|
||||
transition-timing-function: ease-out-back;
|
||||
align-self: flex-start;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
-unity-text-align: middle-center;
|
||||
}
|
||||
|
||||
/* 4. Estado Hover */
|
||||
.menu-button:hover {
|
||||
scale: 1.1 1.1;
|
||||
rotate: 3deg;
|
||||
background-color: #ffec00;
|
||||
color: #2b0057;
|
||||
scale: 1.1 1.1;
|
||||
rotate: 3deg;
|
||||
background-color: rgb(255, 236, 0);
|
||||
color: rgb(43, 0, 87);
|
||||
}
|
||||
|
||||
/* 5. Estado Pressed */
|
||||
.menu-button:active {
|
||||
scale: 0.95 0.95;
|
||||
background-color: #ff8800;
|
||||
scale: 0.95 0.95;
|
||||
background-color: rgb(255, 136, 0);
|
||||
}
|
||||
|
||||
/* Estilo botón Salir */
|
||||
.button-exit { border-color: #ff0044; }
|
||||
.button-exit:hover { background-color: #ffcccc; }
|
||||
.button-exit {
|
||||
border-color: rgb(255, 0, 68);
|
||||
}
|
||||
|
||||
.button-exit:hover {
|
||||
background-color: rgb(255, 204, 204);
|
||||
}
|
||||
|
||||
/* === Responsive: 19:9 (ultra ancho, ej. 2280x1080, 3040x1440) === */
|
||||
@media (min-width: 2200px) {
|
||||
.game-title {
|
||||
font-size: 150px;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
.menu-button {
|
||||
width: 18%;
|
||||
min-width: 280px;
|
||||
height: 95px;
|
||||
font-size: 36px;
|
||||
border-radius: 48px;
|
||||
margin-top: 15px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.main-container {
|
||||
padding-left: 5%;
|
||||
}
|
||||
}
|
||||
|
||||
/* === Responsive: 16:10 (ej. 1920x1200, 2560x1600) === */
|
||||
@media (min-height: 1150px) and (max-width: 2199px) {
|
||||
.game-title {
|
||||
font-size: 125px;
|
||||
margin-bottom: 45px;
|
||||
}
|
||||
|
||||
.menu-button {
|
||||
width: 20%;
|
||||
min-width: 230px;
|
||||
height: 85px;
|
||||
font-size: 32px;
|
||||
border-radius: 42px;
|
||||
margin-top: 14px;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.main-container {
|
||||
padding-left: 6%;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<ui:UXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="False">
|
||||
<Style src="project://database/Assets/Game/Menus/MainMenu/MainMenu.uss?fileID=7433441132597879392&guid=01b499cb526398648b8a68e04b25779e&type=3#MainMenu"/>
|
||||
<ui:VisualElement name="Container" class="main-container" style="aspect-ratio: 1.777778;">
|
||||
<ui:Label text="FUERA DE ESCALA!" name="Title" class="game-title" style="-unity-font-definition: url("project://database/Assets/Game/Menus/Fonts/KOMIKAX_.ttf?fileID=12800000&guid=afbd8b3e208400c4ebf47631612ef61f&type=3#KOMIKAX_"); -unity-text-outline-width: 0; left: auto; top: auto; -unity-text-align: upper-center; transform-origin: center; translate: -500px -103px;"/>
|
||||
<ui:VisualElement name="ButtonPanel" class="button-panel" style="translate: -503px 0;">
|
||||
<ui:Button text="JUGAR" name="BtnPlay" class="menu-button" style="-unity-font-definition: url("project://database/Assets/Game/Menus/Fonts/KOMIKAX_.ttf?fileID=12800000&guid=afbd8b3e208400c4ebf47631612ef61f&type=3#KOMIKAX_"); font-size: 30px; align-self: center; align-content: center; justify-content: center; align-items: center; -unity-text-align: middle-center;"/>
|
||||
<ui:Button text="AJUSTES" name="BtnSettings" class="menu-button" style="-unity-font-definition: url("project://database/Assets/Game/Menus/Fonts/KOMIKAX_.ttf?fileID=12800000&guid=afbd8b3e208400c4ebf47631612ef61f&type=3#KOMIKAX_"); font-size: 30px; align-self: center; align-items: center; justify-content: center; align-content: center; -unity-text-align: middle-center;"/>
|
||||
<ui:Button text="SALIR" name="BtnExit" class="menu-button button-exit" style="-unity-font-definition: url("project://database/Assets/Game/Menus/Fonts/KOMIKAX_.ttf?fileID=12800000&guid=afbd8b3e208400c4ebf47631612ef61f&type=3#KOMIKAX_"); font-size: 30px; align-items: center; align-self: center; align-content: center; justify-content: center; -unity-text-align: middle-center;"/>
|
||||
<ui:VisualElement name="Container" class="main-container">
|
||||
<ui:Label text="FUERA DE ESCALA!" name="Title" class="game-title" style="-unity-font-definition: url("project://database/Assets/Game/Menus/Fonts/KOMIKAX_.ttf?fileID=12800000&guid=afbd8b3e208400c4ebf47631612ef61f&type=3#KOMIKAX_"); -unity-text-outline-width: 0; -unity-text-align: upper-center; transform-origin: center;"/>
|
||||
<ui:VisualElement name="ButtonPanel" class="button-panel">
|
||||
<ui:Button text="JUGAR" name="BtnPlay" class="menu-button" style="-unity-font-definition: url("project://database/Assets/Game/Menus/Fonts/KOMIKAX_.ttf?fileID=12800000&guid=afbd8b3e208400c4ebf47631612ef61f&type=3#KOMIKAX_"); font-size: 30px;"/>
|
||||
<ui:Button text="AJUSTES" name="BtnSettings" class="menu-button" style="-unity-font-definition: url("project://database/Assets/Game/Menus/Fonts/KOMIKAX_.ttf?fileID=12800000&guid=afbd8b3e208400c4ebf47631612ef61f&type=3#KOMIKAX_"); font-size: 30px;"/>
|
||||
<ui:Button text="SALIR" name="BtnExit" class="menu-button button-exit" style="-unity-font-definition: url("project://database/Assets/Game/Menus/Fonts/KOMIKAX_.ttf?fileID=12800000&guid=afbd8b3e208400c4ebf47631612ef61f&type=3#KOMIKAX_"); font-size: 30px;"/>
|
||||
</ui:VisualElement>
|
||||
</ui:VisualElement>
|
||||
</ui:UXML>
|
||||
|
||||
@@ -19,6 +19,11 @@ public class MainMenuController : MonoBehaviour
|
||||
_doc = GetComponent<UIDocument>();
|
||||
var root = _doc.rootVisualElement;
|
||||
|
||||
// Forzar que el TemplateContainer raíz ocupe toda la pantalla
|
||||
root.style.flexGrow = 1;
|
||||
root.style.width = new Length(100, LengthUnit.Percent);
|
||||
root.style.height = new Length(100, LengthUnit.Percent);
|
||||
|
||||
_audioSource = gameObject.AddComponent<AudioSource>();
|
||||
|
||||
_playButton = root.Q<Button>("BtnPlay");
|
||||
|
||||
8
Assets/Resources.meta
Normal file
8
Assets/Resources.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 789c120944a5a5d41b1a973019d36cf9
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Scenes/Loading.unity
LFS
BIN
Assets/Scenes/Loading.unity
LFS
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:14c6c471f3775d882726e9eb23c3356f27d31044f743be6755e09ac85c9a6a00
|
||||
size 25375
|
||||
oid sha256:e061edd3034c76a8d699a6b2402c3880e49bb760675f5b4d89da3aa9404fff72
|
||||
size 25528
|
||||
|
||||
Reference in New Issue
Block a user