New Command 2058 - String Picture Menu #3246
Open
jetrotal wants to merge 12 commits intoEasyRPG:masterfrom
Open
New Command 2058 - String Picture Menu #3246jetrotal wants to merge 12 commits intoEasyRPG:masterfrom
jetrotal wants to merge 12 commits intoEasyRPG:masterfrom
Conversation
…ID (*) Mode = 0 : Initialisation Mode = 1 : RightAfter, you need ShowChoices command. Everything is automatic Mode = 2 : Update You will need parameters after Mode Mode = 3 : Disable window Params with (*) is only for mode 2. You always need mode 0 before mode 1/2/3 Mode 2/3 are for "manual" system Mode 1 is for "automatic" system
command became: ```js @raw 9992, "", Mode, // 0: Enable Menu || 1: Disable Menu TargetIsVar, Target, // String Picture's ID OutputIsVar, Output // Optional. A variable that will receive the current selected Menu; ```
To do that, I flicker between currently used system and the system extracted from a strpic. Kinda hacky, but it does its job.
There's a hardcoded 4 in window_selectable.cpp I wonder if that value is always like this. Also when the line spacer is smaller than 4, it creates a scrollable menu that is not necessary.
… borderless more hardcoded numbers to re-center the menu when the border is off Still need to figure out a problem when cursor index is 0 and when it's max amount of items. The problem is that half of those cursors are cut in half, because it goes beyond its image container.
Change that fix an issue that happens when calling `window->CreateContents();` - The issue is that It cuts text's image in half, not being possible to recover them when changing the window size.
- Lambda Functions - Menu can output Position and State of Cursor as variables - Show Choices properly mapped.
There was a big chunk of code that was written twice inside two for loops. I put them inside a single lambda function to ease its readability.
9dea2b3 to
1b5c622
Compare
the substrings "\/" are the tag that points to a link CommandStringPicMenu - Fix glitch related to the command is at the end of a list of commands
1b5c622 to
c0d7560
Compare
Member
|
Can you move this up by one? Want to put "Delete Map Event" on 2057. |
Contributor
Author
Sure, gimme a sec. |
As requested by @Ghabry
Contributor
Author
|
done |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Transforms a String Picture into a menu.

MAP DEMO: StringPicMenu.zip - Updated 01/August/24
Paste it inside a new project.
You can control the outputs from the menu through two approaches:
A - Points it to variables that will receive
Menu's cursor positionandMenu's cursor state.B - Add a
Show Choices Commandright bellow theString Picture Menu Command.The Menu will replace the Show Choices UI, while reproducing its behavior.
Syntax (TPC):
Some of the parameters comes in pairs. The first parameter of each pair indicates whether you are using a direct value or a variable/indirect variable, through ValueOrVariable().Thanks to @MackValentine, for the initial commits.