Skip to content
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

Text Entry patch #2724

Merged
merged 5 commits into from
Oct 30, 2023
Merged

Text Entry patch #2724

merged 5 commits into from
Oct 30, 2023

Conversation

stepa2
Copy link
Contributor

@stepa2 stepa2 commented Aug 12, 2023

  • Added 'Entered' output that indicates that player just entered the text
  • Disabled background blur in UI

@Divran
Copy link
Contributor

Divran commented Aug 12, 2023

Why is this needed, the text output is triggered, is that not enough?

lua/entities/gmod_wire_textentry.lua Outdated Show resolved Hide resolved
lua/entities/gmod_wire_textentry.lua Outdated Show resolved Hide resolved
lua/entities/gmod_wire_textentry.lua Outdated Show resolved Hide resolved
@thegrb93
Copy link
Contributor

Why is this needed, the text output is triggered, is that not enough?

I think entering the same text value would cause it not to trigger. Also is useful to have a normal output for indicating that it was triggered. Not sure what string gate you would use to convert to normal for that.

Copy link
Contributor

@thegrb93 thegrb93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please get rid of the 'hold' code. Especially for the fact that it allows a timer to exist forever.

@thegrb93
Copy link
Contributor

@stepa2

@stepa2
Copy link
Contributor Author

stepa2 commented Oct 2, 2023

Do you want me to remove it completely? It will break dupe compatibility.
I can add upper limit for hold time.

@thegrb93
Copy link
Contributor

thegrb93 commented Oct 2, 2023

Any dupes with hold will just have the hold var ignored. Should leave it in the dupe args though so future code doesn't get incompatible.

@stepa2
Copy link
Contributor Author

stepa2 commented Oct 3, 2023

Some dupes may stop working without hold.
Either ones that rely on text cleaned after specified time to simulate Entered output by, e.g., ~Text & Text E2 check,
or ones that rely on text being held for specified time to simulate Entered in another way like

if(~Use & Use) { timer("check_it",10) }
if(clk("check_it")) {
    useTextInSomeWay(Text)
}

@thegrb93
Copy link
Contributor

thegrb93 commented Oct 3, 2023

I guess it is a small behavior change of text screen. I'm ok with it

@stepa2
Copy link
Contributor Author

stepa2 commented Oct 5, 2023

Text holding behavior can be used (was used by me, for example) as an alternative way to activate E2 on text change.
So removing it will break E2s too

@thegrb93
Copy link
Contributor

thegrb93 commented Oct 5, 2023

Your e2 will still be activated by the Entered output, it will just happen on and off on the same frame. I don't know how that would break your use case.

@stepa2
Copy link
Contributor Author

stepa2 commented Oct 5, 2023

I added Entered input in this PR, there was no such output before.

@thegrb93
Copy link
Contributor

thegrb93 commented Oct 5, 2023

Ok, fine then. We need to add timer.Remove to the SENT's OnRemove function then. That's the last thing it needs.

@stepa2
Copy link
Contributor Author

stepa2 commented Oct 22, 2023

Can this PR be merged now?

@thegrb93 thegrb93 merged commit 269b3b9 into wiremod:master Oct 30, 2023
1 check failed
@stepa2 stepa2 deleted the pr-textentry-patch branch November 5, 2023 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants