Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Curses multiList #8203

Open
wants to merge 14 commits into
base: dev
Choose a base branch
from
Open

Conversation

Regisle
Copy link
Member

@Regisle Regisle commented Aug 17, 2024

built ontop of #8200 (so merge that one first)

Reworks the curses section to use a multiList, I have other improvements planned for a future PR, but those are mostly revolved around making a proper list or other self curse improvements unrelated to config tab

@Paliak Paliak added the enhancement New feature, calculation, or mod label Aug 17, 2024
@Regisle
Copy link
Member Author

Regisle commented Aug 22, 2024

Update, decided to add some of the improvements in to this PR, as its small and related enough that it shouldnt make it much harder to review

Silence doesnt work, it has an invalid name so doesnt showup on the list, if you give it a name to showup then the disable skills doesnt work, this is likely fine as people likely dont intend to want to build around it, so configuring it on "all curses" can be anoying

src/Modules/ConfigOptions.lua Outdated Show resolved Hide resolved
t_insert(control.varControlList[1], dropDownControl)
local extraTypesExtraHeight = 0
for j, varExtra in ipairs(varData.extraTypes or {}) do
if varExtra[1] == "integer" then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we use "count" everywhere else so using it here as well would make things more consistent.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Integer is a type, yeah I can swap it to count, most things should use count instead anyway and fixes the other issue with negative numbers

local extraTypesExtraHeight = 0
for j, varExtra in ipairs(varData.extraTypes or {}) do
if varExtra[1] == "integer" then
local editControl = new("EditControl", {"TOPLEFT",dropDownControl,"TOPLEFT"}, 225, 0, 90, 18, "", nil, "^%-%d", 7, function(buf, placeholder)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"^%-%d" allows for negative numbers which may not make sense in all contexts (curse levels). Would it make sense to make the filter a parameter and set it for each multiList individually?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See other comment

@Regisle Regisle mentioned this pull request Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature, calculation, or mod
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants