// This is for minimizing the sidebar private void logo_Click(object sender, EventArgs e) { // Hiding and showing specific images logo.Visible = false; pictureBox2.Visible = true; // Setting the size from large to minimized if (sidemenu.Width == 50) { // The animation stuff sidemenu.Visible = false; sidemenu.Width = 251; PanelAnimation.ShowSync(sidemenu); LogoAnimation.ShowSync(logo); } // Redundancy that will NEVER be called, but is here incase of a weird glitch else { // The animation stuff LogoAnimation.Hide(logo); sidemenu.Visible = false; sidemenu.Width = 50; PanelAnimation.ShowSync(sidemenu); } }
private void load(LargeTextureStore textures) { LogoAnimation anim2; Add(anim2 = new LogoAnimation { RelativeSizeAxes = Axes.Both, FillMode = FillMode.Fit, Texture = textures.Get("Intro/Triangles/logo-highlight"), Colour = Colour4.White, }); LogoAnimation anim; Add(anim = new LogoAnimation { RelativeSizeAxes = Axes.Both, FillMode = FillMode.Fit, Texture = textures.Get("Intro/Triangles/logo-background"), Colour = OsuColour.Gray(0.6f), }); AddSliderStep("Progress", 0f, 1f, 0f, newValue => { anim2.AnimationProgress = newValue; anim.AnimationProgress = newValue; }); }