Skip to content

Formalize documentation via LuaLS/EmmyLua#142

Open
mycroftjr wants to merge 5 commits into
sirinsidiator:masterfrom
mycroftjr:master
Open

Formalize documentation via LuaLS/EmmyLua#142
mycroftjr wants to merge 5 commits into
sirinsidiator:masterfrom
mycroftjr:master

Conversation

@mycroftjr

@mycroftjr mycroftjr commented Jun 30, 2024

Copy link
Copy Markdown
Contributor

@mycroftjr mycroftjr changed the title Formalize documentation via LuaLS Formalize documentation via EmmyLua/LuaLS Jun 30, 2024
@mycroftjr mycroftjr changed the title Formalize documentation via EmmyLua/LuaLS Formalize documentation via LuaLS/EmmyLua Jun 30, 2024
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

@mycroftjr mycroftjr Jul 1, 2024

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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))

@mycroftjr mycroftjr Jul 1, 2024

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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

@mycroftjr mycroftjr Jul 1, 2024

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants