Package me.hackware.api.gui
Class NotchInset
java.lang.Object
me.hackware.api.gui.NotchInset
macOS notch (camera-housing) safe-area detection for the ClickGUI top chrome.
On notched MacBooks the display reserves a taller menu-bar strip for the
camera housing. In fullscreen the game framebuffer spans the whole panel, so
the notch overlaps the top of the screen and hides the centre of the tab bar.
top(Minecraft) returns the vertical inset (in GUI-space pixels) the
tab bar and content should be pushed down by so nothing sits under the notch.
Non-macOS, non-notched and windowed setups all return 0 — windowed
content already lays out below the system menu bar.
-
Method Summary
Modifier and TypeMethodDescriptionstatic inttop(net.minecraft.client.Minecraft mc) Top inset, in GUI-space pixels (the same space asscreen.width/ mouse coords), that the ClickGUI chrome should leave clear for the macOS notch.
-
Method Details
-
top
public static int top(net.minecraft.client.Minecraft mc) Top inset, in GUI-space pixels (the same space asscreen.width/ mouse coords), that the ClickGUI chrome should leave clear for the macOS notch. Returns0when there is nothing to avoid.
-