#Need help with widget.

14 messages · Page 1 of 1 (latest)

junior anvil
#

I don't know which widget to choose to simply draw a panel with player data in my custom menu. I used ClickableWidget for the buttons.

#

It cannot be done through ClickableWidget, as it is just a panel that does not currently support any interactivity or clicks.

#

I don't want to just add it to the render either, because I saw somewhere that the render draws 20 times per second (every tick). I think, why overload the client unnecessarily.

modest furnace
#

that's how rendering works?

#

also things are drawn on screen more than that. frames are faster than ticks.

#

i don't understand your issue. what kind of widget do you want?

junior anvil
#

I am not familiar with all of Fabric's features. I need a widget for rendering regular elements, textures, and text, not buttons.

#

I just tried the container widget, and it seems to suit my purposes.

modest furnace
#

fabric does not provide any widgets. it's all minecraft. textures and text are not widgets, rather basic rendering components. there widgets that wrap them to make them work nicely with the widget system. eg. TextWidget

#

you can easily create yours or use one that's already available

junior anvil
#

Okay, I understand. Widgets are Minecraft tools. Which widget is best suited for rendering text and textures from the available ones?

modest furnace
#

there's none for textures. for text, you can use a TextWidget

junior anvil
#

Have I correctly understood the essence of widgets, that they are reusable components?

#

In which you can simply substitute different values for the same rendering of these values?