Hey, do something like this:
local ISInventoryPagecreateChildren = ISInventoryPage.createChildren
function ISInventoryPage:createChildren()
ISInventoryPagecreateChildren(self)
local titleBarHeight = self:titleBarHeight();
local textWidth = getTextManager():MeasureStringX(UIFont.Small, "your_text");
local button = ISButton:new(0, 0, textWidth, titleBarHeight, "your_text", self, your_function);
button:initialise();
button.tooltip = "your_tooltip"
button.borderColor.a = 0.0;
button.backgroundColor.a = 0.0;
button.backgroundColorMouseOver.a = 0.7;
self:addChild(button);
button:setVisible(true);
-- I'd also expose button for other mods if planning to release public
self.MY_MOD_BUTTON_NAME = button
end
or check out my mod's source here https://github.com/SharePickle/easy-drop-n-loot/blob/master/media/lua/client/KADropnLoot/KAInventoryPageButtons.lua