Перейти к содержанию

Дайджесты за январь-февраль

Обновления гайдов и аддонов

Январь Февраль

Мониторинг серверов и редактор аддонов

Представляем вам две легенды. То, о чем можно было только мечтать, стало реальностью.

Мониторинг серверов Редактор аддонов

Подсказки из игры на вашем сайте

Теперь вы можете отображать сведения о внутриигровых элементах простым наведением курсора мыши.

Подробнее

Апдейтер аддонов

Представляем вам программу для автообновления аддонов и делимся подробностями.

Подробнее Скачать

ConfigWindow


Ciuine

Рекомендуемые сообщения

http://alloder.pro/files/file/28-configwindow/Нажмите здесь, чтобы скачать файл

Type /cw to access Configwindow.

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.

Demonstration 1 (actual configuration buttons for NamePlateBars minus IconTabled);

2co53ki.jpg

Seen in this image is a large list of true/false buttons, generated with a single loop of code from the owner add-on.

Also seen is a demonstration of the tabled buttons which allow the user to easily switch forward and backward through a predefined table stored in the owner add-on.

Demonstration 2 (not actual configuration buttons for NNRS);

ri83e0.jpg

Seen in this image is a fake IconTable with no icons.

A slider button which sends an event every time the slider is moved to the owner add-on.

A color button, which can be changed based on the color sliders in the right side of the window.

Two EditLine buttons, one numeric and one string, clicking these opens and focuses on an EditLine to which the user can type in information and press enter to send the information to the owner add-on.

A true/false button.

Ссылка на комментарий
Поделиться на другие сайты

ConfigWindow

Просмотр файла

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" -


Code:
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 -
    Code:
    userMods.SendEvent("CONFIG_EVENT_RESPONSE", {NoB = 0, name = "Dance", btnType = "T/F", state = true})

Response to "CONFIG_CHANGE_BUTTON_RESPONSE" -

  • 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 -
    Code:
    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:

Code:
--CONFIG WINDOW COOPERATION
function ConfigInitEvent()
userMods.SendEvent("CONFIG_INIT_EVENT_RESPONSE", { sender = common.GetAddonName() })
end

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
end
end

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

Code:
function Init()
-- CONFIG WINDOW EVENTS (INIT, RESPONSE, BUTTON)
common.RegisterEventHandler( ConfigInitEvent, "CONFIG_INIT_EVENT" )
common.RegisterEventHandler( ConfigEvent, "CONFIG_EVENT_"..common.GetAddonName())
common.RegisterEventHandler( ConfigButtonResponse, "CONFIG_BUTTON_"..common.GetAddonName())
end

 

Ссылка на комментарий
Поделиться на другие сайты

  • 4 месяца спустя...

из всего этого, вижу для себя полезное только - настройку цвета.

слишком он громоздкий

уж точно все мои настройки из TM ни в какой CW не влезут

Ссылка на комментарий
Поделиться на другие сайты

  • 3 недели спустя...

При запуске /cw отоброжается пустое окно, как добавить туда адоны?

Ссылка на комментарий
Поделиться на другие сайты

Only add-ons that support ConfigWindow will show up. ShipHUD, NCT, PlayerHUD, NamePlateBars, DamageMeters, DoTTimer, and WhisperWindow, currently support it; I don't know if there are others.

Ссылка на комментарий
Поделиться на другие сайты

  • 2 года спустя...
  • 2 недели спустя...
  • 9 месяцев спустя...

Хотел использовать для настройки доттаймера, но конфиг показал только название, настроек небыло.

Ссылка на комментарий
Поделиться на другие сайты

  • 6 месяцев спустя...

ConfigWindow r7
- правка EditLine.(WidgetEditLine).xdb

ConfigWindow.zip

Изменено пользователем Fye D. Flowright
обновил дистрибутив
Ссылка на комментарий
Поделиться на другие сайты

ВНИМАНИЕ!
Обязательна информация из \Personal\Logs\mods.txt для диагностики ошибки.
Иначе вам не помочь.
В игре включите в Меню → Интерфейс → Общие настройки → Запись ошибок пользовательских дополнений. Затем запустите аддон в игре.
Гость
Ответить в этой теме...

×   Вставлено с форматированием.   Восстановить форматирование

  Разрешено использовать не более 75 эмодзи.

×   Ваша ссылка была автоматически встроена.   Отображать как обычную ссылку

×   Ваш предыдущий контент был восстановлен.   Очистить редактор

×   Вы не можете вставлять изображения напрямую. Загружайте или вставляйте изображения по ссылке.

×
×
  • Создать...

Важная информация

Пользуясь сайтом, вы принимаете Условия использования