Search in sources :

Example 1 with GuiToolIconProxy

use of betterquesting.client.toolbox.GuiToolIconProxy in project BetterQuesting by Funwayguy.

the class ToolboxToolIcon method onMouseClick.

@Override
public void onMouseClick(int mx, int my, int click) {
    if (click != 0) {
        return;
    }
    GuiButtonQuestInstance btn = gui.getQuestLine().getButtonAt(mx, my);
    if (btn != null) {
        Minecraft mc = Minecraft.getMinecraft();
        btn.playPressSound(mc.getSoundHandler());
        mc.displayGuiScreen(new GuiToolIconProxy(mc.currentScreen, btn.getQuest()));
    }
}
Also used : GuiButtonQuestInstance(betterquesting.api.client.gui.controls.GuiButtonQuestInstance) GuiToolIconProxy(betterquesting.client.toolbox.GuiToolIconProxy) Minecraft(net.minecraft.client.Minecraft)

Aggregations

GuiButtonQuestInstance (betterquesting.api.client.gui.controls.GuiButtonQuestInstance)1 GuiToolIconProxy (betterquesting.client.toolbox.GuiToolIconProxy)1 Minecraft (net.minecraft.client.Minecraft)1