View Full Version : Adding new menu items
peterb
September 12th, 2024, 13:04
I've added a few new items to the menu. One of the shows up under "Character" which is what I expected but two shows up under "Campaign". Where do I specify under which menu category an item should appear?
61947
superteddy57
September 12th, 2024, 13:52
You would need to set the sSidebarCategory in your library entry. The string you use here will then need to be declared as a string resource with the prefix library_category_label_
An example:
--data_library_<ruleset>.lua
aRecordOverrides = {
["location"] = {
aDataMap = { "location", "reference.location" },
aGMListButtons = { "button_settlement_structures", "button_settlement_rooms", "button_settlement_objects" },
sSidebarCategory = "world",
tOptions = {
bExport = true,
},
},
};
function onInit()
LibraryData.overrideRecordTypes(aRecordOverrides);
end
--your string file
<string name="library_category_label_world">World</string>
peterb
September 12th, 2024, 14:06
Yes, I managed to show them in a new category. But I want to have them shown under the "Character" category. I tried "sSidebarCategory = "character" but that created a new category...
superteddy57
September 12th, 2024, 14:07
Oh apologies, the category name is 'create'
peterb
September 12th, 2024, 14:14
Yes! That did it. Thanks!
Powered by vBulletin® Version 4.2.1 Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.