Skip to content

Commit

Permalink
Added IStyled.styled(...) helper method
Browse files Browse the repository at this point in the history
  • Loading branch information
Sollace committed Jul 20, 2023
1 parent 1248e3f commit 69d22a9
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
package com.minelittlepony.common.client.gui.style;

import java.util.function.Function;

public interface IStyled<T extends IStyled<T>> extends IStyleFactory {

default T styled(Function<Style, Style> styleChange) {
return setStyle(styleChange.apply(getStyle()));
}

default T setStyle(IStyleFactory factory) {
return setStyle(factory.getStyle());
}
Expand Down

0 comments on commit 69d22a9

Please sign in to comment.