Pygame-gui

Latest version: v0.6.12

Safety actively analyzes 685525 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.6.5

Upgrade with: `pip install pygame_gui -U`

This update was building on the work done in 0.6.0 with text to finally add a multi-line text entry UI element, and along the way a range of other smaller issues were fixed.


Major Features

- **NEW `UITextEntryBox`** - Allows for the entering/editing of plain text into a word-wrapped, multi-line box. The aim was to model it closely on Windows Notepad in terms of features and behaviour.

Minor features & enhancements

- **NEW `TEXT_EFFECT_SHAKE`** - Another text effect that applies a shaking effect to words in text boxes.
- **Better support for key word arguments for translations** - most elements with text now support a text_kwargs type parameter that you can pass a dictionary of keywords too - useful if you have data to insert into translated strings.
- **NEW Polish translation** - Thanks to marcinbarylka.
- **UIDropDown enhancements** - It should now open with the selected item visible in the list, allow scrolling the list with the mouse and allow for the list to be updated without having to recreate the drop down from scratch.
- **Dynamic theming changes** - there are now options to update the theming of elements via functions while the application is running.
- **Centre anchors for layouts** - should make it easier to stick elements in the middle of containers and have them stay there.
- **Reducing boilerplate code** - `UIManager`s should now be an optional parameter for all elements (you still need to make at least one), I've also begun some work on passing in a four element tuple instead of a pygame.Rect which should pare down the text passed into elements down to the very minimum required.

Auto-generated pull request notes

These are all the pull requests merged for 0.6.5.

* UIProgressBar themes weren't showing in TOC by ConquerProgramming1 in https://github.com/MyreMylar/pygame_gui/pull/259
* fix issue 273 where newline character causes crash for text_box_layo… by wadsworj in https://github.com/MyreMylar/pygame_gui/pull/274
* Deprecate set_image() for everything except UIImage by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/279
* Fixes & tests to improve coverage & resolve bugs related to untested code by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/280
* Fix for text box not returning to top on scroll bar removal by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/281
* Add KMOD_META as hopefully mac CMD key for keyboard shortcuts by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/283
* Fix for file dialog file list not updating when resizing the dialog by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/282
* Add capability to add & remove items/options to already existing menus & lists by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/284
* Improve test coverage for UI Label by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/286
* A series of small testing coverage improvements by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/287
* A couple more coverage fixes by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/288
* Improve UITextEntryLine test coverage by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/289
* Improve test coverage - batch of fixes by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/290
* Further improvements to UI Elements testing coverage by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/291
* Further coverage elements improve by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/292
* More element coverage fixes & bug fix for selection list by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/296
* Try to improve scrolling container coverage by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/298
* First stabs at boosting test coverage for File Dialog by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/299
* Text box test coverage improvements by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/300
* Fix bool extraction for link params in text box by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/301
* Try adding windows test runner to CI by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/302
* First stab at adding macos test runner by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/303
* See if adding a ParserBase init call pleases LGTM by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/304
* Improve test coverage in core module by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/305
* Start ui element test coverage improvements by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/306
* Improve test coverage in Core submodule by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/307
* Improve appearance theme coverage by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/308
* Improve text submodule test coverage by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/309
* Improve text coverage again by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/310
* Improve text box layout coverage & fix img tag bug by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/311
* Improve text line chunk coverage by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/312
* Last coverage branch by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/313
* Update text effects when first assigned to a text owner by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/314
* Add placeholder text input parameter to text entry line by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/315
* Add clear() to text box and text line by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/316
* Add HOME & END key support to text entry line by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/318
* Add optional pre-parse step to UITextBox converting /n to <br> by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/319
* Add global default UIManager option by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/320
* Add option to drop down menu so only open/close button expands by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/321
* Change drop down to scroll to selected item in list by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/322
* Refactor text effect file structure by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/323
* Add shake effect to text box chunks by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/324
* change text key word arguments param into dictionary on init by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/326
* Add translation text key word argument dictionary params by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/327
* Add new centering anchors for element positioning by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/330
* Add Polish translation file by marcinbarylka in https://github.com/MyreMylar/pygame_gui/pull/336
* pin importlib_resources version to 5.9.0 by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/340
* Remove lgtm, expand linux test to include python 3.10 by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/341
* fix crash in file dialog when backspacing on selected file by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/342
* Add dynamic theming updates & start of text entry box by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/339
* Adding a functional Text Entry Box by MyreMylar in https://github.com/MyreMylar/pygame_gui/pull/344

