Implement #3168#3173
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 211c215351
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
/clang-format |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d2aff1905b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
/clang-format |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aa51937953
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| int numOfBytes = 0; | ||
| while ((ch = *text) != 0x0) | ||
| { | ||
| AX_BREAK_IF(!ch || charCount > charLimit); |
There was a problem hiding this comment.
Enforce char limit before consuming next UTF-8 character
The truncation helper allows one extra character because it stops only when charCount > charLimit, not when it reaches the limit. When insertText clips pasted/IME input to the remaining capacity, this off-by-one lets _inputText grow beyond _charLimit by one UTF-8 character (e.g., remaining=1 still accepts 2 chars), leaving the widget in an invalid state until later edits.
Useful? React with 👍 / 👎.
| _passwordCharWidth = measureText(_passwordChar).width; | ||
| _layoutDirty = true; |
There was a problem hiding this comment.
Refresh cursor metrics after changing font size
setFontSize updates the render font but does not recompute _lineHeight (or resize the cursor to the new line height), even though cursor placement/selection geometry depends on _lineHeight. After changing font size at runtime, caret position, selection rectangles, and vertical cursor movement are computed from stale metrics and become visibly misaligned.
Useful? React with 👍 / 👎.
Describe your changes
Issue ticket number and link
Checklist before requesting a review
For each PR
Add Copyright if it missed:
-
"Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md)."I have performed a self-review of my code.
Optional:
For core/new feature PR
Axmol 3.x ------------------------------------------------------------
For each 3.x PR