Skip to content

Commit

Permalink
Update y_dialog to use Get/SetTag instead of Meta.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Cole committed Apr 24, 2024
1 parent 6d2d2b8 commit 7bba126
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions YSI_Visual/y_dialog/y_dialog_impl.inc
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ stock bool:Dialog_ShowCallback(playerid, {F@_@iiiis, F@_@iis}:callback, DIALOG_S
{
BROADCAST_FUNC__ Dialog_Set(playerid, YSI_DIALOG_ID_1);
Indirect_Claim(callback),
Indirect_SetMeta(callback, tag),
Indirect_SetTag(callback, tag),
// Works tag-safely because the compile-time tag check uses `<iiiis>`.
YSI_g_sPlayerCallback[playerid] = callback;
return bool:ShowPlayerDialog(playerid, YSI_DIALOG_ID_1, style, __const(title), __const(caption), __const(button1), __const(button2));
Expand Down Expand Up @@ -196,7 +196,7 @@ HOOK__ OnDialogResponse(p,d,r,l,i[])
// we don't free the memory for the callback prematurely.
BROADCAST_FUNC__ Dialog_Set(p, -1);
// Call the callback.
if (Indirect_GetMeta(callback) == _:tagof (F@_@iiiis:))
if (Indirect_GetTag(callback) == _:tagof (F@_@iiiis:))
{
Indirect_Call(_:callback, tagof (F@_@iiiis:), p, YSI_DIALOG_ID_1, r, l, IsNull(i) ? NULL : i);
}
Expand Down

0 comments on commit 7bba126

Please sign in to comment.