Пользовательские дополнения
На главную
OnReaction<ReactionName>( params )
Функция, обрабатывающая зарегистрированную реакцию.
См. также EnumKeyboardFlags.
-- объявление:
объявляются непосредственно в скрипте
-- объявление:
function OnReaction<ReactionName>( params )
-- параметры:
params: table, поля:
name: string - имя реакции
widget: WidgetSafe - контрол, запустивший реакцию
sender: string - имя контрола. Разработчик может менять имя виджета при динамическом создании виджетов, чтобы выяснять в обработчике какой конкретно экземпляр виджета на основе WidgetSafe вызвал реакцию
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
LogInfo( tostring( value ) )
end
end
end
Связанные страницы: "CategoryLuaApi" "CategoryCommon"
CategoryCommon
EnumAddonState
EnumGoalState
EventAddonLoadStateChanged
EventAllodsGoalAdded
EventAllodsGoalChanged
EventAllodsGoalCompleted
EventFullscreenChanged
EventLocaleChanged
EventPosConverterChanged
EventUserScreenshot
FunctionApitype
FunctionCommonCreateValuedObject
FunctionCommonCreateValuedText
FunctionCommonDisablePersonalEvent
FunctionCommonEnablePersonalEvent
FunctionCommonEnableUIRender
FunctionCommonFormatFloat
FunctionCommonFormatInt
FunctionCommonFormatNumber
FunctionCommonGetAbsTimeMs
FunctionCommonGetAddonInfo
FunctionCommonGetAddonMainForm
FunctionCommonGetAddonName
FunctionCommonGetAddonSysName
FunctionCommonGetAllodsGoals
FunctionCommonGetAllodsGoalsOnLoadingScreen
FunctionCommonGetApiType
FunctionCommonGetApiVersion
FunctionCommonGetClientArch
FunctionCommonGetCredits
FunctionCommonGetCSSList
FunctionCommonGetDateTimeFromMs
FunctionCommonGetEmptyWstring
FunctionCommonGetFatalityPhraseLimits
FunctionCommonGetFirstPaymentBonusInfo
FunctionCommonGetFPSData
FunctionCommonGetLocalDateTime
FunctionCommonGetLocalDateTimeMs
FunctionCommonGetLocale
FunctionCommonGetLocaleList
FunctionCommonGetLocalization
FunctionCommonGetMks
FunctionCommonGetMsFromDateTime
FunctionCommonGetPosConverterParams
FunctionCommonGetRandFloat
FunctionCommonGetRandInt
FunctionCommonGetScriptCfgVar
FunctionCommonGetSetBonusInfo
FunctionCommonGetShortString
FunctionCommonGetSpecialStatInfo
FunctionCommonGetStateManagedAddons
FunctionCommonGetStateName
FunctionCommonGetTerritoryInfo
FunctionCommonGetTextureInfo
FunctionCommonGetTextureSize
FunctionCommonHitFrameHandler
FunctionCommonIsAvatarNameValid
FunctionCommonIsCapsLockEnabled
FunctionCommonIsEmptyValuedText
FunctionCommonIsEmptyWstring
FunctionCommonIsEqualStats
FunctionCommonIsFatalityPhraseFiltered
FunctionCommonIsKeyEnabled
FunctionCommonIsOnPayToPlayShard
FunctionCommonIsSoundEnabled
FunctionCommonIsSubstring
FunctionCommonIsSubstringEx
FunctionCommonIsTextFiltered
FunctionCommonIsUIRenderEnabled
FunctionCommonIsValidText
FunctionCommonIsValuedObject
FunctionCommonIsValuedText
FunctionCommonIsWidget
FunctionCommonIsWString
FunctionCommonLogError
FunctionCommonLogInfo
FunctionCommonLogWarning
FunctionCommonMakeUserScreenshot
FunctionCommonOnEvent
FunctionCommonOnFrame
FunctionCommonOnReaction
FunctionCommonQuitGame
FunctionCommonRegisterEventHandler
FunctionCommonRegisterFrameHandler
FunctionCommonRegisterReactionHandler
FunctionCommonSendEvent
FunctionCommonSendUserModsEvent
FunctionCommonSetCursor
FunctionCommonSetIconFlash
FunctionCommonSetLocale
FunctionCommonStateLoadManagedAddon
FunctionCommonStateReloadManagedAddon
FunctionCommonStateUnloadManagedAddon
FunctionCommonUnRegisterEvent
FunctionCommonUnRegisterEventHandler
FunctionCommonUnRegisterFrameHandler
FunctionCommonUnRegisterReaction
FunctionCommonUnRegisterReactionHandler
FunctionCompareWString
FunctionCompareWStringEx
FunctionEscapeWString
FunctionGlobal
FunctionIsIndexableUdata
GoalId
CategoryLuaApi
CategoryFunction
CategoryCommon
На главную