Add functionality to set text for input node#8
Open
kerabromsmu wants to merge 4 commits intoandsve:masterfrom
Open
Add functionality to set text for input node#8kerabromsmu wants to merge 4 commits intoandsve:masterfrom
kerabromsmu wants to merge 4 commits intoandsve:masterfrom
Conversation
Added instruction to add input bindings to game.input_binding
Fix paragraphs
Added the **set_text** parameter to dirtylarry:input() method. If this parameter is set (i.e. not nil), then the text on the input field is set to this parameter's value. Passing an empty string will set the input field to empty. Type of value is not checked.
Contributor
Author
|
Hello! It's been a while since I made this PR. Would you accept or decline it? |
Owner
|
Hey! Sorry for the late reply, been on vacation! I'm thinking if it actually should be a separate function, like; dirtylarry:set_input_text("input_node", "replacement text")Mostly since it might be confusing to set/reset text of an input using the "handle input" function. Then it would be possible to set the text of a input node without the need to run all the input handling code as well. Like; dirtylarry:button("clear_button", action_id, action, function()
dirtylarry:set_input_text("input_node", "")
end)On the other hand, this might be a bit against the imgui-ish style of dirtylarry... I love that you want to contribute! ❤️ |
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.
Added the set_text parameter to dirtylarry:input() method. If this parameter is set (i.e. not nil), then the text on the input field is set to this parameter's value. Passing an empty string will set the input field to empty. Type of value is not checked.