mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-04 15:27:19 +07:00
String overload for mod options
This commit is contained in:
@ -246,6 +246,11 @@ public class SettingsMenuDialog extends BaseDialog{
|
|||||||
return out.toString();
|
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. */
|
/** 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){
|
public void addCategory(String name, @Nullable Drawable icon, Cons<SettingsTable> builder){
|
||||||
categories.add(new SettingsCategory(name, icon, 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. */
|
/** 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){
|
public void addCategory(String name, Cons<SettingsTable> builder){
|
||||||
addCategory(name, null, builder);
|
addCategory(name, (Drawable)null, builder);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rebuildMenu(){
|
void rebuildMenu(){
|
||||||
|
Reference in New Issue
Block a user