com.github.vini2003.blade.common.widget.base.TextWidget.setColor()

Here are the examples of the java api com.github.vini2003.blade.common.widget.base.TextWidget.setColor() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

16 Source : ComponentEntityScreenHandler.java
with MIT License
from Mixinors

@Override
public void initialize(int width, int height) {
    tabs = new TabWidget();
    tabs.setSize(Size.of(176F, 188F + getTabWidgetExtendedHeight()));
    tabs.setPosition(Position.of(width / 2 - tabs.getWidth() / 2, height / 2 - tabs.getHeight() / 2));
    addWidget(tabs);
    mainTab = (TabWidgetCollection) tabs.addTab(getSymbol());
    mainTab.setPosition(Position.of(tabs, 0, 25F + 7F));
    mainTab.setSize(Size.of(176F, 184F));
    TextWidget replacedle = new TextWidget();
    replacedle.setPosition(Position.of(mainTab, 8, 0));
    replacedle.setText(syncEnreplacedy.getDisplayName());
    replacedle.setColor(4210752);
    mainTab.addWidget(replacedle);
    Position invPos = Position.of(tabs, 7F, 25F + 7F + (184 - 18 - 18 - (18 * 4) - 3 + getTabWidgetExtendedHeight()));
    TextWidget invreplacedle = new TextWidget();
    invreplacedle.setPosition(Position.of(invPos, 0, -10));
    invreplacedle.setText(getPlayer().inventory.getName());
    invreplacedle.setColor(4210752);
    mainTab.addWidget(invreplacedle);
    playerSlots = Slots.addPlayerInventory(invPos, Size.of(18F, 18F), mainTab, getPlayer().inventory);
}

14 Source : ComponentBlockEntityScreenHandler.java
with MIT License
from Mixinors

@Override
public void initialize(int width, int height) {
    tabs = new TabWidget();
    tabs.setSize(getTabsSize(width, height));
    tabs.setPosition(getTabsPosition(width, height));
    addWidget(tabs);
    mainTab = (TabWidgetCollection) tabs.addTab(syncBlockEnreplacedy.getCachedState().getBlock().asItem());
    mainTab.setPosition(Position.of(tabs, 0, 25F + 7F));
    mainTab.setSize(Size.of(176F, 184F));
    TextWidget replacedle = new TextWidget();
    replacedle.setPosition(Position.of(mainTab, 8, 0));
    replacedle.setText(new TranslatableText(syncBlockEnreplacedy.getCachedState().getBlock().asItem().getTranslationKey()));
    replacedle.setColor(4210752);
    mainTab.addWidget(replacedle);
    Position invPos = Position.of(tabs, 7F + (tabs.getWidth() / 2 - ((9 * 18F) / 2) - 7F), 25F + 7F + (184 - 18 - 18 - (18 * 4) - 3 + getTabWidgetExtendedHeight()));
    TextWidget invreplacedle = new TextWidget();
    invreplacedle.setPosition(Position.of(invPos, 0, -10));
    invreplacedle.setText(getPlayer().inventory.getName());
    invreplacedle.setColor(4210752);
    mainTab.addWidget(invreplacedle);
    playerSlots = Slots.addPlayerInventory(invPos, Size.of(18F, 18F), mainTab, getPlayer().inventory);
    Direction rotation = Direction.NORTH;
    Block block = syncBlockEnreplacedy.getCachedState().getBlock();
    if (block instanceof HorizontalFacingBlockWithEnreplacedy) {
        DirectionProperty property = ((HorizontalFacingBlockWithEnreplacedy) block).getDirectionProperty();
        if (property != null)
            rotation = syncBlockEnreplacedy.getCachedState().get(property);
    }
    final Direction finalRotation = rotation;
    BlockEnreplacedyTransferComponent transferComponent = syncBlockEnreplacedy.getComponent(AstromineComponentTypes.BLOCK_ENreplacedY_TRANSFER_COMPONENT);
    transferComponent.get().forEach((type, entry) -> {
        if (syncBlockEnreplacedy.getComponent(type) instanceof NameableComponent) {
            NameableComponent nameableComponent = (NameableComponent) syncBlockEnreplacedy.getComponent(type);
            TabWidgetCollection current = (TabWidgetCollection) tabs.addTab(nameableComponent.getSymbol(), () -> Collections.singletonList(nameableComponent.getName()));
            WidgetUtilities.createTransferTab(current, Position.of(tabs, tabs.getWidth() / 2 - 38, getTabWidgetExtendedHeight() / 2), finalRotation, transferComponent, syncBlockEnreplacedy.getPos(), type);
            TextWidget invTabreplacedle = new TextWidget();
            invTabreplacedle.setPosition(Position.of(invPos, 0, -10));
            invTabreplacedle.setText(getPlayer().inventory.getName());
            invTabreplacedle.setColor(4210752);
            current.addWidget(invTabreplacedle);
            playerSlots.addAll(Slots.addPlayerInventory(invPos, Size.of(18F, 18F), current, getPlayer().inventory));
            TextWidget tabreplacedle = new TextWidget();
            tabreplacedle.setPosition(Position.of(mainTab, 8, 0));
            tabreplacedle.setText(nameableComponent.getName());
            tabreplacedle.setColor(4210752);
            current.addWidget(tabreplacedle);
        }
    });
}