Adjustable TabWindows

Share your scripts and packages with other Mudlet users.
Post Reply
Alyven
Posts: 16
Joined: Sat Oct 01, 2011 8:43 pm

Adjustable TabWindows

Post by Alyven »

Adjustable Tabwindows are tabbed windows for containers powered by Adjustable Container.

Base was the TabWindow example on the Geyser page in the Mudlet wiki.

Tabs can be dragged from one tab-bar to the next tab-bar, if dropped into the empty a window with the tab content will be created.
Tabs can also be moved from one tab-bar to the other by double-click which also allows them to change their parent window, which means you can send them to a tab-bar located in a UserWindow.

Short demo video: https://www.youtube.com/watch?v=2ttFWZUggEc
The GitHub page is: https://github.com/Edru2/AdjustableTabWindow
Release can be found here: https://github.com/Edru2/AdjustableTabWindow/releases

To install directly copy/paste this into Mudlet commandline:
Code: [show] | [select all] lua
lua local a="https://raw.githubusercontent.com/Edru2/AdjustableTabWindow/master/AdjustableTabWindow.xml"function d(b,c)if not c:find("AdjustableTabWindow",1,true)then return end installPackage(c)os.remove(c)cecho("<lime_green>Package installed!\n")end registerAnonymousEventHandler("sysDownloadDone","d")downloadFile(getMudletHomeDir()..(a:ends("xml")and"/AdjustableTabWindow.xml"or"/AdjustableTabWindow.zip"),a)
To create a new Adjustable TabWindow write for example:
Code: [show] | [select all] lua
  tabwindow =
    tabwindow or
    Adjustable.TabWindow:new(
      {
        name = "tabwindow",
        x = 0,
        y = 0,
        width = "30%",
        height = "40%",
        tabBarHeight ="10%",
        tabs = {"MyGauge","Tab1", "Tab2", "Tab3", "MapTab"},
      }
    )
The names of the tabs in this tab-bar are defined in tabs, what are the tabs which will be created.
To put something into the tabs, for example the Mapper in the MapTab use:
Code: [show] | [select all] lua
 mapper =
    mapper or Geyser.Mapper:new({x = 0, y = 0, width = "100%", height = "100%", name="mapper"}, tabwindow.MapTabcenter)
The container will always have the name Tabname + center

An example package ( the one in the video) is attached,
you need to install Adjustable TabWindows first to get it to work (see links above)

Documentation can be found at: https://github.com/Edru2/AdjustableTabWindow/wiki

Edit:
16th May 2020
New release adds the possibility to transfer your EMCO to your Adjustable.TabWindow

Have fun!
Attachments
tabwindowtest.xml
(43.51 KiB) Downloaded 36 times

Post Reply