mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Add GetTexture method to ISkinSource
Used to shortcut lookup checks without potentially expensive drawable creation overhead.
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
using System;
|
||||
using osu.Framework.Audio.Sample;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
using OpenTK.Graphics;
|
||||
|
||||
@ -21,6 +22,8 @@ namespace osu.Game.Skinning
|
||||
|
||||
public abstract SampleChannel GetSample(string sampleName);
|
||||
|
||||
public abstract Texture GetTexture(string componentName);
|
||||
|
||||
public virtual Color4? GetComboColour(IHasComboIndex comboObject) =>
|
||||
Configuration.ComboColours.Count == 0 ? (Color4?)null : Configuration.ComboColours[comboObject.ComboIndex % Configuration.ComboColours.Count];
|
||||
|
||||
|
Reference in New Issue
Block a user