{ "info": { "author": "Henrik Petersson", "author_email": "henrik@tutamail.com", "bugtrack_url": null, "classifiers": [], "description": "# TextBoxify\n\n> Text and dialog box package for games created with Pygame.\n\n[![made-with-pygame](https://img.shields.io/badge/Made%20with-Pygame-green.svg)](https://www.pygame.org/)\n[![Generic badge](https://img.shields.io/badge/code_style-black-black.svg)](https://github.com/psf/black)\n\n![dialog box](example.gif)\n\nTextBoxify is a package for easily creating text and dialog boxes in Python games written in [Pygame](https://www.pygame.org/). The package is aiming to give the users of the package a lot of control when it comes to designing the look and feel of their boxes.\n\n## Setup\n\nInstall [textboxify](https://pypi.org/project/textboxify/) from Python Package Index: `pip install textboxify`\n\n## Develop\n\nIt's recommended to install the package in a virtual environment to avoid conflicts with different versions of the same packages.\n\n1. Create virtual environment:\n\n `python -m venv [dir]`\n\n2. Activate the virtual environment:\n\n `source [dir]/bin/activate`\n\n3. Installation:\n\n To install the code from Github, clone the repository and install it in editable mode `-e` to edit the code without having to reinstall it for the changes to have effect.\n\n ```\n git clone https://github.com/hnrkcode/TextBoxify.git\n cd TextBoxify\n pip install -r requirements.txt -e .\n ```\n\n## Usage\n\nTo use the package just write `import textboxify` in your python modules and start using it.\n\n## Example\n\nThis example is based of the code in ``examples/example.py``\n\nThis is how you could initialize and customize a dialog box with `TextBoxFrame`, which creates a dialog box with a border and optional features like animated portrait and idling symbol.\n\n```Python\ndialog_box = textboxify.TextBoxFrame(\n text=dialog_text,\n text_width=320,\n lines=2,\n pos=(80, 180),\n padding=(150, 100),\n font_color=(92, 53, 102),\n font_size=26,\n bg_color=(173, 127, 168),\n)\n```\n\nAdd these two lines to create a symbol indicating that the box is idle and a picture representing the character talking.\n\n```Python\ndialog_box.set_indicator()\ndialog_box.set_portrait()\n```\n\nTo implement the text box you could add it to a sprite group, like `pygame.sprite.LayeredDirty` because the text boxes are subclasses of `pygame.sprite.DirtySprite`.\n\nTo activate the textbox you then add the text box object to the sprite group.\n\n```Python\nif not dialog_group:\n dialog_group.add(dialog_box)\n```\n\nYou can check if all words has pin printed, if there are still words to print,\nyou can continue printing the remaining words by reseting the box so the words\nin the box are erased like this.\n\n```Python\nif dialog_box.words:\n dialog_box.reset()\n```\n\nIf there isn't any words left to print you can close the box with.\n\n```Python\nelse:\n dialog_box.kill()\n```\n\nThat will deactivate the box and remove it from the sprite group.\nIf you want to reuse the text box, you should first call `reset(hard=True)` and if you also want to set a new message call `set_text()`.\n\n```Python\ndialog_box.reset(hard=True)\ndialog_box.set_text(\"Happy coding!\")\n```\n\nFor a working example of how to implement `textboxify` see the example module.\n\n## Tests\n\nRun all tests:\n\n`python -m unittest discover -v tests` or `python -m unittest -v tests/test_*.py`\n\nRun specific tests:\n\n`python -m unittest -v tests.test_settings`\n\n`python -m unittest -v tests.test_settings.TestSettings`\n\n`python -m unittest -v tests.test_settings.TestSettings.test_file_exists`\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/hnrkcode/TextBoxify", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "textboxify", "package_url": "https://pypi.org/project/textboxify/", "platform": "", "project_url": "https://pypi.org/project/textboxify/", "project_urls": { "Homepage": "https://github.com/hnrkcode/TextBoxify" }, "release_url": "https://pypi.org/project/textboxify/0.3.1/", "requires_dist": [ "pygame" ], "requires_python": "", "summary": "Pygame package to easily create dialog boxes for games.", "version": "0.3.1", "yanked": false, "yanked_reason": null }, "last_serial": 6082551, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "0adbd2affd01ac499ae8f7e37477f080", "sha256": "7514befd181ff0a023abf39bf052dbb17b0ac1d9a96d16a80b3765be64fbfc20" }, "downloads": -1, "filename": "textboxify-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "0adbd2affd01ac499ae8f7e37477f080", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13095, "upload_time": "2019-10-30T10:53:57", "upload_time_iso_8601": "2019-10-30T10:53:57.047977Z", "url": "https://files.pythonhosted.org/packages/93/b8/5bf935471eee33324c4cdb7b436e4f2a91dfd61949eabecd66a8784b35d9/textboxify-0.1.0-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "d119c28ccb3c8dac2bc03c6efa6ee15c", "sha256": "6ae3d8a7dad0c481ac44bd1780d85cdf5dd6c2d31d5417a864d3058170c715cf" }, "downloads": -1, "filename": "TextBoxify-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "d119c28ccb3c8dac2bc03c6efa6ee15c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13099, "upload_time": "2019-10-30T10:40:45", "upload_time_iso_8601": "2019-10-30T10:40:45.103388Z", "url": "https://files.pythonhosted.org/packages/de/72/52ff73a24470c6e3c2609d8ed00eb87d0de3fda628634f17c2ac7f50b3f2/TextBoxify-0.1.0-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "30c04e7b8b98247aeef01e6c5dd805e3", "sha256": "0d3c2a4409af07dd20e7e46290b0674ef7a0faca7b928eb782dc592c9a854004" }, "downloads": -1, "filename": "TextBoxify-0.1.0.tar.gz", "has_sig": false, "md5_digest": "30c04e7b8b98247aeef01e6c5dd805e3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10732, "upload_time": "2019-10-30T10:40:47", "upload_time_iso_8601": "2019-10-30T10:40:47.528285Z", "url": "https://files.pythonhosted.org/packages/09/3d/703938680298d6305bba8c9205b1ee9395c07c15e5a4d39488e4b1e11b3d/TextBoxify-0.1.0.tar.gz", "yanked": false, "yanked_reason": null } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "7449ec346c7741e038b8ccde73aa36ac", "sha256": "9a135a8c8f6f22c90c0a9a4cbdb69113d64a13fd5ee2f4abd7d9bc61846a844c" }, "downloads": -1, "filename": "textboxify-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "7449ec346c7741e038b8ccde73aa36ac", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14142, "upload_time": "2019-10-30T13:02:53", "upload_time_iso_8601": "2019-10-30T13:02:53.656754Z", "url": "https://files.pythonhosted.org/packages/4a/99/12488730fac76ae46d59891501b0a26e28694a865dd80c2ab584d99c9d98/textboxify-0.1.1-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "4560ae9dce4b5905b8eb7403a70f66e9", "sha256": "7b08f9d1b371b2a209a3384cc7c74b23abef5aee1b480df2a94b16b8282e62e2" }, "downloads": -1, "filename": "textboxify-0.1.1.tar.gz", "has_sig": false, "md5_digest": "4560ae9dce4b5905b8eb7403a70f66e9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12263, "upload_time": "2019-10-30T13:02:55", "upload_time_iso_8601": "2019-10-30T13:02:55.582784Z", "url": "https://files.pythonhosted.org/packages/42/a1/604358ba468abf8486161c24c987c9f17d2054d14e127bc91a9b3b608f3b/textboxify-0.1.1.tar.gz", "yanked": false, "yanked_reason": null } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "9029ec9efce39a0cfac4454a4daa5f13", "sha256": "5dfd5c0d62715d184409703b60469f3f14b81c118c798418cdffbcf1b170e2d3" }, "downloads": -1, "filename": "textboxify-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "9029ec9efce39a0cfac4454a4daa5f13", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14256, "upload_time": "2019-10-30T15:31:23", "upload_time_iso_8601": "2019-10-30T15:31:23.795695Z", "url": "https://files.pythonhosted.org/packages/1b/ba/0fed8986533ecdd13bbf0b8a8afb029494b741004dbcf06fe65656f53a4f/textboxify-0.1.2-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "487f1819deef4f65d481c6099df8c7d4", "sha256": "06a479e6464d72461ebc9d326892550c0ba258f9dfcde2c9b5dad9f35ee5a29c" }, "downloads": -1, "filename": "textboxify-0.1.2.tar.gz", "has_sig": false, "md5_digest": "487f1819deef4f65d481c6099df8c7d4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12500, "upload_time": "2019-10-30T15:31:25", "upload_time_iso_8601": "2019-10-30T15:31:25.471006Z", "url": "https://files.pythonhosted.org/packages/a9/f3/f4547b7c719de8a353b53bb086b4eee2f7ff3a23914b96cadcdea07f6d05/textboxify-0.1.2.tar.gz", "yanked": false, "yanked_reason": null } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "557d2940943f1b49ebc1d2691ffa0076", "sha256": "6a70cdc089cfcc3f1cc499a200f3583303bde60b23308bb726f972cf386e10b4" }, "downloads": -1, "filename": "textboxify-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "557d2940943f1b49ebc1d2691ffa0076", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13538, "upload_time": "2019-11-02T13:20:57", "upload_time_iso_8601": "2019-11-02T13:20:57.614247Z", "url": "https://files.pythonhosted.org/packages/c7/07/77bf71834e57cf27ca9cd8a33cd7c743eac0d5fc9a00565bc67996028b05/textboxify-0.2.0-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "eb4d94547159aa2a8eed56d4778d0f98", "sha256": "b9aea7f929c74c00b6ab06c34c9144f49fa0ffc2376d872d93b847d9c234ee7f" }, "downloads": -1, "filename": "textboxify-0.2.0.tar.gz", "has_sig": false, "md5_digest": "eb4d94547159aa2a8eed56d4778d0f98", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11465, "upload_time": "2019-11-02T13:21:00", "upload_time_iso_8601": "2019-11-02T13:21:00.256367Z", "url": "https://files.pythonhosted.org/packages/e3/a1/dd4dbf97668b826a62894ddc047bc3070f30fdd80022270b876a9614ab9a/textboxify-0.2.0.tar.gz", "yanked": false, "yanked_reason": null } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "f4f78c9987cb1c7bde50adf6ba1943cb", "sha256": "52a673e23fcf98612bc90fcb01ac33baa6eb39a51a6e012d7a309e9fc4d01154" }, "downloads": -1, "filename": "textboxify-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "f4f78c9987cb1c7bde50adf6ba1943cb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 22638, "upload_time": "2019-11-03T18:27:54", "upload_time_iso_8601": "2019-11-03T18:27:54.041796Z", "url": "https://files.pythonhosted.org/packages/e4/91/1e1b51d8b385e863108c9220b061ed81bd5254e44470b157d3806562c6dc/textboxify-0.3.0-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "099aa46a25211b01815ea2868de2802b", "sha256": "1de25e41df546de295cf7ca74f65dae0dec13491f49a59ea8afc7d82295e7b29" }, "downloads": -1, "filename": "textboxify-0.3.0.tar.gz", "has_sig": false, "md5_digest": "099aa46a25211b01815ea2868de2802b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16825, "upload_time": "2019-11-03T18:27:58", "upload_time_iso_8601": "2019-11-03T18:27:58.102775Z", "url": "https://files.pythonhosted.org/packages/55/c0/5f01c88b76faaf076fac49beebe11a369d3264f2ccd5fbc6a65db78d83ef/textboxify-0.3.0.tar.gz", "yanked": false, "yanked_reason": null } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "a305517a4cf136ca29e20b9abbec43c9", "sha256": "c58e08f13834bd3daf1e15c6c00ab381c1a7ad01611ad446fb85548c5b3fdfcc" }, "downloads": -1, "filename": "textboxify-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "a305517a4cf136ca29e20b9abbec43c9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 24442, "upload_time": "2019-11-05T19:25:51", "upload_time_iso_8601": "2019-11-05T19:25:51.313034Z", "url": "https://files.pythonhosted.org/packages/3a/a8/3259d69e57825a4c6311bb31c88ac4a9418bc61724e773666d5853ae16a9/textboxify-0.3.1-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "df058ddd21494d5a528f42ef2c38e0f0", "sha256": "5189d6ceacbfac5a467c0734d092aedf8dc132c95bda854a5c5d0d740b1d4f20" }, "downloads": -1, "filename": "textboxify-0.3.1.tar.gz", "has_sig": false, "md5_digest": "df058ddd21494d5a528f42ef2c38e0f0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18806, "upload_time": "2019-11-05T19:25:55", "upload_time_iso_8601": "2019-11-05T19:25:55.859642Z", "url": "https://files.pythonhosted.org/packages/7d/c2/0ad2a9323af5b7bdaab11d34161bc2ae868a305bc71d79fc29baebb5b579/textboxify-0.3.1.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a305517a4cf136ca29e20b9abbec43c9", "sha256": "c58e08f13834bd3daf1e15c6c00ab381c1a7ad01611ad446fb85548c5b3fdfcc" }, "downloads": -1, "filename": "textboxify-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "a305517a4cf136ca29e20b9abbec43c9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 24442, "upload_time": "2019-11-05T19:25:51", "upload_time_iso_8601": "2019-11-05T19:25:51.313034Z", "url": "https://files.pythonhosted.org/packages/3a/a8/3259d69e57825a4c6311bb31c88ac4a9418bc61724e773666d5853ae16a9/textboxify-0.3.1-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "df058ddd21494d5a528f42ef2c38e0f0", "sha256": "5189d6ceacbfac5a467c0734d092aedf8dc132c95bda854a5c5d0d740b1d4f20" }, "downloads": -1, "filename": "textboxify-0.3.1.tar.gz", "has_sig": false, "md5_digest": "df058ddd21494d5a528f42ef2c38e0f0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18806, "upload_time": "2019-11-05T19:25:55", "upload_time_iso_8601": "2019-11-05T19:25:55.859642Z", "url": "https://files.pythonhosted.org/packages/7d/c2/0ad2a9323af5b7bdaab11d34161bc2ae868a305bc71d79fc29baebb5b579/textboxify-0.3.1.tar.gz", "yanked": false, "yanked_reason": null } ] }