-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7a7e284
commit 0b23ff3
Showing
8 changed files
with
181 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Installer V2 | ||
|
||
Implantation | ||
|
||
```shell | ||
if [ "$MMRL_INTR" = "true" ]; then | ||
mmrl_exec() { ui_print "#!mmrl:$*"; } | ||
gui_print() { mmrl_exec color "\"$@\""; } | ||
mmrl_setLastLine() { mmrl_exec setLastLine "\"$@\""; } | ||
gui_image() { mmrl_exec addImage "$*"; } | ||
else | ||
mmrl_exec() { true; } | ||
gui_print() { ui_print "$@" | sed 's/<[A-Z.]*>//g'; } | ||
mmrl_setLastLine() { true; } | ||
gui_image() { true; } | ||
fi | ||
``` | ||
|
||
## Internal commands | ||
|
||
Every internal command starts with `mmrl_exec`! | ||
|
||
### Clear terminal | ||
|
||
Clears everything from the terminal | ||
|
||
```shell | ||
mmrl_exec clearTerminal | ||
``` | ||
|
||
| Args | Description | | ||
| ---- | ----------- | | ||
| No | | | ||
|
||
### Replace last line | ||
|
||
You can replace the last placed line, even the last line is a button | ||
|
||
```shell | ||
mmrl_exec setLastLine "This is a cool log" | ||
``` | ||
|
||
| Args | Description | | ||
| --------- | -------------------------------------- | | ||
| `args[0]` | Text that should replace the last line | | ||
|
||
### Remove last line | ||
|
||
This command just removes the last line | ||
|
||
```shell | ||
mmrl_exec removeLastLine | ||
``` | ||
|
||
| Args | Description | | ||
| ---- | ----------- | | ||
| No | | | ||
|
||
### Add a button | ||
|
||
This command can a little bit more but it has less functionality because you can't a click event | ||
|
||
```shell | ||
mmrl_exec addButton "Button text here" --variant "contained or outlined" | ||
``` | ||
|
||
| Args | Description | | ||
| ----------- | ----------------------------------------- | | ||
| `args[0]` | Button text | | ||
| `--variant` | Choose between `contained` and `outlined` | | ||
|
||
## Making colored text easir! | ||
|
||
When you implant the API you can start using `gui_print`. | ||
|
||
```shell | ||
gui_print "This is <FG.MAGENTA>MMRL<R>!" | ||
``` | ||
|
||
> [!NOTE] | ||
> Other installer will return `This is MMRL!` because it's a MMRL only syntax |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.