main page button layout working.

This commit is contained in:
Harrison Deng 2019-03-09 00:26:59 -06:00
parent 16579bd4bf
commit b20ef57991
4 changed files with 41 additions and 33 deletions

Binary file not shown.

View File

@ -39,11 +39,6 @@
The projection matrix.
</summary>
</member>
<member name="P:RecrownedAthenaeum.Camera.Camera3D.TransformationMatrix">
<summary>
The final transformation matrix.
</summary>
</member>
<member name="F:RecrownedAthenaeum.Camera.Camera3D.graphicsDevice">
<summary>
The graphics device used
@ -241,11 +236,6 @@
An object that represents a ninepatch.
</summary>
</member>
<member name="F:RecrownedAthenaeum.SpecialTypes.NinePatch.color">
<summary>
color of 9patch.
</summary>
</member>
<member name="F:RecrownedAthenaeum.SpecialTypes.NinePatch.textureRegion">
<summary>
Dimensions in ninepatch. May also represent position in texture atlas.
@ -262,12 +252,13 @@
<param name="top">Top side.</param>
<param name="textureBounds">The dimensions and potentially the coordinates of the rectangle on an atlas. If left to default of null, will only be set to texture bounds.</param>
</member>
<member name="M:RecrownedAthenaeum.SpecialTypes.NinePatch.Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch,Microsoft.Xna.Framework.Rectangle)">
<member name="M:RecrownedAthenaeum.SpecialTypes.NinePatch.Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch,Microsoft.Xna.Framework.Rectangle,Microsoft.Xna.Framework.Color)">
<summary>
Draws the ninepatch.
</summary>
<param name="spriteBatch">Batch to use.</param>
<param name="destination">Where to the patch.</param>
<param name="color">The color of the patch.</param>
</member>
<member name="M:RecrownedAthenaeum.SpecialTypes.NinePatch.Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch,Microsoft.Xna.Framework.Rectangle,Microsoft.Xna.Framework.Color,System.Single,Microsoft.Xna.Framework.Vector2)">
<summary>
@ -1427,6 +1418,11 @@
Represents text for the UI.
</summary>
</member>
<member name="F:RecrownedAthenaeum.UI.Modular.Modules.Text.centered">
<summary>
Centers the text int bounds.
</summary>
</member>
<member name="F:RecrownedAthenaeum.UI.Modular.Modules.Text.autoWrap">
<summary>
Whether or not to try and wrap text automatically. Meaning will check and attempt to wrap every update.
@ -1502,17 +1498,12 @@
Module for UI layout.
</summary>
</member>
<member name="P:RecrownedAthenaeum.UI.Modular.UIModule.Debugging">
<summary>
Draws rectangle using the bounds of this module.
</summary>
</member>
<member name="F:RecrownedAthenaeum.UI.Modular.UIModule.bounds">
<member name="F:RecrownedAthenaeum.UI.Modular.UIModule.situation">
<summary>
The bounds before factoring in the origin.
</summary>
</member>
<member name="P:RecrownedAthenaeum.UI.Modular.UIModule.ActualBounds">
<member name="P:RecrownedAthenaeum.UI.Modular.UIModule.Boundaries">
<summary>
Bounds of this module (after factoring in the origin).
</summary>
@ -1580,6 +1571,20 @@
Sets the origin to be the center of the bounds.
</summary>
</member>
<member name="M:RecrownedAthenaeum.UI.Modular.UIModule.CenterHorizontally(Microsoft.Xna.Framework.Rectangle)">
<summary>
Centers this module's origin on the horizontal axis relative to the given rectangle.
</summary>
<param name="rectangle">The rectangle to center it in.</param>
<returns>True if possible and false if not.</returns>
</member>
<member name="M:RecrownedAthenaeum.UI.Modular.UIModule.CenterVertically(Microsoft.Xna.Framework.Rectangle)">
<summary>
Center's this module's origin on the vertical axis relative to the given rectangle.
</summary>
<param name="rectangle">The rectangle to center in.</param>
<returns>True if possible.</returns>
</member>
<member name="T:RecrownedAthenaeum.UI.Modular.UIModuleGroup">
<summary>
Contains a group of modules and has its own relative coordinate system.
@ -1728,12 +1733,13 @@
<param name="name">Name of defined color.</param>
<returns>The defined color based on the name given.</returns>
</member>
<member name="M:RecrownedAthenaeum.UI.SkinSystem.ISkin.GetTextureAtlasRegion(System.String)">
<member name="M:RecrownedAthenaeum.UI.SkinSystem.ISkin.GetTextureAtlasRegion(System.String,System.Boolean)">
<summary>
Returns a <see cref="T:RecrownedAthenaeum.SpecialTypes.TextureAtlas.Region"/> with given name of region.
</summary>
<param name="name">Name of region.</param>
<returns>The region corresponding to the name.</returns>
<param name="required">Whether or not the region is required. If true, it will throw an error if the region does not exist while if false, will return null if the region does not exist.</param>
<returns>The region corresponding to the name and may return null depending on if the region exists, and is required.</returns>
</member>
<member name="M:RecrownedAthenaeum.UI.SkinSystem.ISkin.ObtainDefinition``1(System.String)">
<summary>
@ -1765,11 +1771,12 @@
<param name="textureAtlas">The texture atlas to use for this skin.</param>
<param name="cursorTexture">The texture the cursor will be.</param>
</member>
<member name="M:RecrownedAthenaeum.UI.SkinSystem.Skin.GetTextureAtlasRegion(System.String)">
<member name="M:RecrownedAthenaeum.UI.SkinSystem.Skin.GetTextureAtlasRegion(System.String,System.Boolean)">
<summary>
Returns a <see cref="T:RecrownedAthenaeum.SpecialTypes.TextureAtlas.Region"/> with given name of region. Null values acceptable. Will return null if parameter is null.
</summary>
<param name="name">Name of region.</param>
<param name="required">Whether or not this texture is mandatory for the module to work. If true, will throw error on failing to retrieve.</param>
<returns>The region corresponding to the name or null if the requested region doesn't exist.</returns>
</member>
<member name="M:RecrownedAthenaeum.UI.SkinSystem.Skin.GetColor(System.String)">

