maybe it should be like this?

This commit is contained in:
Mark Zharkov committed 2025-02-06 22:42:50 +03:00
1 parent e963ead882
commit f2e85c1347
3 files changed
+21 -21

No files matched your search

@@ -65,7 +65,7 @@ public class EventGuiScriptList extends SubGuiInterface{
if(scroll1.hasSelected()){
container.scripts.add(scroll1.getSelected());
scroll1.selected = -1;
scroll1.selected = -1;
scroll2.selected = -1;
initGui();
}
}
@@ -82,13 +82,13 @@ public class EventGuiScriptList extends SubGuiInterface{
container.scripts.add(script);
}
scroll1.selected = -1;
scroll1.selected = -1;
scroll2.selected = -1;
initGui();
}
if(button.id == 4){
container.scripts.clear();
scroll1.selected = -1;
scroll1.selected = -1;
scroll2.selected = -1;
initGui();
}
if(button.id == 66){
@@ -15,7 +15,7 @@ public class GuiScriptList extends SubGuiInterface{
private GuiCustomScroll scroll2;
private ScriptContainer container;
private List<String> scripts;
public GuiScriptList(List<String> scripts, ScriptContainer container){
this.container = container;
setBackground("menubg.png");
@@ -36,7 +36,7 @@ public class GuiScriptList extends SubGuiInterface{
scroll1.guiTop = guiTop + 14;
this.addScroll(scroll1);
addLabel(new GuiNpcLabel(1, "script.availableScripts", guiLeft + 4, guiTop + 4));
if(scroll2 == null){
scroll2 = new GuiCustomScroll(this,1);
scroll2.setSize(140, 180);
@@ -55,7 +55,7 @@ public class GuiScriptList extends SubGuiInterface{
addButton(new GuiNpcButton(3, guiLeft + 145, guiTop + 90, 55, 20, ">>"));
addButton(new GuiNpcButton(4, guiLeft + 145, guiTop + 112, 55, 20, "<<"));
addButton(new GuiNpcButton(66, guiLeft + 260, guiTop + 194, 60, 20, "gui.done"));
}
@@ -65,16 +65,16 @@ public class GuiScriptList extends SubGuiInterface{
if(scroll1.hasSelected()){
container.scripts.add(scroll1.getSelected());
scroll1.selected = -1;
scroll1.selected = -1;
scroll2.selected = -1;
initGui();
}
}
}
if(button.id == 2){
if(scroll2.hasSelected()){
container.scripts.remove(scroll2.getSelected());
scroll2.selected = -1;
initGui();
}
}
}
if(button.id == 3){
container.scripts.clear();
@@ -82,13 +82,13 @@ public class GuiScriptList extends SubGuiInterface{
container.scripts.add(script);
}
scroll1.selected = -1;
scroll1.selected = -1;
scroll2.selected = -1;
initGui();
}
if(button.id == 4){
container.scripts.clear();
scroll1.selected = -1;
scroll1.selected = -1;
scroll2.selected = -1;
initGui();
}
if(button.id == 66){
@@ -97,7 +97,7 @@ public class GuiScriptList extends SubGuiInterface{
}
@Override
public void save() {
}
}
@@ -16,7 +16,7 @@ public class SubGuiNpcBiomes extends SubGuiInterface
private SpawnData data;
private GuiCustomScroll scroll1;
private GuiCustomScroll scroll2;
public SubGuiNpcBiomes(SpawnData data){
this.data = data;
setBackground("menubg.png");
@@ -35,7 +35,7 @@ public class SubGuiNpcBiomes extends SubGuiInterface
scroll1.guiTop = guiTop + 14;
this.addScroll(scroll1);
addLabel(new GuiNpcLabel(1, "spawning.availableBiomes", guiLeft + 4, guiTop + 4));
if(scroll2 == null){
scroll2 = new GuiCustomScroll(this,1);
scroll2.setSize(140, 180);
@@ -44,7 +44,7 @@ public class SubGuiNpcBiomes extends SubGuiInterface
scroll2.guiTop = guiTop + 14;
this.addScroll(scroll2);
addLabel(new GuiNpcLabel(2, "spawning.spawningBiomes", guiLeft + 200, guiTop + 4));
List<String> biomes = new ArrayList<String>();
for (BiomeGenBase base : BiomeGenBase.getBiomeGenArray()) {
if (base != null && base.biomeName != null && !data.biomes.contains(base.biomeName)) {
@@ -59,8 +59,8 @@ public class SubGuiNpcBiomes extends SubGuiInterface
addButton(new GuiNpcButton(3, guiLeft + 145, guiTop + 90, 55, 20, ">>"));
addButton(new GuiNpcButton(4, guiLeft + 145, guiTop + 112, 55, 20, "<<"));
addButton(new GuiNpcButton(66, guiLeft + 260, guiTop + 194, 60, 20, "gui.done"));
}
@@ -72,14 +72,14 @@ public class SubGuiNpcBiomes extends SubGuiInterface
scroll1.selected = -1;
scroll1.selected = -1;
initGui();
}
}
}
if(button.id == 2){
if(scroll2.hasSelected()){
data.biomes.remove(scroll2.getSelected());
scroll2.selected = -1;
initGui();
}
}
}
if(button.id == 3){
data.biomes.clear();
@@ -89,13 +89,13 @@ public class SubGuiNpcBiomes extends SubGuiInterface
}
}
scroll1.selected = -1;
scroll1.selected = -1;
scroll2.selected = -1;
initGui();
}
if(button.id == 4){
data.biomes.clear();
scroll1.selected = -1;
scroll1.selected = -1;
scroll2.selected = -1;
initGui();
}
if(button.id == 66){