Merge branch '1.8' into 1.9.4
5b3284fUpdate jGui and ReplayStudio (fixes #33)61d6fd4Close replay file zip after recording (fixes #32)00bcc9eFix paths of files that are supposed to be in the mc data dir (fixes #40)e6a789dFix camera rotation when jumping in time (fixes #39)50b53fcAdd a way to register key bindings triggered every render tick (fixes #31)a817c73Prevent GUIs of other mods from opening during replayd64ef8bHide NPCs in the Player Overview GUI (fixes #29)1f2c05eFix spectating player entities past death and respawn (fixes #36)ad2893bFix vanilla bug caused by unremovable entities in the entityList of ClientWorld (fixes #29)c934cb9Fix spawn player packet being sent twice6efbf91Handle F1 properly while mouse is visible in the replay overlay (fixes #30)9add2afDeselect keyframe when pressing "V" aka. sync timelines (fixes #27)
This commit is contained in:
@@ -19,6 +19,7 @@ import net.minecraft.client.settings.GameSettings;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.gameevent.InputEvent;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.util.ReadableDimension;
|
||||
import org.lwjgl.util.ReadablePoint;
|
||||
import org.lwjgl.util.WritablePoint;
|
||||
@@ -153,6 +154,23 @@ public class GuiReplayOverlay extends AbstractGuiOverlay<GuiReplayOverlay> {
|
||||
setMouseVisible(true);
|
||||
}
|
||||
}
|
||||
if (Keyboard.getEventKeyState()) {
|
||||
// Handle the F1 key binding while the overlay is opened as a gui screen
|
||||
if (isMouseVisible() && Keyboard.getEventKey() == Keyboard.KEY_F1) {
|
||||
gameSettings.hideGUI = !gameSettings.hideGUI;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(GuiRenderer renderer, ReadableDimension size, RenderInfo renderInfo) {
|
||||
// Do not render overlay when user pressed F1 and we are not currently in some popup
|
||||
if (getMinecraft().gameSettings.hideGUI && isAllowUserInput()) {
|
||||
// Note that this only applies to when the mouse is visible, otherwise
|
||||
// the draw method isn't called in the first place
|
||||
return;
|
||||
}
|
||||
super.draw(renderer, size, renderInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user