New Contributors
* wadsworj made their first contribution in https://github.com/MyreMylar/pygame_gui/pull/274
* marcinbarylka made their first contribution in https://github.com/MyreMylar/pygame_gui/pull/336

**Full Changelog**: https://github.com/MyreMylar/pygame_gui/compare/v_064...v_065

Known Issues

- No tab support in new text entry box.
- No undo/redo CTRL+Z/CTRL+SHIFT+Z support in new text entry box.

Thanks for reading!




v_064

0.6.4

Actually fix the slider this time...

v_063

0.6.3

Just a quick release to try and fix the UISlider which got broke in a new way in the last patch release... oops.

v_062

0.6.2

Another smallish release, with some bug fixes and a new type of element - the UIStatusBar by ConquerProgramming1.
There should be a new example in the examples project demonstrating the new status bar


Bug Fixes & Other Changes


- **Fix bug with UITextLine background** - Should now remain the background colour when clicked on.
- **Fix bug with UISlider changed event** - They weren't generating on a single arrow button click.
- **Added fallback characters for hidden text int text entry line** - Some fonts don't have the circle character.
- **Added support for py.typed** - Thanks to ChrisChou-freeman for mentioning this (there are still lots of mypy typing errors to fix)
- **Made K_KP_ENTER key behave the same as K_RETURN for UITextEntryLine** - Thanks to Jamieakuma on the discord.
- **New theming option for the text cursor in the UITextLine** - No more hardcoded white, now you can match it to your UI theme a lot easier.
- **Add a 'pixel_size' option to the html subset font tag** - so you can set the font size directly.

Further thanks & Pull Requests

Lots of hard work from ConquerProgramming1 in this release! Thanks for all the help everyone.

- **New UIStatusBar element** - Thanks to ConquerProgramming1, see (pull 246)
- **Fixed typos in Russian localization** - Thanks to SophieSilver, see (pull 241)
- **Fixes to UIManager docs** - Thanks again to ConquerProgramming1, see (pull 240)
- **Change UIManager process_events() to return True if it uses the event** - Thanks once more to ConquerProgramming1, see (pull 239)


v_061

0.6.1

A quick bug fix release.


Bug Fixes & Other Changes


- **PyInstaller should work correctly with pygame_gui** - Fixed PyInstaller hook added in 0.6.0 not being picked up.
- **Added set_text() to UITextBox** - There were several requests for it.
- **Minor fixes to TextEffect interface** - Added default 'None' in a few places.
- **Fixed API docs not building on read** - the docs (thanks to lionel42)
- **Made K_KP_ENTER key behave the same as K_RETURN for UITextEntryLine** - Thanks to Jamieakuma on the discord.

Further thanks & Pull Requests


Several people stepped up to help improve the google translate localization efforts since the 0.6.0 release.

- **Improved Japanese localization** - Thanks to KansaiGaijin, see (pull 231)
- **Improved Indonesian localization** - Thanks to avaxar, see (pull 232)
- **Improved Russian localization** - Thanks to SophieSilver, see (pull 237)

v_060

0.6.0

-----------------------------------------------------------------

Upgrade with: `pip install pygame_gui -U`

The focus of this update was on everything to do with **text** in the GUI. The full change list is below, but tools to assist with localization is the big new feature.