View File

@ -45,8 +45,8 @@ namespace RhythmBullet.Audio.Visualizer
rectangleRenderer.Begin(true);
for (int i = 0; i < BAR_COUNT; i++)
{
bar.X = (i * (bar.Width + spaceBetweenBars)) + bounds.X;
bar.Y = bounds.Y;
bar.X = (i * (bar.Width + spaceBetweenBars)) + Boundaries.X;
bar.Y = Boundaries.Y;
bar.Height = barValue[i];
rectangleRenderer.Draw(bar.X, bar.Y, bar.Width, bar.Height, color);

View File

@ -37,24 +37,25 @@ namespace RhythmBullet.Screens.MainMenu
public override void ApplySize(int width, int height)
{
base.ApplySize(width, height);
title.Scale = (width - 40) / title.texture.Width;
title.CenterOrigin();
title.bounds.X = width / 2;
title.bounds.Y = height / 2;
title.CenterHorizontally(Boundaries);
title.CenterVertically(Boundaries);
playButton.situation.Width = (int)(0.3f * title.Boundaries.Width);
playButton.situation.Height = (int)(0.05f * title.Boundaries.Width);
playButton.CenterOrigin();
playButton.bounds.Width = (int) (0.3f * title.TrueBounds.Width);
playButton.CenterHorizontally(new Rectangle(0, 0, width, height));
playButton.bounds.Y = title.bounds.X + title.TrueBounds.Height + 30;
playButton.CenterHorizontally(Boundaries);
playButton.situation.Y = (int)playButton.origin.Y + title.Boundaries.Y + title.Boundaries.Height + 30;
quitButton.situation.Width = (int)(0.3f * title.Boundaries.Width);
quitButton.situation.Height = (int)(0.05f * title.Boundaries.Width);
quitButton.CenterOrigin();
quitButton.bounds.Width = (int) (0.3f * title.bounds.Width);
quitButton.bounds.Height = (int) (0.15f * playButton.bounds.Width);
playButton.CenterHorizontally(new Rectangle(0, 0, width, height));
quitButton.bounds.Y = playButton.bounds.X + playButton.bounds.Height + 15;
quitButton.CenterHorizontally(Boundaries);
quitButton.situation.Y = (int)quitButton.origin.Y + playButton.Boundaries.Y + playButton.Boundaries.Height + 15;
base.ApplySize(width, height);
}
public override void Draw(SpriteBatch batch)