1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 12:45:09 +08:00

Merge pull request #34 from peppy/general-fixes

General fixes
This commit is contained in:
Dean Herbert 2016-09-24 15:46:11 +09:00 committed by GitHub
commit 1705914093
6 changed files with 86 additions and 90 deletions

@ -1 +1 @@
Subproject commit 6357711a41aaaeecfb8a60c09c5d5cc3c01d1778
Subproject commit 05c40c281741f81ea09f05fce9a1b22c7589dc8e

@ -1 +1 @@
Subproject commit 7ad9b5fcb00d5886792314847f88cee082421a4b
Subproject commit 5cc6e0a311145a9871fb90d0d91226f3858bdce4

View File

@ -76,21 +76,21 @@ namespace osu.Game.GameModes.Menu
backButton = new Button(@"back", @"back", FontAwesome.fa_osu_left_o, new Color4(51, 58, 94, 255), onBack, -wedge_width, Key.Escape),
iconFacade = new Container //need a container to make the osu! icon flow properly.
{
Size = new Vector2(0, button_area_height)
}
Size = new Vector2(0, button_area_height)
}
},
CentreTarget = iconFacade
}
}
},
osuLogo = new OsuLogo(onOsuLogo)
{
Origin = Anchor.Centre,
Anchor = Anchor.Centre
}
osuLogo = new OsuLogo(onOsuLogo)
{
Origin = Anchor.Centre,
Anchor = Anchor.Centre
}
};
buttonFlow.Position = new Vector2(wedge_width * 2 - (button_width + osuLogo.SizeForFlow / 4), 0);
buttonFlow.Position = new Vector2(wedge_width * 2 - (button_width + osuLogo.SizeForFlow / 4), 0);
buttonsPlay.Add((Button)buttonFlow.Add(new Button(@"solo", @"freeplay", FontAwesome.user, new Color4(102, 68, 204, 255), onSolo, wedge_width, Key.P)));
buttonsPlay.Add((Button)buttonFlow.Add(new Button(@"multi", @"multiplayer", FontAwesome.users, new Color4(94, 63, 186, 255), onMulti, 0, Key.M)));
@ -289,43 +289,43 @@ namespace osu.Game.GameModes.Menu
{
base.Load();
Sprite ripple;
Sprite ripple;
Children = new Drawable[]
{
logoBounceContainer = new AutoSizeContainer
{
Children = new Drawable[]
{
logo = new Sprite()
{
Children = new Drawable[]
{
logoBounceContainer = new AutoSizeContainer
{
Children = new Drawable[]
{
logo = new Sprite()
{
Texture = Game.Textures.Get(@"menu-osu"),
Anchor = Anchor.Centre,
Origin = Anchor.Centre
},
ripple = new Sprite()
{
Origin = Anchor.Centre
},
ripple = new Sprite()
{
Texture = Game.Textures.Get(@"menu-osu"),
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Alpha = 0.4f
},
vis = new MenuVisualisation
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Size = logo.Size,
Additive = true,
Alpha = 0.2f,
}
}
}
};
Origin = Anchor.Centre,
Alpha = 0.4f
},
vis = new MenuVisualisation
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Size = logo.Size,
Additive = true,
Alpha = 0.2f,
}
}
}
};
ripple.ScaleTo(1.1f, 500);
ripple.FadeOut(500);
ripple.Loop(300);
ripple.ScaleTo(1.1f, 500);
ripple.FadeOut(500);
ripple.Loop(300);
}
public OsuLogo(Action action)
@ -423,40 +423,46 @@ namespace osu.Game.GameModes.Menu
this.text = text;
}
public override void Load()
{
base.Load();
Alpha = 0;
public override void Load()
{
base.Load();
Alpha = 0;
Children = new Drawable[]
{
box = new WedgedBox(new Vector2(button_width + Math.Abs(extraWidth), button_area_height), wedge_width)
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Colour = colour,
Scale = new Vector2(0, 1)
},
iconText = new AutoSizeContainer
{
Position = new Vector2(extraWidth / 2, 0),
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Children = new Drawable[]
{
icon = new TextAwesome(symbol, 40, Vector2.Zero),
new SpriteText
{
Direction = FlowDirection.HorizontalOnly,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Position = new Vector2(0, 25),
Text = text
}
}
}
};
}
Children = new Drawable[]
{
box = new WedgedBox(new Vector2(button_width + Math.Abs(extraWidth), button_area_height), wedge_width)
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Colour = colour,
Scale = new Vector2(0, 1)
},
iconText = new AutoSizeContainer
{
Position = new Vector2(extraWidth / 2, 0),
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Children = new Drawable[]
{
icon = new TextAwesome
{
Anchor = Anchor.Centre,
TextSize = 40,
Position = new Vector2(0, 0),
Icon = symbol
},
new SpriteText
{
Direction = FlowDirection.HorizontalOnly,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Position = new Vector2(0, 35),
Text = text
}
}
}
};
}
protected override bool OnHover(InputState state)
{

View File

@ -26,18 +26,6 @@ namespace osu.Game.GameModes.Menu
Children = new Drawable[]
{
new ButtonSystem(),
new TextBox
{
Text = @"The quick brown fox jumped over the lazy dog.",
Position = new Vector2(50, 50),
Size = new Vector2(300, 20)
},
new SpriteText
{
Text = @"The quick brown fox jumped over the lazy dog.",
Position = new Vector2(50, 80),
Size = new Vector2(300, 20)
}
};
}
}

View File

@ -28,11 +28,9 @@ namespace osu.Game.Graphics
}
}
internal TextAwesome(FontAwesome icon = FontAwesome.circle, float size = 10, Vector2? position = null)
: base(null)
public TextAwesome()
{
Icon = icon;
Origin = osu.Framework.Graphics.Anchor.Centre;
Origin = Framework.Graphics.Anchor.Centre;
}
}

View File

@ -37,7 +37,11 @@ namespace osu.Game
base.Load();
//this completely overrides the framework default. will need to change once we make a proper FontStore.
Fonts = new TextureStore(new GlyphStore(Resources, @"Fonts/Exo2.0-Regular")) { ScaleAdjust = 0.01f };
Fonts = new TextureStore() { ScaleAdjust = 0.01f };
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Exo2.0-Regular"));
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/FontAwesome"));
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/osuFont"));
API = new APIAccess()
{