Поиск по STEAMB

Игры по онлайну и скины по объёму продаж

Ничего не найдено

Попробуйте другое название или переключите категорию.

Меню

Интерфейс

Float Sub-Menus

Положительные голоса99%895 голосов игроков
Подписчики147,9 тыс.147 931 в Steam Workshop
Размер файла1 006,83 КБЗагрузка через Steam
Обновление автора20 июл. 2025 г.Дата обновления материала
Float Sub-Menus

Добавить в игру через Steam

  1. Перейдите в Steam

    Откроется страница именно этого материала.

    Открыть в Steam Workshop
  2. Нажмите «Подписаться»

    На странице Steam войдите в аккаунт, если потребуется.

    Подписаться

О материале

«Float Sub-Menus» — материал мастерской RimWorld. Моды для колонии: новые возможности, предметы и удобство игры. Данные Steam, описание автора и ссылка для установки через подписку. Совместимость редакцией не проверена.

Описание автора

Adds support for having sub-menus in float menus. Also includes a search field, divider bar, and some other useful elements for float menus.

This is intended as a library mod, allowing any mod developer to add sub-menus to their float menus.

For players

You only need this mod if another mod has a dependency on it.

Compatibility

No known incompatibilities.

If you get errors

If an error in the log mentions FloatMenu, FloatMenuOption or FloatMenuMakerMap, that does not mean that it is related to this mod. They are from vanilla, and you need to look further down in the error message. Only if the error mentions FloatSubMenu, FloatMenuSearch or FloatMenuFilter does it point to having anything to do with this mod.

For mod developers

Dependency vs Copying DLL

I urge you to add a dependency to this mod rather than copying the DLL into your own mod, as copying can cause issues when using several mods that have copied different versions of the DLL. I am careful not to break backwards compatibility.

If you despite this choose to copy the DLL, please add kathanon.FloatSubMenu to the loadAfter element of your About.xml. This will avoid any such problems as long this mod is in the mod list, by making sure that the copied DLL is only used if this mod is not present.

Sub menus

Add an instance of the FloatSubMenu class in the list of FloatMenuOptions when creating a FloatMenu, and that option will open up a sub-menu when the mouse enters it. They can also be nested, by adding it to the list of options for another FloatSubMenu.

Search field

To add a quick search field that filters the menu items on the label, add an instance of the FloatMenuSearch class in the list of FloatMenuOptions when creating a FloatMenu. The constructor takes a bool, with true meaning that it does a tree search down into any sub-menus and false meaning that it only filters based on items at the same level.

Menu divider

To add menu dividers, add an instance of the FloatMenuDivider class in the list of FloatMenuOptions. The constructor takes an optional label string.

If you use the mod, please drop a comment - I would love to see what you have done with it. :)

Compatibility

The FloatSubMenu class has static factory methods that create either a FloatSubMenu or a normal FloatMenuOption that opens the sub menu when selected, depending on if any known incompatible mods are loaded. Use CompatMMMCreate when adding sub-menus to the menu created by FloatMenuMakerMap, and CompatCreate otherwise.

Achtung! Achtung rewites the float menu shown when right-clicking on something on the map in a way that is not compatible with Float Sub-Menus. It should be compatible when used in other menus, though.

When adding menu items to the map right-click menu (the one generated by FloatMenuMakerMap), I suggest detecting if Achtung! is active, and falling back to opening a second menu instead if it is. Using (the CompatMMMCreate variants of) the factory methods gives this behavior.

Source

Source code at Github It is under a BSD license, so feel free to grab the source code if you prefer that to adding a dependency. I am working on expanding this into a general UI library, so there are already more than the float menus, and I am actively adding more.

Оригинал в Steam Workshop

Как установить и запустить

Откройте оригинальную страницу в Steam Workshop, проверьте версию игры, зависимости и порядок загрузки в описании автора. Нажмите «Подписаться» и дождитесь загрузки Steam. Включите материал в меню модификаций или контента игры, если это требуется. Совместимость и запуск редакцией не проверены.

Настройки cookies

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

Технологии, провайдеры и сроки хранения