Do not rely on error handling popup for sodium info (fixes #392)

Instead we now disable all the Render buttons and give them a tooltip. Much more
user-friendly.
This commit is contained in:
Jonas Herzig
2020-11-05 17:31:37 +01:00
parent 76bec31cd8
commit dd5935649d
5 changed files with 37 additions and 14 deletions

View File

@@ -5,6 +5,7 @@ import com.google.common.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.SettableFuture;
import com.replaymod.render.gui.GuiRenderQueue;
import com.replaymod.render.rendering.VideoRenderer;
import com.replaymod.render.utils.RenderJob;
import com.replaymod.replaystudio.us.myles.ViaVersion.api.Pair;
import de.johni0702.minecraft.gui.GuiRenderer;
@@ -281,6 +282,11 @@ public class GuiReplayViewer extends GuiScreen {
loadButton.setI18nLabel("replaymod.gui.viewer.bulkrender", jobs.size());
loadButton.setTooltip(new GuiTooltip().setText(tooltipLines));
loadButton.setEnabled(!jobs.isEmpty());
String[] compatError = VideoRenderer.checkCompat();
if (compatError != null) {
loadButton.setDisabled().setTooltip(new GuiTooltip().setText(compatError));
}
} else {
loadButton.setI18nLabel("replaymod.gui.load");
loadButton.setTooltip(null);