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:
Robii Aragon
2026-02-25 04:34:26 -08:00
parent 0e961ba4b1
commit 7d62bba411
13 changed files with 265 additions and 99 deletions

View File

@@ -1,11 +1,20 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: c2a0559c8ef49784ab28a89aa237f6fc guid: c2a0559c8ef49784ab28a89aa237f6fc
timeCreated: 1528652846 AssetOrigin:
licenseType: Store 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: TextureImporter:
fileIDToRecycleName: internalIDToNameTable:
8900000: generatedCubemap - first:
serializedVersion: 4 89: 8900000
second: generatedCubemap
externalObjects: {}
serializedVersion: 13
mipmaps: mipmaps:
mipMapMode: 0 mipMapMode: 0
enableMipMap: 1 enableMipMap: 1
@@ -22,7 +31,12 @@ TextureImporter:
externalNormalMap: 0 externalNormalMap: 0
heightScale: 0.25 heightScale: 0.25
normalMapFilter: 0 normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0 isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0 grayScaleToAlpha: 0
generateCubemap: 6 generateCubemap: 6
cubemapConvolution: 1 cubemapConvolution: 1
@@ -45,39 +59,96 @@ TextureImporter:
spriteMeshType: 1 spriteMeshType: 1
alignment: 0 alignment: 0
spritePivot: {x: 0.5, y: 0.5} spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100 spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1 alphaUsage: 1
alphaIsTransparency: 0 alphaIsTransparency: 0
spriteTessellationDetail: -1 spriteTessellationDetail: -1
textureType: 0 textureType: 0
textureShape: 2 textureShape: 2
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0 maxTextureSizeSet: 0
compressionQualitySet: 0 compressionQualitySet: 0
textureFormatSet: 0 textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings: platformSettings:
- buildTarget: DefaultTexturePlatform - serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048 maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1 textureFormat: -1
textureCompression: 1 textureCompression: 1
compressionQuality: 100 compressionQuality: 100
crunchedCompression: 0 crunchedCompression: 0
allowsAlphaSplitting: 0 allowsAlphaSplitting: 0
overridden: 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: spriteSheet:
serializedVersion: 2 serializedVersion: 2
sprites: [] sprites: []
outline: [] outline: []
customData:
physicsShape: [] physicsShape: []
spritePackingTag: bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: 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.

View File

