AustL / PygameWidgets

A module for use with Pygame. Includes fully customisable buttons, textboxes, sliders and many more, as well as the ability to create and run animations on these widgets.
MIT License
57 stars 16 forks source link

Bug in textbox where text can surpass the text max length. #43

Closed tgonzalez89 closed 3 years ago

tgonzalez89 commented 3 years ago

Describe the bug If text is already present in a textbox and the cursor if moved to the left and more text is introduced, the textbox widget's check for maxLengthReached doesn't work correctly and extra text is allowed to be entered.

To Reproduce Steps to reproduce the behaviour:

  1. Enter some text in the textbox.
  2. Move the cursor all the way to the left.
  3. Introduce more text.
  4. Observe that the text introduced in step 1 moves out of the textbox.

Expected behaviour No text should've been allowed to be entered in the textbox past the textbox borders.

Screenshots image

Version Numbers