Search in sources :

Example 1 with TheAlteningAccount

use of mathax.client.systems.accounts.types.TheAlteningAccount in project Client by MatHax.

the class AddAlteningAccountScreen method initWidgets.

@Override
public void initWidgets() {
    WTable t = add(theme.table()).widget();
    // Token
    t.add(theme.label("Token: "));
    WTextBox token = t.add(theme.textBox("")).minWidth(400).expandX().widget();
    token.setFocused(true);
    t.row();
    // Add
    add = t.add(theme.button("Add")).expandX().widget();
    add.action = () -> {
        if (!token.get().isEmpty())
            AccountsScreen.addAccount(this, parent, new TheAlteningAccount(token.get()));
    };
    enterAction = add.action;
}
Also used : WTable(mathax.client.gui.widgets.containers.WTable) TheAlteningAccount(mathax.client.systems.accounts.types.TheAlteningAccount) WTextBox(mathax.client.gui.widgets.input.WTextBox)

Aggregations

WTable (mathax.client.gui.widgets.containers.WTable)1 WTextBox (mathax.client.gui.widgets.input.WTextBox)1 TheAlteningAccount (mathax.client.systems.accounts.types.TheAlteningAccount)1