mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-25 22:17:59 +07:00
String overload for mod options
This commit is contained in:
parent
83d15ce65e
commit
051a41e86d
@ -246,6 +246,11 @@ public class SettingsMenuDialog extends BaseDialog{
|
||||
return out.toString();
|
||||
}
|
||||
|
||||
/** Adds a custom settings category, with the icon being the specified region. */
|
||||
public void addCategory(String name, @Nullable String region, Cons<SettingsTable> builder){
|
||||
categories.add(new SettingsCategory(name, region == null ? null : new TextureRegionDrawable(atlas.find(region)), builder));
|
||||
}
|
||||
|
||||
/** Adds a custom settings category, for use in mods. The specified consumer should add all relevant mod settings to the table. */
|
||||
public void addCategory(String name, @Nullable Drawable icon, Cons<SettingsTable> builder){
|
||||
categories.add(new SettingsCategory(name, icon, builder));
|
||||
@ -253,7 +258,7 @@ public class SettingsMenuDialog extends BaseDialog{
|
||||
|
||||
/** Adds a custom settings category, for use in mods. The specified consumer should add all relevant mod settings to the table. */
|
||||
public void addCategory(String name, Cons<SettingsTable> builder){
|
||||
addCategory(name, null, builder);
|
||||
addCategory(name, (Drawable)null, builder);
|
||||
}
|
||||
|
||||
void rebuildMenu(){
|
||||
|
Loading…
Reference in New Issue
Block a user