[Custom Views] Wrap ingameui methods in safe calls
This commit is contained in:
parent
da2cdc669d
commit
180edd4075
1 changed files with 11 additions and 5 deletions
|
@ -45,7 +45,11 @@ local ERRORS = {
|
||||||
PREFIX = {
|
PREFIX = {
|
||||||
register_view_validating = "[Custom Views] (register_view) View data validating '%s'",
|
register_view_validating = "[Custom Views] (register_view) View data validating '%s'",
|
||||||
register_view_injection = "[Custom Views] (register_view) View injection '%s'",
|
register_view_injection = "[Custom Views] (register_view) View injection '%s'",
|
||||||
ingameui_hook_injection = "[Custom Views] View injection '%s'"
|
ingameui_hook_injection = "[Custom Views] View injection '%s'",
|
||||||
|
handle_transition_fade = "[Custom Views] (handle_transition) executing 'ingame_ui.transition_with_fade' for " ..
|
||||||
|
"transition '%s'",
|
||||||
|
handle_transition_no_fade = "[Custom Views] (handle_transition) executing 'ingame_ui.handle_transition' for " ..
|
||||||
|
"transition '%s'"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -265,9 +269,11 @@ function VMFMod:handle_transition(transition_name, transition_params, fade, igno
|
||||||
)
|
)
|
||||||
then
|
then
|
||||||
if fade then
|
if fade then
|
||||||
_ingame_ui:transition_with_fade(transition_name, transition_params)
|
vmf.safe_call_nr(self, ERRORS.THROWABLE["handle_transition_fade"], _ingame_ui.transition_with_fade, _ingame_ui,
|
||||||
|
transition_name, transition_params)
|
||||||
else
|
else
|
||||||
_ingame_ui:handle_transition(transition_name, transition_params)
|
vmf.safe_call_nr(self, ERRORS.THROWABLE["handle_transition_no_fade"], _ingame_ui.handle_transition, _ingame_ui,
|
||||||
|
transition_name, transition_params)
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue