Skip to content

Commit

Permalink
Rename ModOptionsScreen
Browse files Browse the repository at this point in the history
  • Loading branch information
StavWasPlayZ committed Aug 29, 2023
1 parent baf8cf4 commit 6694fac
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import com.cstav.genshinstrument.client.gui.screen.instrument.GenshinConsentScreen;
import com.cstav.genshinstrument.client.gui.screen.instrument.partial.note.NoteButton;
import com.cstav.genshinstrument.client.gui.screen.options.instrument.partial.BaseInstrumentOptionsScreen;
import com.cstav.genshinstrument.client.gui.screen.options.instrument.partial.ModOptionsScreen;
import com.cstav.genshinstrument.client.gui.screen.options.instrument.partial.AbstractInstrumentOptionsScreen;
import com.cstav.genshinstrument.client.keyMaps.InstrumentKeyMappings;
import com.cstav.genshinstrument.client.midi.MidiController;
import com.cstav.genshinstrument.event.MidiEvent.MidiEventArgs;
Expand Down Expand Up @@ -413,7 +413,7 @@ public static Optional<AbstractInstrumentScreen> getCurrentScreen(final Minecraf
if (minecraft.screen instanceof AbstractInstrumentScreen)
return Optional.of((AbstractInstrumentScreen)minecraft.screen);

if (minecraft.screen instanceof ModOptionsScreen instrumentOptionsScreen)
if (minecraft.screen instanceof AbstractInstrumentOptionsScreen instrumentOptionsScreen)
if (instrumentOptionsScreen.isOverlay)
return Optional.of(instrumentOptionsScreen.instrumentScreen);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import com.cstav.genshinstrument.client.ClientUtil;
import com.cstav.genshinstrument.client.config.ModClientConfigs;
import com.cstav.genshinstrument.client.gui.screen.instrument.partial.AbstractInstrumentScreen;
import com.cstav.genshinstrument.client.gui.screen.options.instrument.partial.ModOptionsScreen;
import com.cstav.genshinstrument.client.gui.screen.options.instrument.partial.AbstractInstrumentOptionsScreen;
import com.cstav.genshinstrument.client.midi.MidiController;

import net.fabricmc.api.EnvType;
Expand All @@ -21,7 +21,7 @@
import net.minecraft.util.Mth;

@Environment(EnvType.CLIENT)
public class MidiOptionsScreen extends ModOptionsScreen {
public class MidiOptionsScreen extends AbstractInstrumentOptionsScreen {
public static final int MIN_OCTAVE_SHIFT = -4, MAX_OCTAVE_SHIFT = 4;

public MidiOptionsScreen(Component pTitle, Screen prevScreen, AbstractInstrumentScreen instrumentScreen) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@
import net.minecraft.network.chat.Component;

@Environment(EnvType.CLIENT)
public class ModOptionsScreen extends Screen {
public abstract class AbstractInstrumentOptionsScreen extends Screen {

public final @Nullable AbstractInstrumentScreen instrumentScreen;
public final Screen lastScreen;

public final boolean isOverlay;

public ModOptionsScreen(Component pTitle, AbstractInstrumentScreen instrumentScreen, Screen lastScreen) {
public AbstractInstrumentOptionsScreen(Component pTitle, AbstractInstrumentScreen instrumentScreen, Screen lastScreen) {
super(pTitle);
this.instrumentScreen = instrumentScreen;
this.lastScreen = lastScreen;

this.isOverlay = instrumentScreen != null;
}
public ModOptionsScreen(Component pTitle, AbstractInstrumentScreen instrumentScreen) {
public AbstractInstrumentOptionsScreen(Component pTitle, AbstractInstrumentScreen instrumentScreen) {
this(pTitle, instrumentScreen, null);
}
public ModOptionsScreen(Component pTitle, Screen lastScreen) {
public AbstractInstrumentOptionsScreen(Component pTitle, Screen lastScreen) {
this(pTitle, null, lastScreen);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import net.minecraft.util.Mth;

@Environment(EnvType.CLIENT)
public abstract class BaseInstrumentOptionsScreen extends ModOptionsScreen {
public abstract class BaseInstrumentOptionsScreen extends AbstractInstrumentOptionsScreen {
public static final MutableComponent MIDI_OPTIONS = Component.translatable("label.genshinstrument.midiOptions");

private static final String SOUND_CHANNEL_KEY = "button.genshinstrument.audioChannels",
Expand Down

0 comments on commit 6694fac

Please sign in to comment.