malilib icon indicating copy to clipboard operation
malilib copied to clipboard

ConfigStringList.setValueChangeCallback not work

Open plusls opened this issue 3 years ago • 3 comments

In WidgetStringListEditEntry.java

    @Override
    public void applyNewValueToConfig()
    {
        if (this.isDummy() == false)
        {
            IConfigStringList config = this.parent.getParent().getConfig();
            List<String> list = config.getStrings();
            String value = this.textField.getTextField().getText();

            if (list.size() > this.listIndex)
            {
                // i think it should call ConfigStringList.onValueChanged
                list.set(this.listIndex, value);
                this.lastAppliedValue = value;
            }
        }
    }

plusls avatar Mar 11 '21 19:03 plusls

Yes that was broken. But all of that stuff has been entirely refactored already in the main development branch.

See: https://github.com/maruohon/malilib/blob/f30991920d59d8a9cf9de98277d09b3797971809/src/main/java/fi/dy/masa/malilib/gui/widget/list/entry/BaseStringListEditEntryWidget.java#L43-L67 and: https://github.com/maruohon/malilib/blob/f30991920d59d8a9cf9de98277d09b3797971809/src/main/java/fi/dy/masa/malilib/gui/config/BaseValueListEditScreen.java#L69-L74

maruohon avatar Mar 11 '21 19:03 maruohon

So when can merge it to 1,16 branch?

I'm just curious, because you said it was going to merge one year ago.

plusls avatar Mar 12 '21 17:03 plusls

I've been meaning to work on these rewrites for like 2 years now, and I started working on them properly around June 2020. A bunch of stuff has been done already and some more progress recently, but there are still a number of new systems to add. And after malilib itself is starting to be finished, I still need to also work on a a number of changes and additions and improvements for the other mods before I can start the next port to the later MC versions. So progress is being made, even if it's a lot slower than I'd like...

maruohon avatar Mar 12 '21 21:03 maruohon