Skip to content

Add updated color tag and other tag references #76

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added assets/Popup_TagReference.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 3 additions & 12 deletions tutorials/popup.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,9 @@ public:

`FLAlertLayer` supports colored text in the content field by default. You can add colors with **color tags**, for example `<cy>Hi mom!</c>` will produce yellow text. The built-in color tags in GD are:

| Tag | Color |
|-----|-------------------------------------|
| cb | <span style="color: #4a52e1">Blue</span> |
| cg | <span style="color: #40e348">Green</span> |
| cl | <span style="color: #60abef">Aqua</span> |
| cj | <span style="color: #32c8ff">Cyan</span> |
| cy | <span style="color: #ffff00">Yellow</span> |
| co | <span style="color: #ffa54b">Orange</span> |
| cr | <span style="color: #ff5a5a">Red</span> |
| cp | <span style="color: #ff00ff">Pink</span> |
[Image showing all different color tags with additional tags](/assets/Popup_TagReference.png)

> The other tags (Fade, Shake, Delay) only work for DialogLayer.

```cpp
FLAlertLayer::create(
Expand All @@ -90,8 +83,6 @@ FLAlertLayer::create(
)->show();
```

Note that the closing tag **must be `</c>` only without the color specified again**. Doing otherwise will likely result in a crash.

> You might wonder about how to use other colors than the ones listed; there are currently no plans in Geode to add that, but one could easily make a mod that adds support for arbitary color tags.

## Disabling the popup animation
Expand Down