@quenty/basicpane 3.1.3-canary.c50dead.0 → 3.2.1
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 +10 -2
- package/LICENSE.md +1 -1
- package/README.md +5 -21
- package/package.json +5 -5
- package/src/Client/BasicPane.lua +54 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,12 +3,20 @@
|
|
|
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.1
|
|
6
|
+
## [3.2.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/basicpane@3.2.0...@quenty/basicpane@3.2.1) (2021-12-30)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @quenty/basicpane
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.2.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/basicpane@3.1.2...@quenty/basicpane@3.2.0) (2021-11-20)
|
|
7
15
|
|
|
8
16
|
|
|
9
17
|
### Bug Fixes
|
|
10
18
|
|
|
11
|
-
* Support MacOS syncing ([
|
|
19
|
+
* Support MacOS syncing ([#225](https://github.com/Quenty/NevermoreEngine/issues/225)) ([03f9183](https://github.com/Quenty/NevermoreEngine/commit/03f918392c6a5bdd33f8a17c38de371d1e06c67a))
|
|
12
20
|
|
|
13
21
|
|
|
14
22
|
|
package/LICENSE.md
CHANGED
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
## BasicPane
|
|
2
2
|
<div align="center">
|
|
3
|
-
<a href="http://quenty.github.io/
|
|
4
|
-
<img src="https://
|
|
3
|
+
<a href="http://quenty.github.io/NevermoreEngine/">
|
|
4
|
+
<img src="https://github.com/Quenty/NevermoreEngine/actions/workflows/docs.yml/badge.svg" alt="Documentation status" />
|
|
5
5
|
</a>
|
|
6
6
|
<a href="https://discord.gg/mhtGUS8">
|
|
7
|
-
<img src="https://img.shields.io/
|
|
7
|
+
<img src="https://img.shields.io/discord/385151591524597761?color=5865F2&label=discord&logo=discord&logoColor=white" alt="Discord" />
|
|
8
8
|
</a>
|
|
9
9
|
<a href="https://github.com/Quenty/NevermoreEngine/actions">
|
|
10
10
|
<img src="https://github.com/Quenty/NevermoreEngine/actions/workflows/build.yml/badge.svg" alt="Build and release status" />
|
|
@@ -13,25 +13,9 @@
|
|
|
13
13
|
|
|
14
14
|
Base UI object with visibility and a maid
|
|
15
15
|
|
|
16
|
+
<div align="center"><a href="https://quenty.github.io/NevermoreEngine/api/BasicPane">View docs →</a></div>
|
|
17
|
+
|
|
16
18
|
## Installation
|
|
17
19
|
```
|
|
18
20
|
npm install @quenty/basicpane --save
|
|
19
21
|
```
|
|
20
|
-
|
|
21
|
-
## Usage
|
|
22
|
-
Usage is designed to be simple.
|
|
23
|
-
|
|
24
|
-
### `BasicPane.new(gui)`
|
|
25
|
-
|
|
26
|
-
### `BasicPane:SetVisible(isVisible, doNotAnimate)`
|
|
27
|
-
|
|
28
|
-
### `BasicPane:Show(doNotAnimate)`
|
|
29
|
-
|
|
30
|
-
### `BasicPane:Hide(doNotAnimate)`
|
|
31
|
-
|
|
32
|
-
### `BasicPane:Toggle(doNotAnimate)`
|
|
33
|
-
|
|
34
|
-
### `BasicPane:IsVisible()`
|
|
35
|
-
|
|
36
|
-
### `BasicPane:Destroy()`
|
|
37
|
-
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/basicpane",
|
|
3
|
-
"version": "3.1
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"description": "Base UI object with visibility and a maid",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"Quenty"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@quenty/loader": "3.1.
|
|
29
|
-
"@quenty/maid": "2.0.
|
|
30
|
-
"@quenty/signal": "2.0.
|
|
28
|
+
"@quenty/loader": "^3.1.2",
|
|
29
|
+
"@quenty/maid": "^2.0.2",
|
|
30
|
+
"@quenty/signal": "^2.0.1"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "d146c77d0a8e452824de0ab0b4b03ba0370bcc1b"
|
|
36
36
|
}
|
package/src/Client/BasicPane.lua
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
--[=[
|
|
2
|
+
Base UI object with visibility and a maid
|
|
3
|
+
@class BasicPane
|
|
4
|
+
]=]
|
|
4
5
|
|
|
5
6
|
local require = require(script.Parent.loader).load(script)
|
|
6
7
|
|
|
@@ -11,8 +12,30 @@ local BasicPane = {}
|
|
|
11
12
|
BasicPane.__index = BasicPane
|
|
12
13
|
BasicPane.ClassName = "BasicPane"
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
--[=[
|
|
16
|
+
Gui object which can be reparented or whatever
|
|
17
|
+
|
|
18
|
+
@prop Gui Instance?
|
|
19
|
+
@within BasicPane
|
|
20
|
+
]=]
|
|
21
|
+
--[=[
|
|
22
|
+
Fires whenever visibility changes. FIres with isVisible, doNotAnimate, and a maid which
|
|
23
|
+
has the lifetime of the visibility.
|
|
24
|
+
|
|
25
|
+
:::info
|
|
26
|
+
Do not use the Maid if you want the code to work in Deferred signal mode.
|
|
27
|
+
:::
|
|
28
|
+
|
|
29
|
+
@prop VisibleChanged Signal<boolean, boolean, Maid>
|
|
30
|
+
@within BasicPane
|
|
31
|
+
]=]
|
|
32
|
+
|
|
33
|
+
--[=[
|
|
34
|
+
Constructs a new BasicPane with the .Gui property set.
|
|
35
|
+
|
|
36
|
+
@param gui GuiBase? -- Optional Gui object
|
|
37
|
+
@return BasicPane
|
|
38
|
+
]=]
|
|
16
39
|
function BasicPane.new(gui)
|
|
17
40
|
local self = setmetatable({}, BasicPane)
|
|
18
41
|
|
|
@@ -33,6 +56,12 @@ function BasicPane.new(gui)
|
|
|
33
56
|
return self
|
|
34
57
|
end
|
|
35
58
|
|
|
59
|
+
--[=[
|
|
60
|
+
Sets the BasicPane to be visible
|
|
61
|
+
|
|
62
|
+
@param isVisible boolean -- Whether or not the pane should be visible
|
|
63
|
+
@param doNotAnimate boolean? -- True if this visiblity should not animate
|
|
64
|
+
]=]
|
|
36
65
|
function BasicPane:SetVisible(isVisible, doNotAnimate)
|
|
37
66
|
assert(type(isVisible) == "boolean", "Bad isVisible")
|
|
38
67
|
|
|
@@ -45,22 +74,42 @@ function BasicPane:SetVisible(isVisible, doNotAnimate)
|
|
|
45
74
|
end
|
|
46
75
|
end
|
|
47
76
|
|
|
77
|
+
--[=[
|
|
78
|
+
Shows the pane
|
|
79
|
+
@param doNotAnimate boolean? -- True if this visiblity should not animate
|
|
80
|
+
]=]
|
|
48
81
|
function BasicPane:Show(doNotAnimate)
|
|
49
82
|
self:SetVisible(true, doNotAnimate)
|
|
50
83
|
end
|
|
51
84
|
|
|
85
|
+
--[=[
|
|
86
|
+
Hides the pane
|
|
87
|
+
@param doNotAnimate boolean? -- True if this visiblity should not animate
|
|
88
|
+
]=]
|
|
52
89
|
function BasicPane:Hide(doNotAnimate)
|
|
53
90
|
self:SetVisible(false, doNotAnimate)
|
|
54
91
|
end
|
|
55
92
|
|
|
93
|
+
--[=[
|
|
94
|
+
Toggles the pane
|
|
95
|
+
@param doNotAnimate boolean? -- True if this visiblity should not animate
|
|
96
|
+
]=]
|
|
56
97
|
function BasicPane:Toggle(doNotAnimate)
|
|
57
98
|
self:SetVisible(not self._visible, doNotAnimate)
|
|
58
99
|
end
|
|
59
100
|
|
|
101
|
+
--[=[
|
|
102
|
+
Returns if the pane is visible
|
|
103
|
+
@return boolean
|
|
104
|
+
]=]
|
|
60
105
|
function BasicPane:IsVisible()
|
|
61
106
|
return self._visible
|
|
62
107
|
end
|
|
63
108
|
|
|
109
|
+
--[=[
|
|
110
|
+
Cleans up the BasicPane, invoking Maid:DoCleaning() on the BasicPane and
|
|
111
|
+
setting the metatable to nil.
|
|
112
|
+
]=]
|
|
64
113
|
function BasicPane:Destroy()
|
|
65
114
|
self._maid:DoCleaning()
|
|
66
115
|
self._maid = nil
|