Search in sources :

Example 1 with GuiScrollingText

use of betterquesting.api.client.gui.lists.GuiScrollingText in project BetterQuesting by Funwayguy.

the class GuiTextEditor method initGui.

/**
 * Adds the buttons (and other controls) to the screen in question.
 */
public void initGui() {
    super.initGui();
    maxRows = (sizeY - 48) / 20;
    for (int i = 0; i < maxRows; i++) {
        GuiButtonThemed btn = new GuiButtonThemed(i + 1, guiLeft + 16, guiTop + 32 + (i * 20), 100, 20, "NULL", true);
        this.buttonList.add(btn);
    }
    scrollingText = new GuiScrollingText(mc, guiLeft + 132, guiTop + 32, sizeX - 148, sizeY - 64);
    scrollingText.SetText(text);
    this.embedded.add(scrollingText);
    cursorPosition = text.length();
    RefreshColumns();
}
Also used : GuiScrollingText(betterquesting.api.client.gui.lists.GuiScrollingText) GuiButtonThemed(betterquesting.api.client.gui.controls.GuiButtonThemed)

Example 2 with GuiScrollingText

use of betterquesting.api.client.gui.lists.GuiScrollingText in project BetterQuesting by Funwayguy.

the class GuiQuestingHelp method initGui.

@Override
public void initGui() {
    super.initGui();
    maxRows = (sizeY - 64) / 20;
    for (int i = 0; i < maxRows; i++) {
        buttonList.add(new GuiButtonThemed(i + 1, guiLeft + 16, guiTop + 32 + i * 20, 100, 20, "NULL", true));
    }
    curPage = new GuiScrollingText(mc, guiLeft + 124, guiTop + 32, sizeX - 148, sizeY - 64, "");
    this.embedded.add(curPage);
    RefreshColumns();
}
Also used : GuiScrollingText(betterquesting.api.client.gui.lists.GuiScrollingText) GuiButtonThemed(betterquesting.api.client.gui.controls.GuiButtonThemed)

Aggregations

GuiButtonThemed (betterquesting.api.client.gui.controls.GuiButtonThemed)2 GuiScrollingText (betterquesting.api.client.gui.lists.GuiScrollingText)2