public override void SetUpSteps() { base.SetUpSteps(); AddStep("add editor overlay", () => { skinEditor?.Expire(); LoadComponentAsync(skinEditor = new SkinEditor(Player), Add); }); }
public override void SetUpSteps() { base.SetUpSteps(); AddStep("reload skin editor", () => { skinEditor?.Expire(); Player.ScaleTo(SkinEditorOverlay.VISIBLE_TARGET_SCALE); LoadComponentAsync(skinEditor = new SkinEditor(Player), Add); }); }
public override void SetUpSteps() { base.SetUpSteps(); AddStep("reload skin editor", () => { skinEditor?.Expire(); Player.ScaleTo(0.4f); LoadComponentAsync(skinEditor = new SkinEditor(Player), Add); }); AddUntilStep("wait for loaded", () => skinEditor.IsLoaded); }
static void Main(string[] args) { bool editing = true; SkinEditor editor = new SkinEditor(); while (editing) { Console.Clear(); editor.displaySkins(); editor.selectEdit(); editor.selectAsset(); editor.replace(); Console.WriteLine("Replacement is finished, Press Q to QUIT "); Console.WriteLine("\n Press any other key to continue."); ConsoleKey key = Console.ReadKey().Key; switch (key) { case ConsoleKey.Q: editing = false; break; } } }
public void TestEditComponentDuringGameplay() { Screens.Select.SongSelect songSelect = null; PushAndConfirm(() => songSelect = new TestPlaySongSelect()); AddUntilStep("wait for song select", () => songSelect.BeatmapSetsLoaded); AddStep("import beatmap", () => BeatmapImportHelper.LoadQuickOszIntoOsu(Game).WaitSafely()); AddUntilStep("wait for selected", () => !Game.Beatmap.IsDefault); SkinEditor skinEditor = null; AddStep("open skin editor", () => { InputManager.PressKey(Key.ControlLeft); InputManager.PressKey(Key.ShiftLeft); InputManager.Key(Key.S); InputManager.ReleaseKey(Key.ControlLeft); InputManager.ReleaseKey(Key.ShiftLeft); }); AddUntilStep("get skin editor", () => (skinEditor = Game.ChildrenOfType <SkinEditor>().FirstOrDefault()) != null); AddStep("Click gameplay scene button", () => { skinEditor.ChildrenOfType <SkinEditorSceneLibrary.SceneButton>().First(b => b.Text == "Gameplay").TriggerClick(); }); AddUntilStep("wait for player", () => { // dismiss any notifications that may appear (ie. muted notification). clickMouseInCentre(); return(Game.ScreenStack.CurrentScreen is Player); }); BarHitErrorMeter hitErrorMeter = null; AddUntilStep("select bar hit error blueprint", () => { var blueprint = skinEditor.ChildrenOfType <SkinBlueprint>().FirstOrDefault(b => b.Item is BarHitErrorMeter); if (blueprint == null) { return(false); } hitErrorMeter = (BarHitErrorMeter)blueprint.Item; skinEditor.SelectedComponents.Clear(); skinEditor.SelectedComponents.Add(blueprint.Item); return(true); }); AddAssert("value is default", () => hitErrorMeter.JudgementLineThickness.IsDefault); AddStep("hover first slider", () => { InputManager.MoveMouseTo( skinEditor.ChildrenOfType <SkinSettingsToolbox>().First() .ChildrenOfType <SettingsSlider <float> >().First() .ChildrenOfType <SliderBar <float> >().First() ); }); AddStep("adjust slider via keyboard", () => InputManager.Key(Key.Left)); AddAssert("value is less than default", () => hitErrorMeter.JudgementLineThickness.Value < hitErrorMeter.JudgementLineThickness.Default); }
/// <summary> /// Edits skin texture. /// </summary> /// <param name="asset">Current Asset</param> private void EditSkin(IAssetData asset) { SkinEditor skinEditor = new SkinEditor(Entry, PackHelper, asset); skinEditor.EditSkinTexture(); }