Formalize documentation via LuaLS/EmmyLua#142
Conversation
| control.m_sortType, control.m_sortOrder = SORT_TYPES[sortInfo[1]], SORT_ORDERS[sortInfo[2]] | ||
| elseif dropdownData.choicesValues then | ||
| control.m_sortType, control.m_sortOrder = ZO_SORT_ORDER_UP, SORT_BY_VALUE | ||
| control.m_sortType, control.m_sortOrder = SORT_BY_VALUE, ZO_SORT_ORDER_UP |
There was a problem hiding this comment.
This is the 2nd biggest "functional" change in the PR - I feel pretty confident that it was a bug and this was the proper fix, but I can't promise the behaviour won't change. Hence the widgetVersion bump.
| minText:SetFont("ZoFontGameSmall") | ||
| minText:SetAnchor(TOPLEFT, slider, BOTTOMLEFT) | ||
| minText:SetText(sliderData.min) | ||
| minText:SetText(tostring(sliderData.min)) |
There was a problem hiding this comment.
this and the same below on 129 are the smallest "code" changes in the PR, and one that I don't expect to have any functional difference - hence the lack of widgetVersion bump. Let me know if you think the widgetVersion should still be bumped, and I'll do that.
| control.animation = am:CreateTimeline() | ||
| local animation = control.animation | ||
| animation:SetPlaybackType(ANIMATION_SIZE, 0) --2nd arg = loop count | ||
| animation:SetPlaybackType(ANIMATION_PLAYBACK_ONE_SHOT, 0) --2nd arg = loop count |
There was a problem hiding this comment.
This is also a functional change, and one that I don't feel very confident in - I just know that before, the behavior was likely undefined: ANIMATION_SIZE = 5 is outside the range of the AnimationPlayback enum (-1 to 2).
I can't be sure whether you meant ANIMATION_PLAYBACK_LOOP, ANIMATION_PLAYBACK_PING_PONG, or ANIMATION_PLAYBACK_INVALID instead, though.
There was a problem hiding this comment.
For the submenu it should most probably be the ANIMATION_PLAYBACK_ONE_SHOT, or (as it was 5 and out of range before) the one that behaves the same as of before (ANIMATION_PLAYBACK_INVALID ? Not sure what SetPlaybackType does if you pass in a wrong value -> just ignores or uses a fallback)
(https://luals.github.io/wiki/annotations / https://emmylua.github.io/annotation.html)
see https://github.com/mycroftjr/IntelliJ_ESOUI_AutoCompletion/tree/esoui_php_parse_scripts_MycroftJr/PHP%20parse%20scripts/Modified_php_parse_scripts_by_Baertram%26MycroftJr/_out for the missing types