Advertisement
virelen

Untitled

Apr 2nd, 2024
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.87 KB | None | 0 0
  1. local defaultConfig = {activeColor = "black", inactiveColor = "black", activeBorder = "green", activeText = "green", inactiveText = "grey", background = "black", windowBorder = "green", title = "green"}
  2. local emco = require("EMCOChat.emco")
  3. emco.cmdLineStyleSheet = nil
  4. auror = auror or {}
  5. auror.helpers = auror.helpers or {}
  6. auror.config = auror.config or defaultConfig
  7. local baseStyle = Geyser.StyleSheet:new(f [[
  8.   border-width: 2px;
  9.   border-style: solid;
  10. ]])
  11. local activeStyle = Geyser.StyleSheet:new(f [[
  12.   border-color: {auror.config.activeBorder};
  13.   background-color: {auror.config.activeColor};
  14. ]], baseStyle)
  15. local inactiveStyle = Geyser.StyleSheet:new(f [[
  16.   border-color: {auror.config.inactiveColor};
  17.   background-color: {auror.config.inactiveColor};
  18. ]], baseStyle)
  19. local adjLabelStyle = Geyser.StyleSheet:new(f[[
  20.   background-color: rgba(0,0,0,100%);
  21.   border: 4px double;
  22.   border-color: {auror.config.windowBorder};
  23.   border-radius: 4px;]])
  24.  
  25. local default_constraints = {name = "aurorInfoContainer", x = "-25%", y = "-60%", width = "25%", height = "60%", titleText = "AUROR"}
  26.  
  27. function auror.gui.resetToDefaults()
  28.   default_constraints.adjLabelstyle = adjLabelStyle:getCSS()
  29.   auror.container = auror.container or Adjustable.Container:new(default_constraints)
  30.   auror.config = defaultConfig
  31.   auror.info = emco:new({
  32.     name = "Auror",
  33.     x = "50%",
  34.     y = 0,
  35.     height = "100%",
  36.     width = "50%",
  37.     consoles = {"Items","Players","Asdf","Why","five","six","seven"},
  38.     allTab = true,
  39.     allTabName = "All",
  40.     blankLine = true,
  41.     blink = true,
  42.     bufferSize = 500,
  43.     deleteLines = 500,
  44.     fontSize = 12,
  45.     font = "Ubuntu Mono",
  46.     consoleColor = auror.config.background,
  47.     activeTabCSS = activeStyle:getCSS(),
  48.     inactiveTabCSS = inactiveStyle:getCSS(),
  49.     activeTabFGColor = auror.config.activeText,
  50.     inactiveTabFGColor = auror.config.inactiveText,
  51.     gap = 3,
  52.     commandLine = true,
  53.   }, auror.container)
  54.   aurorEMCO = auror.info
  55.   auror.gui.retheme()
  56. end
  57.  
  58. function auror.gui.retheme()
  59.   activeStyle:set("background-color", auror.config.activeColor)
  60.   activeStyle:set("border-color", auror.config.activeBorder)
  61.   inactiveStyle:set("background-color", auror.config.inactiveColor)
  62.   inactiveStyle:set("border-color", auror.config.inactiveColor)
  63.   adjLabelStyle:set("border-color", auror.config.windowBorder)
  64.   local als = adjLabelStyle:getCSS()
  65.   auror.container.adjLabelstyle = als
  66.   auror.container.adjLabel:setStyleSheet(als)
  67.   auror.container:setTitle(auror.container.titleText, auror.config.title)
  68.   aurorEMCO.activeTabCSS = activeStyle:getCSS()
  69.   aurorEMCO.inactiveTabCSS = inactiveStyle:getCSS()
  70.   aurorEMCO:setActiveTabFGColor(auror.config.activeText)
  71.   aurorEMCO:setInactiveTabFGColor(auror.config.inactiveText)
  72.   aurorEMCO:setConsoleColor(auror.config.background)
  73.   aurorEMCO:switchTab(aurorEMCO.currentTab)
  74. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement