Page MenuHomeFeedback Tracker

onCheckBoxesSelChanged event on CT_LISTNBOX_CHECKABLE control type providing 2nd parameter wrong
New, NormalPublic

Description

Adding the CheckBoxesSelChanged event on CT_LISTNBOX_CHECKABLE control type will always return the second parameter different than documented in
onCheckBoxesSelChanged

Using the default map player list as an example, adding the aforementioned event to the list, then clicking on the speaker icon to the right of the player name will have a result of

[Control #1002, 31.7809, 1]

Where the second index should be "_selectedIndex", it is seemingly something to do with vertical mouse position as it will change when moving the mouse even in the same selected index.

Details

Severity
Trivial
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
General
Steps To Reproduce
  1. Either create a CT_LISTNBOX_CHECKABLE or use the multiplayer player list on the left hand side of the map.
  2. Add CheckBoxesSelChanged event to control.
_playerList = (findDisplay 12 displayCtrl 1002);
_playerList ctrlAddEventHandler ["CheckBoxesSelChanged",{
	systemChat str _this;
}]
  1. Click the checkbox on the control
  2. Move the mouse slightly and select the same checkbox
  3. See difference in second return index
Additional Information

Was trying to figure out a way to check if a player has a different player muted and came across this issue, as you cannot select the proper index of checkbox due to syntax limitations of ctrlChecked, but can't add that without this being fixed

Event Timeline

Fraali created this task.May 12 2024, 10:06 PM
dedmen added a subscriber: dedmen.May 16 2024, 6:22 PM

See difference in second return index

Don't see any. I can click anywhere on first row and it keeps printing zero.

That list is implemented using two items for each row.
So there might be both 0 and 1 in the first row. And that would be correct due to how its implemented

Seems to be fixed in profiling, but is not currently on live - If this will be going to live, this report can be closed, thank you :)

Stable Example:
https://i.imgur.com/0OuaM6Z.png

Profiling Example:
https://i.imgur.com/3XxGyqy.png

Fraali added a comment.Nov 2 2024, 9:21 AM

This has been fixed in the 2.18 update, it can be closed