Bot Tabs Example
#69
This will allow you to add tabs to your bot.
I will not be supporting this.
This is an example only. If you do not know how to use it, then you shouldn't be using it.
Its not perfect but its an example. If you are coding your own interfaces you will know what to do with it.
You do not need the loop.
This is an example only. If you do not know how to use it, then you shouldn't be using it.
Its not perfect but its an example. If you are coding your own interfaces you will know what to do with it.
You do not need the loop.
--[[
Script made by Lee (Discord: l33_) - www.trainorcreations.com
If you want to support my work, feel free to donate at https://trainorcreations.com/donate
PS. Stop ripping off my work and selling it as your own.
]]--
rootWidget = g_ui.getRootWidget()
if rootWidget then
ListWindow = UI.createWindow('tmpListsWindow', rootWidget)
TabBar = ListWindow.tmpTabBar
TabBar:setContentWidget(ListWindow.tmpTabContent)
for v = 1, 4 do
tmpPanel = g_ui.createWidget("tPanel") -- Creates Panel
tmpPanel:setId("panelButtons" .. v) -- sets ID
TabBar:addTab("Test" .. v, tmpPanel) -- Adds the New Tab Button and links to the Panel from above.
-- example button added.
-- you will need to make your own layouts etc.for
UI.Label("Test" .. v,tmpPanel)
UI.Separator(tmpPanel)
UI.Button("Test Talk" .. v, function()
g_game.talk("test" .. v)
end, tmpPanel)
UI.Separator(tmpPanel)
end
end
tPanel < Panel
margin: 3
layout:
type: verticalBox
tmpListsWindow < MainWindow
!text: tr('Test Bars')
size: 218 258
@onEscape: self:hide()
TabBar
id: tmpTabBar
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
Panel
id: tmpTabContent
anchors.top: tmpTabBar.bottom
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
image-source: /images/ui/panel_flat
image-border: 5
17 Nov 2021