Michael-48 / Iris

Iris is an Immediate mode GUI Library for Roblox, Based on Dear ImGui
https://michael-48.github.io/Iris/
MIT License
162 stars 26 forks source link

Iris.Button with custom Color #59

Closed OverHash closed 3 months ago

OverHash commented 3 months ago

It would be great to allow Iris.Button to accept a Color argument for it's Text, similar to Iris.Text.

SirMallard commented 3 months ago

There are two solutions to this:

  1. If you have RichText enabled in the config properties, you should be able to just use a RichText colour formatting instead.
    Iris.Button({"<font color='#8000ff'>Coloured Text!</font>"})
  2. You can push and pop the default text colour to be a different version.
    Iris.PushConfig({TextColor = Color3.fromRGB(128, 0, 256)})
    Iris.Button({"Coloured Text!"})
    Iris.PopConfig()

These are more general solutions which will work with every widget, so I don't think there's any purpose adding unique arguments to certain widgets, except from the most basic Iris.Text().