bug: Cannot change text color for menubar items #119

Open
opened 2024-08-23 11:12:42 +08:00 by Ago0495 · 0 comments
Ago0495 commented 2024-08-23 11:12:42 +08:00 (Migrated from github.com)

Describe the bug

Foreground color for the text on a item cannot be changed when added to a Menubar Object

To Reproduce

Steps to reproduce the behavior:

local basalt = require("basalt")

local mainFrame = basalt.createFrame()
local aList = mainFrame:addMenubar()
aList:addItem("1. Entry")
aList:addItem("2. Entry",colors.yellow)
aList:addItem("3. Entry",colors.yellow,colors.green)
aList:addItem("4. Entry")
aList:setSelectionColor(colors.green, colors.red)
basalt.autoUpdate()

Expected behavior

First item colors will be default, gray background and black text
Second item will be yellow background and black text
Third item will be yellow background and black text
Selected item will have a green background and red text

the third item text should be green but defaults to the foreground color of the parent object, in this case black

Screenshots

bug

Additional context

In the code for the menubar, "Basalt/objects/Menubar.lua", lines 117 and 120, FgCol should be fgCol

Checklist

[ X] I am running the latest version.
Tick the box if you are running the latest version!

**Describe the bug** Foreground color for the text on a item cannot be changed when added to a Menubar Object **To Reproduce** Steps to reproduce the behavior: local basalt = require("basalt") local mainFrame = basalt.createFrame() local aList = mainFrame:addMenubar() aList:addItem("1. Entry") aList:addItem("2. Entry",colors.yellow) aList:addItem("3. Entry",colors.yellow,colors.green) aList:addItem("4. Entry") aList:setSelectionColor(colors.green, colors.red) basalt.autoUpdate() **Expected behavior** First item colors will be default, gray background and black text Second item will be yellow background and black text Third item will be yellow background and black text Selected item will have a green background and red text the third item text should be green but defaults to the foreground color of the parent object, in this case black **Screenshots** ![bug](https://github.com/user-attachments/assets/723d9523-0db7-4d57-adbe-a9895f3870f6) **Additional context** In the code for the menubar, "Basalt/objects/Menubar.lua", lines 117 and 120, FgCol should be fgCol **Checklist** [ X] I am running the latest version. Tick the box if you are running the latest version!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GitHub/Basalt#119
No description provided.