Пользовательские дополнения
На главную
OnReaction<ReactionName>( params )
Функция, обрабатывающая зарегистрированную реакцию.
См. также [EnumKbFlags].
-- объявление:
объявляются непосредственно в скрипте
-- объявление:
function OnReaction<ReactionName>( params )
-- параметры:
params: table, поля:
name: string - имя реакции
widget: WidgetSafe - контрол, запустивший реакцию
sender: string - имя контрола
kbFlags: number (int) - клавиатурные флаги KBF_...
x: number (int) - координата по X
y: number (int) - координата по X
count: number (int) - количество нажатий и пр.
active: boolean - нажатие или отпускание
-- возвращаемые значения:
нет
-- примеры:
function OnReactionSampleReaction( params )
if params.active then
for key, value in params
common.LogInfo( tostring( value ) )
end
end
end
Search: "CategoryLuaApi" "CategoryCommon"
CategoryCommon
EventUserScreenshot
FunctionCommonAddonCreateChildForm
FunctionCommonConfirmAcceptEula
FunctionCommonCreateValuedText
FunctionCommonFormatFloat
FunctionCommonFormatInt
FunctionCommonGetAddonInfo
FunctionCommonGetAddonName
FunctionCommonGetBitAnd
FunctionCommonGetEmptyWstring
FunctionCommonGetGameBuildInfo
FunctionCommonGetGameVersion
FunctionCommonGetGlobalConfigSection
FunctionCommonGetInstanceIdByInteger
FunctionCommonGetIntFromWString
FunctionCommonGetRandFloat
FunctionCommonGetRandInt
FunctionCommonGetScriptCfgVar
FunctionCommonGetStateDebugName
FunctionCommonGetStateManagedAddons
FunctionCommonIsEmptyWstring
FunctionCommonIsEulaAccepted
FunctionCommonIsFinalRelease
FunctionCommonIsGfxApprovedDriver
FunctionCommonIsValuedObject
FunctionCommonIsValuedText
FunctionCommonIsWString
FunctionCommonLogError
FunctionCommonLogInfo
FunctionCommonLogWarning
FunctionCommonMakeUserAddonFullName
FunctionCommonMakeUserScreenshot
FunctionCommonOnEvent
FunctionCommonOnReaction
FunctionCommonOpenUrl
FunctionCommonQuitGame
FunctionCommonRegisterEventHandler
FunctionCommonRegisterReactionHandler
FunctionCommonRequestIntegerByInstanceId
FunctionCommonSendEvent
FunctionCommonSetCursor
FunctionCommonSetGlobalConfigSection
FunctionCommonStateLoadManagedAddon
FunctionCommonStateLoadManagedAddonGroup
FunctionCommonStateUnloadManagedAddon
FunctionCommonStateUnloadManagedAddonGroup
FunctionCommonUnRegisterEvent
FunctionCommonUnRegisterEventHandler
FunctionCompareWString
FunctionGlobal
CategoryLuaApi
CategoryFunction
CategoryCommon
На главную