Skip to content

[NO SQUASH] IrrlichtMt: CGUIComboBox improvements#17181

Open
SmallJoker wants to merge 2 commits into
luanti-org:masterfrom
SmallJoker:pr_17181_combobox_misc
Open

[NO SQUASH] IrrlichtMt: CGUIComboBox improvements#17181
SmallJoker wants to merge 2 commits into
luanti-org:masterfrom
SmallJoker:pr_17181_combobox_misc

Conversation

@SmallJoker
Copy link
Copy Markdown
Member

Does not fix any reported issue.

Commit 1: Ensures that getText() always returns a valid pointer
Commit 2: Removal of superfluous/unused input handling code + click->drag->release selection (I can split this into a separate commit if desired)

To do

This PR is Ready for Review.

How to test

  1. Open a formspec with a dropdown
  2. Use the dropdown in whatever ways possible (scroll, click, drag&click)
  3. With the test code below:
    1. Have an ItemStack in the first few slots
    2. Open the dropdown
    3. Right-click on the list options
    4. The ItemStack must not be picked up (event captured)

Some devtest test code:

/lua core.show_formspec("singleplayer", "test", "size[8,5]list[current_player;main;0,1;8,4;0]dropdown[0.25,0.2;2,0.8;test;Item 1,Item 2;0;]")

When creating a new intance without an active selection,
'getText' returns nullptr. This is unlike the IGUIElement implementation.
After this commit, 'getItem' can be used to retrieve the selected item.
New method to select: mouse down -> drag -> release
@SmallJoker SmallJoker added Maintenance Tasks to keep the codebase and related parts in order, including architectural improvements Formspec labels May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Formspec Maintenance Tasks to keep the codebase and related parts in order, including architectural improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant