Search in sources :

Example 1 with PlaylistViewScreen

use of mathax.client.gui.screens.music.PlaylistViewScreen in project Client by MatHax.

the class WSearchBar method add.

@Override
public void add(WTable parent, MusicTab.MusicScreen screen, GuiTheme theme) {
    WTextBox box = parent.add(theme.textBox("")).expandX().widget();
    parent.add(theme.button("Search")).widget().action = () -> SearchUtils.search(box.get(), playlist -> mc.setScreen(new PlaylistViewScreen(theme, playlist, screen)));
    super.add(parent, screen, theme);
}
Also used : PlaylistViewScreen(mathax.client.gui.screens.music.PlaylistViewScreen) WTable(mathax.client.gui.widgets.containers.WTable) MusicTab(mathax.client.gui.tabs.builtin.MusicTab) WTextBox(mathax.client.gui.widgets.input.WTextBox) GuiTheme(mathax.client.gui.GuiTheme) SearchUtils(mathax.client.utils.music.SearchUtils) MatHax.mc(mathax.client.MatHax.mc) WTextBox(mathax.client.gui.widgets.input.WTextBox) PlaylistViewScreen(mathax.client.gui.screens.music.PlaylistViewScreen)

Aggregations

MatHax.mc (mathax.client.MatHax.mc)1 GuiTheme (mathax.client.gui.GuiTheme)1 PlaylistViewScreen (mathax.client.gui.screens.music.PlaylistViewScreen)1 MusicTab (mathax.client.gui.tabs.builtin.MusicTab)1 WTable (mathax.client.gui.widgets.containers.WTable)1 WTextBox (mathax.client.gui.widgets.input.WTextBox)1 SearchUtils (mathax.client.utils.music.SearchUtils)1