triumph-gui icon indicating copy to clipboard operation
triumph-gui copied to clipboard

Add animations

Open Lorenzo0111 opened this issue 3 years ago • 6 comments

Closes #48

Example usage:

        Gui gui = new Gui(3,"Hello", EnumSet.noneOf(InteractionModifier.class));
        gui.setItem(0, ItemBuilder.from(Material.DIAMOND).asGuiItem());
        
        Animation animation = Animation.infinite(5,
                Frame.builder()
                        .addItem(0, ItemBuilder.from(Material.DIAMOND)
                                .name(Component.text(ChatColor.translateAlternateColorCodes('&', "&6&lHello World")))
                                .asGuiItem())
                        .build(),
                Frame.builder()
                        .addItem(0, ItemBuilder.from(Material.DIAMOND)
                                .name(Component.text(ChatColor.translateAlternateColorCodes('&', "&f&lHello World")))
                                .asGuiItem())
                        .build());
        
        gui.addAnimation(animation);
        gui.open(player);

Lorenzo0111 avatar Dec 26 '21 18:12 Lorenzo0111

Sorry for late reply. I like the idea, I'll keep this open for now though, I want to rework the updating system a bit more and this would be perfect for when that is ready.

LichtHund avatar Jan 09 '22 18:01 LichtHund

Yeah, it is a bit raw, can't wait to see this awesome feature in the library.

Lorenzo0111 avatar Jan 09 '22 19:01 Lorenzo0111

any news?

Lorenzo0111 avatar Oct 04 '22 19:10 Lorenzo0111

any news?

The update system seems to have not been updated yet, gotta wait sadly. But love the work you did here. I love the way you did it.

xMrAfonso avatar Oct 10 '22 14:10 xMrAfonso

This is pretty awesome. Sad to see it still hasn't been merged.

harvanchik avatar Feb 20 '23 21:02 harvanchik