Adjustable TabWindows

Share your scripts and packages with other Mudlet users.
Post Reply
Alyven
Posts: 23
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

Edit:
17th August 2020

convertEMCO/full EMCO compatibility and sendingTabs to Geyser UserWindows

new Features
  • convertEMCO to give your EMCO the Adjustable TabWindow functionality but the style will be preserved (in comparison to transferEMCO)
    full EMCO compatibility
  • TabBoxHeight can now also be given in pixels
  • DoubleClick and then clicking anywhere on the window transforms the tab into a TabWindow which with the same method can now also be send to a UserWindow without the need of having an Adjustable.TabWindow already in the UserWindow
  • All EMCO tab styling functions and some constraints are available now also for Adjustable TabWindows
BugFixes
  • TabText even if set to be in the middle will be visible if tab is transformed into a window
  • different small problems with remove/addTab
  • style reset after time runs out for chosentab
  • several smaller fixes
Edit:
28th August 2020

Browser like tabs and save/load slots

new Features
  • Browser like tabs, drop tab on floating window to transfor it into it‘s own temporary TabWindow
  • Tabify menu in floating TabWindows right click menu also creates a temporary TabWindow
  • Tabify menu through function :addTabifyMenu addable to every Adjustable Container
  • Tabify and save/load any container even after the creation of the TabWindow with :tabwindow:addToTabWindow(container)
  • save/load to/from custom directory
  • save/load slots to save and load settings very flexible or to create backups
BugFixes
  • Resizing if sent to UserWindow was wrong
  • tabwindow styles are saved now when using save/load
  • many other smaller fixes
other
  • restructuration of code showed that containerstyle was never visible and not needed anymore
  • show ToolTip if tabname is to long


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

Post Reply