ConfigWindow 7

   (1 review)

1 Screenshot

About This File

This "super" add-on is an assistant to add-on function. Similar to AddonManager. However, instead of being able to turn on/off or hide add-ons; it is capable of allowing add-on developers to quickly and simply create buttons or user input abilities for their add-ons. This allows the user and the developer to reduce the amount of memory their add-on uses if they want to allow people to customize certain aspects of the add-on.


Этот "супер" аддон - помощник для для других аддонов. Наподобие AddonManager. Однако, вместо того, чтобы включить/выключить или скрывать аддоны, этот аддон позволяет разработчикам, быстро и просто создавать окно с настройками, или пользовательский ввод для своего аддона. Это позволяет уменьшить объем памяти, используемый аддоном, когда хочется сделать, чтобы люди могли настраивать некоторые аспекты аддона.

--Developer Advice--
Response to "CONFIG_INIT_EVENT" -

userMods.SendEvent("CONFIG_INIT_EVENT_RESPONSE", { sender = common.GetAddonName() })

Response to "CONFIG_EVENT_"..common.GetAddonName() -

  • Required -
    • NoB - This is the number of the button to be created.
      name - This is for the name of the button.
      btnType - This is the type of button;
      • "Simple" - For simple buttons.
        "T/F" - For true and false buttons.
        "EditLine" - For user input lines.
        "Color" - For a customizable color button.
        "Slider" - For a sliding button.
        "Tabled" - For a forward/backward table button.

  • Optional -
    • state - This is for the "T/F" button, true or false.
      value - This is mainly for the button types "Tabled" and "EditLine" to update the value.
      steps - This is for the number of steps for the "Slider" button.
      pos - This is for the position the "Slider" button should start at.
      color - This is the RGBA current value of the color button.
      texture - This is the textureId of a texture.
      sizeX - Size for X value of "Tabled" texture.
      sizeY - Size for Y value of "Tabled" texture.
      text - Text for "Tabled" text.
      scale - Scale for "Tabled" text.

  • Example -
    userMods.SendEvent("CONFIG_EVENT_RESPONSE", {NoB = 0, name = "Dance", btnType = "T/F", state = true})


  • Required -
    • NoB - Number of the button to change text.

    Optional -
    • name - Name of the button. "EditLine" or "Tabled" buttons.
      value - The new value for the button. "EditLine" or "Tabled" buttons.
      texture - The new texture. "Tabled" buttons only.
      sizeX - Size for X value of "Tabled" texture.
      text - Text for "Tabled" text.
      scale - Scale for "Tabled" text.

    Example -
    userMods.SendEvent("CONFIG_CHANGE_BUTTON_RESPONSE", {NoB = 0, name = "Dance2", value = "Tango"})

Response from "CONFIG_SIMPLE_"..common.GetAddonName() -

  • Values Sent - {name}

Response from "CONFIG_BUTTON_"..common.GetAddonName() -

  • Values Sent - {name, state}

Response from "CONFIG_EDIT_LINE_"..common.GetAddonName() -

  • Values Sent - {name, text}

Response from "CONFIG_COLOR_"..common.GetAddonName() -

  • Values Sent - {name, color}

Response from "CONFIG_SLIDER_"..common.GetAddonName() -

  • Values Sent - {name, pos}

Response from "CONFIG_TABLED_"..common.GetAddonName() -

  • Values Sent - {name, dir} (dir is "+" or "-")

Example code for True/False buttons:

function ConfigInitEvent()
userMods.SendEvent("CONFIG_INIT_EVENT_RESPONSE", { sender = common.GetAddonName() })

function ConfigEvent()
local num = 0
for i, v in NPB do
userMods.SendEvent("CONFIG_EVENT_RESPONSE", {NoB = num, name = L [GetGameLocalization()]  , btnType = "T/F", state = v})
num = num + 1

function ConfigButtonResponse(p)
local s
for i, v in L [GetGameLocalization()]  do
if v == then
s = i
if NPB   ~= nil then
NPB   = not NPB  
userMods.SetGlobalConfigSection("NPB", NPB)
common.StateUnloadManagedAddon( "UserAddon/"..common.GetAddonName() )
common.StateLoadManagedAddon( "UserAddon/"..common.GetAddonName() )

function Init()
common.RegisterEventHandler( ConfigInitEvent, "CONFIG_INIT_EVENT" )
common.RegisterEventHandler( ConfigEvent, "CONFIG_EVENT_"..common.GetAddonName())
common.RegisterEventHandler( ConfigButtonResponse, "CONFIG_BUTTON_"..common.GetAddonName())

What's New in Version 7   See changelog


  • фикс под обновление 7.0 (от LEM)

User Feedback

You may only provide a review once you have downloaded the file.



Как адон вызвать?, в списке он есть а так нету.

Share this review

Link to review