LibDialog-1.0

6 - Queued dialogs will not spawn when hiding shown dialogs

Whenever a dialog created by LibDialog-1.0 is hidden (not by pressing Escape), queued dialogs in the 'delegate_queue' table will not be shown.

An easy fix would be to call _ProcessQueue() at the end of the _Dialog_OnHide() function.

e.g.

local function _Dialog_OnHide(dialog)
    local delegate = dialog.delegate

    _G.PlaySound("igMainMenuClose")

    -- Required so lib:ActiveDialog() will return false if called from code which is called from the delegate's on_hide
    _RecycleWidget(dialog, active_dialogs, dialog_heap)

    if delegate.on_hide then
        delegate.on_hide(dialog, dialog.data
    end
    _ReleaseDialog(dialog)
    
    if #delegate_queue > 0 then
        local delegate
        repeat
            delegate = _ProcessQueue()
        until not delegate
    end
end

Thank you for the great library.

User When Change
Torhal Nov 02, 2013 at 03:55 UTC Changed status from New to Fixed
elchefe Oct 24, 2013 at 14:31 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

  • 1 comment
  • Avatar of Torhal Torhal Nov 02, 2013 at 03:55 UTC - 0 likes

    Good catch. Thanks!

  • 1 comment

Facts

Last updated
Nov 02, 2013
Reported
Oct 24, 2013
Status
Fixed - Developer made requested changes. QA should verify.
Type
Defect - A shortcoming, fault, or imperfection
Priority
Medium - Normal priority.
Votes
0

Reported by

Possible assignees