Java 类net.minecraftforge.client.event.GuiScreenEvent.DrawScreenEvent 实例源码

项目:NotEnoughItems    文件:NEIClientEventHandler.java   
@SubscribeEvent
public void drawScreenPost(DrawScreenEvent.Post event) {
    GuiScreen screen = event.getGui();

    Point mousePos = GuiDraw.getMousePosition();
    List<String> tooltip = new LinkedList<>();
    ItemStack stack = ItemStack.EMPTY;
    if (instanceTooltipHandlers != null) {
        instanceTooltipHandlers.forEach(handler -> handler.handleTooltip(screen, mousePos.x, mousePos.y, tooltip));
    }

    if (screen instanceof GuiContainer) {
        if (tooltip.isEmpty() && GuiHelper.shouldShowTooltip(screen)) {
            GuiContainer container = ((GuiContainer) screen);
            stack = GuiHelper.getStackMouseOver(container, false);

            if (!stack.isEmpty()) {
                tooltip.clear();
                tooltip.addAll(GuiHelper.itemDisplayNameMultiline(stack, container, false));
            }
        }
    }

    GuiDraw.drawMultiLineTip(stack, mousePos.x + 10, mousePos.y - 12, tooltip);
}
项目:ServerObserver    文件:GuiHandler.java   
@CoreEvent
public void draw(final DrawScreenEvent.Post e) {
    final GuiScreen gui = this.mc.currentScreen;
    if (gui instanceof GuiMultiplayer) {
    } else if (gui instanceof GuiDisconnected) {
        if (this.disableBackButton!=null&&Config.getConfig().durationDisconnected.get()>=10)
            this.disableBackButton.displayString = I18n.format("serverobserver.gui.backandstop.time", I18n.format("serverobserver.gui.backandstop"), timeremain());
    } else if (gui instanceof GuiMainMenu) {
        final GuiButton button = this.mainMenuButtonMulti;
        if (button!=null&&this.target.getIP()!=null&&!this.manualOpen)
            button.displayString = I18n.format("serverobserver.gui.maintomulti.time", I18n.format("menu.multiplayer"), timeremain());
    }
}
项目:VisibleArmorSlots    文件:EventDelegatorGuiOverlay.java   
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void onDrawScreenEventPost(DrawScreenEvent.Post event)
{
    if (!this.shouldDisplayGuiOverlay(event.getGui())) { return; }

    this.getGuiOverlay().drawForeground(event.getMouseX(), event.getMouseY());
}
项目:ShadyMod    文件:ShadyMod.java   
@SubscribeEvent
public void onGuiInit(DrawScreenEvent event)
{
    if(event.gui instanceof GuiMainMenu)
    {
        if(!OpenGlHelper.shadersSupported)
        {
            String t = "you won't be able to enjoy ShadyMod and its children ;(";
            FontRenderer font = Minecraft.getMinecraft().fontRendererObj;
            Gui.drawRect(0, 0, font.getStringWidth(t), 20, 0x90000000);
            font.drawStringWithShadow("Shaders are not supported by your graphical card,", 0, 0, 0xFFFF0707);
            font.drawStringWithShadow(t, 0, 10, 0xFFFF0707);
        }
    }
}
项目:Progression    文件:ProgressionEvents.java   
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void onGuiPost(DrawScreenEvent.Pre event) {
    if (checker.isRunnable(event.getGui())) {
        LAST.clear();
    }
}
项目:Progression    文件:ProgressionEvents.java   
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void onGuiPost(DrawScreenEvent.Post event) {
    if (checker.isRunnable(event.getGui())) {
        LAST.run();
    }
}
项目:ServerObserver    文件:CoreHandler.java   
@SubscribeEvent
public void draw(final DrawScreenEvent.Post e) {
    this.guiHandler.draw(e);
}
项目:ServerObserver    文件:CoreHandler.java   
@SubscribeEvent
public void draw(final DrawScreenEvent.Post e) {
    this.guiHandler.draw(e);
}
项目:ServerObserver    文件:CoreHandler.java   
@SubscribeEvent
public void draw(final DrawScreenEvent.Post e) {
    this.guiHandler.draw(e);
}
项目:ServerObserver    文件:CoreHandler.java   
@SubscribeEvent
public void draw(final DrawScreenEvent.Post e) {
    this.guiHandler.draw(e);
}
项目:ServerObserver    文件:CoreHandler.java   
@SubscribeEvent
public void draw(final DrawScreenEvent.Post e) {
    this.guiHandler.draw(e);
}
项目:ServerObserver    文件:CoreHandler.java   
@SubscribeEvent
public void draw(final DrawScreenEvent.Post e) {
    this.guiHandler.draw(e);
}
项目:FiveNightsAtFreddysUniverseMod    文件:ClientEventHandler.java   
@SubscribeEvent
public void onDrawScreen(DrawScreenEvent.Post event)
{
    GuiOverrideHelper.draw(event);
}