@quenty/guivisiblemanager 3.2.1-canary.8533eea.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,7 +3,7 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [3.2.1-canary.8533eea.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/guivisiblemanager@3.2.0...@quenty/guivisiblemanager@3.2.1-canary.8533eea.0) (2021-12-18)
6
+ # [3.3.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/guivisiblemanager@3.2.0...@quenty/guivisiblemanager@3.3.0) (2021-12-18)
7
7
 
8
8
  **Note:** Version bump only for package @quenty/guivisiblemanager
9
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/guivisiblemanager",
3
- "version": "3.2.1-canary.8533eea.0",
3
+ "version": "3.3.0",
4
4
  "description": "Help manage the visibility of GUIs while only constructing the Gui while visible",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -25,13 +25,13 @@
25
25
  "Quenty"
26
26
  ],
27
27
  "dependencies": {
28
- "@quenty/baseobject": "3.2.0",
29
- "@quenty/cancellabledelay": "2.0.1-canary.8533eea.0",
30
- "@quenty/loader": "3.1.1",
31
- "@quenty/maid": "2.0.1"
28
+ "@quenty/baseobject": "^3.2.0",
29
+ "@quenty/cancellabledelay": "^2.1.0",
30
+ "@quenty/loader": "^3.1.1",
31
+ "@quenty/maid": "^2.0.1"
32
32
  },
33
33
  "publishConfig": {
34
34
  "access": "public"
35
35
  },
36
- "gitHead": "8533eeade3bf6835c0295785c1c326b9abee3222"
36
+ "gitHead": "6eb398e9fb81191f0815885f807ab0cb3bb9bad1"
37
37
  }
@@ -25,6 +25,10 @@ function GuiVisibleManager.new(promiseNewPane, maxHideTime)
25
25
  self._paneVisible.Value = false
26
26
  self._maid:GiveTask(self._paneVisible)
27
27
 
28
+ self._theme = Instance.new("StringValue")
29
+ self._theme.Value = "Light"
30
+ self._maid:GiveTask(self._theme)
31
+
28
32
  self._showHandles = {}
29
33
 
30
34
  self._maid:GiveTask(self._paneVisible.Changed:Connect(function()
@@ -60,6 +64,12 @@ function GuiVisibleManager:BindToBoolValue(boolValue)
60
64
  end
61
65
  end
62
66
 
67
+ function GuiVisibleManager:SetPreferredTheme(theme)
68
+ assert(theme == "Light" or theme == "Dark", "Bad theme")
69
+
70
+ self._theme.Value = theme
71
+ end
72
+
63
73
  function GuiVisibleManager:CreateShowHandle()
64
74
  assert(self._showHandles, "Not initialized yet")
65
75
 
@@ -116,6 +126,14 @@ function GuiVisibleManager:_handleNewPane(maid, pane)
116
126
 
117
127
  maid:GiveTask(pane)
118
128
 
129
+ if pane.SetPreferredTheme then
130
+ -- Theming
131
+ pane:SetPreferredTheme(self._theme.Value)
132
+ maid:GiveTask(self._theme.Changed:Connect(function()
133
+ pane:SetPreferredTheme(self._theme.Value)
134
+ end))
135
+ end
136
+
119
137
  local function updateVisible()
120
138
  if self._paneVisible.Value then
121
139
  pane:Show()