@@ -1,47 +1,68 @@
/* Contenedor Principal responsivo */ /* === Base (16:9, ej. 1920x1080) === */
.loading-container { .loading-container {
width: 100%;
height: 100%;
flex-grow: 1; flex-grow: 1;
background-color: #000000; background-color: rgb(0, 0, 0);
flex-direction: row;
align-items: flex-end; align-items: flex-end;
justify-content: flex-end; justify-content: flex-end;
position: relative; padding-right: 5%;
padding-bottom: 5%;
overflow: hidden;
} }
/* Texto de Carga */
.loading-text {
font-size: 50px;
color: #ffffff;
-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;
}
/* Contenedor de la Nave */
.spaceship-icon { .spaceship-icon {
/* 1. Quitamos position: absolute para que respete el flujo y baje a la esquina */ width: 10%;
position: relative; min-width: 100px;
max-width: 200px;
/* 2. Tamaño ajustado */ aspect-ratio: 1;
width: 250px; margin-right: 3%;
height: 250px; margin-bottom: 0;
/* 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; -unity-background-scale-mode: scale-to-fit;
} }
.loading-text {
font-size: 50px;
color: rgb(255, 255, 255);
-unity-font-style: bold;
-unity-text-align: middle-left;
white-space: nowrap;
width: 280px;
margin-right: 0;
margin-bottom: 0;
}
/* === 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;
}
}

View File

@@ -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"> <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&amp;guid=2338a47a6d4bdf04fb16da5ab852dee3&amp;type=3#LoadingScreen"/> <Style src="project://database/Assets/Game/Menus/LoadingScreen/LoadingScreen.uss?fileID=7433441132597879392&amp;guid=2338a47a6d4bdf04fb16da5ab852dee3&amp;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:VisualElement name="Spaceship" class="spaceship-icon"/>
<ui:Label text="Cargando" name="LoadingText" class="loading-text" style="-unity-font-definition: url(&quot;project://database/Assets/Game/Menus/Fonts/KOMIKAX_.ttf?fileID=12800000&amp;guid=afbd8b3e208400c4ebf47631612ef61f&amp;type=3#KOMIKAX_&quot;);"/> <ui:Label text="Cargando" name="LoadingText" class="loading-text" style="-unity-font-definition: url(&quot;project://database/Assets/Game/Menus/Fonts/KOMIKAX_.ttf?fileID=12800000&amp;guid=afbd8b3e208400c4ebf47631612ef61f&amp;type=3#KOMIKAX_&quot;);"/>
</ui:VisualElement> </ui:VisualElement>

View File

@@ -20,6 +20,11 @@ public class LoadingScreenController : MonoBehaviour
_doc = GetComponent<UIDocument>(); _doc = GetComponent<UIDocument>();
var root = _doc.rootVisualElement; 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"); _loadingText = root.Q<Label>("LoadingText");
_spaceship = root.Q<VisualElement>("Spaceship"); _spaceship = root.Q<VisualElement>("Spaceship");

View File

@@ -1,54 +1,110 @@
/* 1. Fondo y Contenedor Principal */
.main-container { .main-container {
width: 100%;
height: 100%;
flex-grow: 1; flex-grow: 1;
align-items: center; flex-direction: column;
align-items: flex-start;
justify-content: center; justify-content: center;
background-color: #2b0057; 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 { .game-title {
font-size: 120px; font-size: 120px;
color: #ffffff; color: rgb(255, 255, 255);
-unity-font-style: bold; -unity-font-style: bold;
text-shadow: 5px 5px 0px #000000; text-shadow: 5px 5px 0 rgb(0, 0, 0);
margin-bottom: 50px; margin-bottom: 40px;
rotate: -5deg; rotate: -5deg;
-unity-text-align: upper-left;
white-space: normal;
} }
/* 3. Botones Base */
.menu-button { .menu-button {
width: 300px; width: 20%;
min-width: 220px;
height: 80px; height: 80px;
margin: 15px; margin-top: 12px;
background-color: #ffffff; margin-bottom: 12px;
background-color: rgb(255, 255, 255);
border-radius: 40px; border-radius: 40px;
border-width: 6px; border-width: 6px;
border-color: #000000; border-color: rgb(0, 0, 0);
font-size: 40px; font-size: 30px;
-unity-font-style: bold; -unity-font-style: bold;
color: #000000; color: rgb(0, 0, 0);
transition-property: scale, rotate, background-color; transition-property: scale, rotate, background-color;
transition-duration: 0.2s; 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 { .menu-button:hover {
scale: 1.1 1.1; scale: 1.1 1.1;
rotate: 3deg; rotate: 3deg;
background-color: #ffec00; background-color: rgb(255, 236, 0);
color: #2b0057; color: rgb(43, 0, 87);
} }
/* 5. Estado Pressed */
.menu-button:active { .menu-button:active {
scale: 0.95 0.95; scale: 0.95 0.95;
background-color: #ff8800; background-color: rgb(255, 136, 0);
} }
/* Estilo botón Salir */ .button-exit {
.button-exit { border-color: #ff0044; } border-color: rgb(255, 0, 68);
.button-exit:hover { background-color: #ffcccc; } }
.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%;
}
}

View File

@@ -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"> <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&amp;guid=01b499cb526398648b8a68e04b25779e&amp;type=3#MainMenu"/> <Style src="project://database/Assets/Game/Menus/MainMenu/MainMenu.uss?fileID=7433441132597879392&amp;guid=01b499cb526398648b8a68e04b25779e&amp;type=3#MainMenu"/>
<ui:VisualElement name="Container" class="main-container" style="aspect-ratio: 1.777778;"> <ui:VisualElement name="Container" class="main-container">
<ui:Label text="FUERA DE&#10;ESCALA!" name="Title" class="game-title" style="-unity-font-definition: url(&quot;project://database/Assets/Game/Menus/Fonts/KOMIKAX_.ttf?fileID=12800000&amp;guid=afbd8b3e208400c4ebf47631612ef61f&amp;type=3#KOMIKAX_&quot;); -unity-text-outline-width: 0; left: auto; top: auto; -unity-text-align: upper-center; transform-origin: center; translate: -500px -103px;"/> <ui:Label text="FUERA DE&#10;ESCALA!" name="Title" class="game-title" style="-unity-font-definition: url(&quot;project://database/Assets/Game/Menus/Fonts/KOMIKAX_.ttf?fileID=12800000&amp;guid=afbd8b3e208400c4ebf47631612ef61f&amp;type=3#KOMIKAX_&quot;); -unity-text-outline-width: 0; -unity-text-align: upper-center; transform-origin: center;"/>
<ui:VisualElement name="ButtonPanel" class="button-panel" style="translate: -503px 0;"> <ui:VisualElement name="ButtonPanel" class="button-panel">
<ui:Button text="JUGAR" name="BtnPlay" class="menu-button" style="-unity-font-definition: url(&quot;project://database/Assets/Game/Menus/Fonts/KOMIKAX_.ttf?fileID=12800000&amp;guid=afbd8b3e208400c4ebf47631612ef61f&amp;type=3#KOMIKAX_&quot;); font-size: 30px; align-self: center; align-content: center; justify-content: center; align-items: center; -unity-text-align: middle-center;"/> <ui:Button text="JUGAR" name="BtnPlay" class="menu-button" style="-unity-font-definition: url(&quot;project://database/Assets/Game/Menus/Fonts/KOMIKAX_.ttf?fileID=12800000&amp;guid=afbd8b3e208400c4ebf47631612ef61f&amp;type=3#KOMIKAX_&quot;); font-size: 30px;"/>
<ui:Button text="AJUSTES" name="BtnSettings" class="menu-button" style="-unity-font-definition: url(&quot;project://database/Assets/Game/Menus/Fonts/KOMIKAX_.ttf?fileID=12800000&amp;guid=afbd8b3e208400c4ebf47631612ef61f&amp;type=3#KOMIKAX_&quot;); font-size: 30px; align-self: center; align-items: center; justify-content: center; align-content: center; -unity-text-align: middle-center;"/> <ui:Button text="AJUSTES" name="BtnSettings" class="menu-button" style="-unity-font-definition: url(&quot;project://database/Assets/Game/Menus/Fonts/KOMIKAX_.ttf?fileID=12800000&amp;guid=afbd8b3e208400c4ebf47631612ef61f&amp;type=3#KOMIKAX_&quot;); font-size: 30px;"/>
<ui:Button text="SALIR" name="BtnExit" class="menu-button button-exit" style="-unity-font-definition: url(&quot;project://database/Assets/Game/Menus/Fonts/KOMIKAX_.ttf?fileID=12800000&amp;guid=afbd8b3e208400c4ebf47631612ef61f&amp;type=3#KOMIKAX_&quot;); font-size: 30px; align-items: center; align-self: center; align-content: center; justify-content: center; -unity-text-align: middle-center;"/> <ui:Button text="SALIR" name="BtnExit" class="menu-button button-exit" style="-unity-font-definition: url(&quot;project://database/Assets/Game/Menus/Fonts/KOMIKAX_.ttf?fileID=12800000&amp;guid=afbd8b3e208400c4ebf47631612ef61f&amp;type=3#KOMIKAX_&quot;); font-size: 30px;"/>
</ui:VisualElement> </ui:VisualElement>
</ui:VisualElement> </ui:VisualElement>
</ui:UXML> </ui:UXML>

View File

@@ -19,6 +19,11 @@ public class MainMenuController : MonoBehaviour
_doc = GetComponent<UIDocument>(); _doc = GetComponent<UIDocument>();
var root = _doc.rootVisualElement; 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>(); _audioSource = gameObject.AddComponent<AudioSource>();
_playButton = root.Q<Button>("BtnPlay"); _playButton = root.Q<Button>("BtnPlay");

8
Assets/Resources.meta Normal file
View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 789c120944a5a5d41b1a973019d36cf9
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:14c6c471f3775d882726e9eb23c3356f27d31044f743be6755e09ac85c9a6a00 oid sha256:e061edd3034c76a8d699a6b2402c3880e49bb760675f5b4d89da3aa9404fff72
size 25375 size 25528