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

Improvement features for Input text box #7308

Merged
merged 40 commits into from
Jan 22, 2025
Merged

Conversation

NeylMahfouf2608
Copy link
Collaborator

@NeylMahfouf2608 NeylMahfouf2608 commented Jan 14, 2025

Padding and maxLength are working as they should right now. They dont affect the editor render, but they work when you launch the game. Text align does not. It is based on the functionnement of 'InputTypes' properties, on my copy, it always align on the right. I tried to hardcode it left in textinputruntimeobject.ts on line 38, in jsExtension.js line 256 and line 692

improvementText

@NeylMahfouf2608 NeylMahfouf2608 requested a review from 4ian as a code owner January 14, 2025 15:15
'rotate3d(0,0,1,' + (this._object.getAngle() % 360) + 'deg)';
this._input.style.padding = this._object.getPadding() + 'px';
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the padding should have a minimum of 0, otherwise you might have some weird results

Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe it should be handled in the method getPadding directly

@@ -113,7 +131,10 @@ namespace gdjs {
this._borderWidth = objectData.content.borderWidth;
this._disabled = objectData.content.disabled;
this._readOnly = objectData.content.readOnly;

this._padding = objectData.content.padding || 0;
Copy link
Owner

Choose a reason for hiding this comment

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

Nice 👍

Copy link
Owner

@4ian 4ian left a comment

Choose a reason for hiding this comment

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

lgtm

@NeylMahfouf2608 NeylMahfouf2608 merged commit f805182 into master Jan 22, 2025
4 of 6 checks passed
@Bouh Bouh deleted the improvement-text-input branch January 24, 2025 23:00
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