Skip to content
This repository has been archived by the owner on Jul 28, 2022. It is now read-only.

Commit

Permalink
Fade doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Sleitnick committed Jan 6, 2020
1 parent d52a459 commit 1f15fe7
Showing 1 changed file with 131 additions and 1 deletion.
132 changes: 131 additions & 1 deletion docs/module_docs/client_controllers/fade.md
Original file line number Diff line number Diff line change
@@ -1 +1,131 @@
Coming soon
The Fade controller allows for easy and simple fade-in and fade-out effects on the screen.

## Methods

### `In([Number duration [, Boolean async]])`
Fade in from black.

```lua
Fade:In() -- Fade in over 0.5 seconds
Fade:In(1.5) -- Fade in over 1.5 seconds)
Fade:In(1.5, true) -- Fade in asynchronously over 1.5 seconds
```

---------------------------

### `Out([Number duration [, Boolean async]])`
Fade out to black.

```lua
Fade:Out() -- Fade out over 0.5 seconds
Fade:Out(1.5) -- Fade out over 1.5 seconds)
Fade:Out(1.5, true) -- Fade out asynchronously over 1.5 seconds
```

---------------------------

### `To(Number transparency [, Number duration [, Boolean async]])`
Fade to the given transparency, starting at whatever the current fade transparency is set.

```lua
Fade:To(0.75) -- Fade to a transparency of 0.75 (75%)
```

---------------------------

### `FromTo(Number from, Number to [, Number dur [, Boolean async]])`
Fade from one transparency level to another. This is also used internally by the `In` and `Out` fade methods.

```lua
Fade:FromTo(0.75, 0.25) -- Fade from 0.75 to 0.25
```

---------------------------

### `SetText(String text)`
Set the text that will show up in the center of the screen when the fade screen is visible.

```lua
Fade:SetText("Hello world")
```

---------------------------

### `ClearText()`
Clear the text on the fade screen.

```lua
Fade:ClearText()
```

---------------------------

### `SetTextSize(Number textSize)`
Set the text size for the fade screen label.

```lua
Fade:SetTextSize(24)
```

---------------------------

### `SetFont(Font font)`
Set the font for the fade screen label.

```lua
Fade:SetFont(Enum.Font.Highway)
```

---------------------------

### `SetBackgroundColor(Color3 color)`
Sets the background color of the fade frame.

```lua
Fade:SetBackgroundColor(Color3.new(0.5, 0.5, 0.5))
```

---------------------------

### `SetTextColor(Color3 color)`
Sets the text color of the fade text label.

```lua
Fade:SetBackgroundColor(Color3.new(1, 0, 0))
```

---------------------------

### `SetEasingStyle(EasingStyle easingStyle)`
Sets the tween easing style for the fading effect. Defaults to Quad.

```lua
Fade:SetEasingStyle(Enum.EasingStyle.Quint)
```

---------------------------

### `GetScreenGui()`
Returns the ScreenGui used by the Fade controller.

```lua
local gui = Fade:GetScreenGui()
```

---------------------------

### `GetFrame()`
Returns the Frame used by the Fade controller.

```lua
local gui = Fade:GetFrame()
```

---------------------------

### `GetLabel()`
Returns the TextLabel used by the Fade controller.

```lua
local gui = Fade:GetLabel()
```

0 comments on commit 1f15fe7

Please sign in to comment.