If anyone out there speaks French, Italian, German, Spanish, Portuguese, Indonesian, Russian, Chinese or Japanese and would like to help, then the new default translation files are [located here](
https://github.com/MyreMylar/pygame_gui/tree/main/pygame_gui/data/translations) and were translated largely through the not-super-reliable google translate. If you have any improvements to suggest to them, pull requests and issues are welcome!

As there were a lot of changes in this update I'm expecting a commensurate amount of bugs, so please as you find them report them over on the Github issue tracker and I'll try to put out a patch early in 2022 with anything that gets found.


Dropped compatibility & Breaking changes
..............................................

- **Dropped support for Pygame 1** - Pygame 2 has been out for some time now and switching fully to Pygame 2 (Pygame 2.0.1 is the new lowest supported version) allows the library to adopt its new features and remove some old compatibility hacks.
- **Dropped support for Python 3.5** - Python 3.5 has been end-of-life for some time. Removing support for it allows the library to use 3.6 onwards features like f strings. This is following pygame 2 also dropping 3.5 (and earlier) support.
- **Simplified UI events** - New events are generated with 'type' set to the previous 'user_type' values. This makes event processing code simpler. Old events will continue to exist until 0.8.0 but please move to the new style of events as they are the only ones that will get new attributes, new events added in 0.6.0 are only in the new style.


Major Features
...............................

- **Localization Support** - There is now some basic support for switching the language of the GUI to one of ten supported languages.
- **New Console Window** - A new default GUI element that provides support for text shell/console type user interaction.
- **Rewritten & unified text backend** - The text displaying and laying out portions of the GUI have all been massively changed and all the GUI elements now all share common code. This makes it easier to add new features to the text, and also have them work everywhere.

Minor features
...............................

- **UIButtons & UILabels can now scale based off their text** - passing in -1 for a dimension will cause that dimension to be set based on the height or width of the element's text.
- **More default options to allow only certain characters in UITextLine** - 'alpha_numeric' was added as an option for the latin alphabet. The underlying system was adjusted to allow for localised versions of these character sets, but these do not yet exist.
- **set_text_hidden() added to UITextLine** - To enable a 'password' style entry line.
- **text shadow theming options added to UIButton** - Previously these were only on the UILabel.
- **<img> tag images can now be added to to a UITextBox** - Makes it easier to wrap text around images and have inline images in text (colourful emoji?)
- **get_relative_mouse_pos() added to UIWindow** - gets a mouse position relative to the UIWindow you call it from.
- **UISlider now moves in customisable fixed increments when clicking arrow button** - Makes it easier to have precise sliders.
- **UIButton events can now be produced by any mouse button** - new 'mouse_button' attribute on button events & 'generate_click_events_from' parameter to UIButton.
- **UIDropDown open/close drop down button width added as theming option** - Called 'open_button_width'.
- **Text alignment theming options for UITextBox & UILabel** - See their theming pages for details.
- **Improved text effects** - Effects can now be applied to tagged chunks of text in a text box, some effects can also be applied to UILabels. There are parameters for effects, and an event fired when an effect finishes.


Bug Fixes & Other Changes
.........................................................

- **PyInstaller should work correctly with pygame_gui** - A 'hook' file has been added to scoop up the default data for pygame_gui, and documentation added on using Pyinstaller & Nuitka with the library. See issue 166
- **Fixed issue with window resolution changes** - Thanks to lonelycorn issue 215
- **<br> tag fixed to produce blank lines** - See issue 217
- **Fixed missing type cast in UIFileDialog** - Thanks to GUI-GUY issue 207
- **Fixed issues with adding lines to bottom of UITextBox** - Demonstrated in new UIConsoleWindow window. See issues issue 69 and issue 78
- **Fixed issues with positioning UIDropDown inside container** - See issues issue 179 and issue 153
- **Improved scaling support** - I still don't have the hardware to test this properly, but thanks to jlaumonier, see issue 210 it should work a bit better.
- **Fixed html link click events firing multiple times in some circumstances** - Thanks to RedFlames for finding and fixing this. See issue 206
- **Various documentation improvements and updates** - Thanks to everyone who pointed out things they didn't understand on GitHub, in Discord or in person. I've tried to make things clearer wherever I can. Keep letting me know when you get stuck!

Further thanks & Pull Requests
..............................

While I was very slowly rebuilding the text back end for 0.6.0 the library also received several pull requests that
will now make their way into the released version. After 1.0.0, when I (MyreMylar) finish my main work on it, pull
requests like this will be the main way the library changes from version to version.

For now I'm putting them in their own section of this changes document to highlight them (unless there is a pull request
that adds a big feature that is going up top as well)

- **Fixed redundant redrawing of UITextEntryLine()** - Thanks to glipR, see 178
- **Fixed double clicking folder in UIFileDialog** - Thanks to glipR, see 197
- **Fixed hiding & showing disabled buttons** - Thanks to xirsoi, see pull 185
- **Fixed grammatical errors in index.rst** - Thanks to nonoesimposible, see 208
- **Added ability to set default values for UISelectionList** - Thanks to teaguejt, see 213
- **Fix invalid URL for game project examples** - Thanks to Grimmys, see 216

Known Issues
...........................

- There is a bug with placing some varieties of img tags next to each other that I still need to track down. for 0.6.1

Thanks for reading!

v_057

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.