{"id":21938072,"url":"https://github.com/payne911/piemenu","last_synced_at":"2025-04-22T12:26:33.975Z","repository":{"id":36656203,"uuid":"210463210","full_name":"payne911/PieMenu","owner":"payne911","description":"A library for easy integration of a flexible circular WidgetGroup within libGDX","archived":false,"fork":false,"pushed_at":"2022-12-01T06:27:29.000Z","size":45109,"stargazers_count":82,"open_issues_count":1,"forks_count":13,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-29T15:11:15.077Z","etag":null,"topics":["circular-menu","custom-animated-widgets","game-development","java","libgdx","menu","pie-menu","radial-menu","ui","widgets"],"latest_commit_sha":null,"homepage":"https://payne911.github.io/PieMenu/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/payne911.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-23T22:25:13.000Z","updated_at":"2025-03-06T07:57:04.000Z","dependencies_parsed_at":"2023-01-17T04:00:34.536Z","dependency_job_id":null,"html_url":"https://github.com/payne911/PieMenu","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/payne911%2FPieMenu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/payne911%2FPieMenu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/payne911%2FPieMenu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/payne911%2FPieMenu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/payne911","download_url":"https://codeload.github.com/payne911/PieMenu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250239076,"owners_count":21397631,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["circular-menu","custom-animated-widgets","game-development","java","libgdx","menu","pie-menu","radial-menu","ui","widgets"],"created_at":"2024-11-29T01:28:17.436Z","updated_at":"2025-04-22T12:26:33.953Z","avatar_url":"https://github.com/payne911.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Pie Menu logo](pie_menu_logo.png \"Pie Menu library logo\")\n\n# PieMenu\n[![JitPack Latest Release Version](https://jitpack.io/v/payne911/PieMenu.svg)](https://jitpack.io/#payne911/PieMenu)\n[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/payne911/PieMenu/blob/master/LICENSE)\n[![GitHub All Releases Downloads](https://img.shields.io/github/downloads/payne911/PieMenu/total?logo=github)](https://github.com/payne911/PieMenu/releases)\n![Lines of code](https://img.shields.io/tokei/lines/github/payne911/PieMenu?cacheSeconds=2000000\u0026label=LOC)\n\n---\n\nA library to obtain a circular WidgetGroup within [libGDX](https://libgdx.badlogicgames.com/), an open-source game development application framework written in Java.\n\nIt aims at providing users with the so-called `RadialGroup`: a simple container that places its children `Actors` in a circular fashion.\n\nThe more interesting feature might be the `PieMenu` class : it wraps the `RadialGroup` with a bunch of functionalities that allow assigning callback functions to listeners on the highlight and selection of items within the Group.\n\nIn terms of User Interface, circular context menus \"are faster and more reliable to select from than linear menus, because selection depends on direction instead of distance\" ([Wikipedia source](https://en.wikipedia.org/wiki/Pie_menu#Comparison_with_other_interaction_techniques)). That is the whole motivation behind this library.\n\n## Table of Content\n* [Demo](#demo)\n  * [Basic widgets](#basic-widgets)\n  * [Custom-animated widgets](#custom-animated-widgets)\n* [Including in your project](#including-in-your-project)\n* [Usage](#usage)\n  * [Wiki](#wiki)\n* [Final word](#final-word)\n  * [Games showcases](#games-showcases)\n  * [Contributing](#contributing)\n  * [Thanks to](#thanks-to)\n    * [Credits](#credits)\n\n---\n\n## Demo\nFirst, let us demonstrate what you might be able to get out of this library (those are just examples and the variety of possiblities is much larger, if not endless).\n\n### Basic widgets\n**An [online demo](https://payne911.github.io/PieMenu/) is available.**\n\n![early_demo](media/early_demo.gif)\n\nThe trickier controls are:\n* ``RIGHT-CLICK`` : opens a PieMenu meant for selection through dragging (don't release the right-click until you're done with your selection). It was configured to let you preview the selection's effect.\n* ``MIDDLE-CLICK`` : opens a PieMenu meant for \"normal\" selection. You can release the button and select as you wish with a left-click.\n\nIf you want to check out the same demo, but within a `desktop` setup, check out [the Demonstration class](src/test/java/com/payne/games/piemenu/testMenu/otherTests/Demonstration.java). \n\n### Custom-animated widgets\nYou can also create your own animations:\n\n![custom_animation](media/custom_animation.gif)\n\nIt's surprisingly easy. Check out [the Animated Widget wiki page](https://github.com/payne911/PieMenu/wiki/Animated-widget/) to find out!\n\n---\n\n## Including in your project\nTo use this in your gradle project, add the version number and jitpack repository information to your root `build.gradle` file:\n\n```groovy\nallprojects {\n\n    ext {\n        ...\n        pieMenuVersion = '5.0.0'  // add this line\n    }\n    \n    repositories {\n        ...\n        maven { url 'https://jitpack.io' }  // add this line if it isn't there\n    }\n}\n```\n\nAnd  in your `core` project (still inside the root `build.gradle`) add the dependency:\n\n```groovy\nproject(\":core\") {\n    apply plugin: \"java-library\"\n\n    dependencies {\n        ...\n        api \"com.github.payne911:PieMenu:$pieMenuVersion\"  // add this line\n    }\n}\n```\n\nSee the [jitpack website](https://jitpack.io/#payne911/PieMenu) for more info.\n\n**If you plan on releasing your project with an `html` (\"HTML5/GWT\") or `android` module, check out the [Wiki page on integration](https://github.com/payne911/PieMenu/wiki/Integrating-this-library).**\n\n---\n\n## Usage\nThe basic idea looks like this:\n\n```java\n/* Setting up and creating the widget. */\nPieMenu.PieMenuStyle style = new PieMenu.PieMenuStyle();\nstyle.sliceColor = new Color(.33f,.33f,.33f,1); // \"style\" variables affect the way the widget looks\nPieMenu menu = new PieMenu(skin.getRegion(\"white\"), style, 80); // \"white\" would be a 1x1 white pixel\n\n/* Adding a listener. */\nmenu.addListener(new ChangeListener() {\n    @Override\n    public void changed(ChangeEvent event, Actor actor) {\n        System.out.println(\"The selected index is: \" + menu.getSelectedIndex());\n    }\n});\n\n/* Populating the widget. */\nfinal int PIE_SLICES = 8;\nfor (int i = 0; i \u003c PIE_SLICES; i++) {\n    Label label = new Label(Integer.toString(i), skin);\n    menu.addActor(label);\n}\n\n/* Including the widget in the Stage. */\nstage.addActor(menu);\n```\n\nAnd *voilà*!\n\n### [Wiki](https://github.com/payne911/PieMenu/wiki)\nThis library offers you many types of behaviors related to pie-menus. Many of those are well-documented in the Wiki (with description, code and gif), so make sure to check it out.\n\nMore specifically, you might be interested in:\n* **[Complete examples of code](https://github.com/payne911/PieMenu/wiki/Examples)**, along with textual descriptions of the expected behavior\n* **[Understanding how to customize](https://github.com/payne911/PieMenu/wiki/Customizing-the-widget)** your widget's look and behavior.\n\n![Configuration infographic](media/style_infographic.png \"Explaining the configurations in an image\")\n\n---\n\n## Final word\nVery well: you've made it this far in the README! If you ever end up integrating this library into your cool projects, feel free to send a Pull Request of a GIF showcasing this library and with the name of your game; just make sure it's pushed in [the ``media/games`` folder](https://github.com/payne911/PieMenu/tree/master/media/games)!\n\n### Games showcases\nHere are a few GIFs of games that have integrated this library.\n\n##### [Crawl Tactics](https://store.steampowered.com/app/1290750/Crawl_Tactics/), by icefill\n![CT](media/games/CompactDungeon2_icefill.gif)\n\n##### [Hadal Calm](https://donpommelo.itch.io/hadal-calm), by donpommelo\n![HC](media/games/HadalCalm_donpommelo.gif)\n\n##### [lurkers.io](https://lurkers.io/), by bergice\n![L](media/games/Lurkers_bergice.gif)\n\n\n### Contributing\nIf you feel like helping this library grow, make sure to check out [the Contributing](https://github.com/payne911/PieMenu/wiki/Contributing) Wiki page.\n\n### Thanks to\n* [EarlyGrey](https://github.com/earlygrey) (PieMenu is actually partly dependent on his library: [ShapeDrawer](https://github.com/earlygrey/shapedrawer))\n* [raeleus](https://github.com/raeleus) (for the logo of the library)\n* [mgsx](https://github.com/mgsx-dev)\n* [TEttinger](https://github.com/tommyettinger)\n* Albert Pétoncle\n\nFor their sustained help through [the libGDX Discord channel](https://discord.gg/6pgDK9F). Their extensive knowledge was greatly appreciated.\n\n#### Credits\nI used some images from [Game-Icons.net](https://game-icons.net/), more specifically the 5 icons displayed when clicking the \"Toggle Radial\" button. To be even more specific, the credits go to [Lorc](http://lorcblog.blogspot.com/). Those are under the [CC BY 3.0 license](https://creativecommons.org/licenses/by/3.0/).\n\nAlso, [raeleus](https://github.com/raeleus) made the background image for the \"middle-click menu\" (which is also used in this library's logo), and the test application uses the [Plain James UI Skin](https://github.com/raeleus/Plain-James-UI) created by Raymond \"Raeleus\" Buckley under the [CC BY 4.0 license](https://creativecommons.org/licenses/by/4.0/). [Check out the others!](https://ray3k.wordpress.com/artwork/)\n\nThe structure and build scripts of this repository were strongly inspired by [RafaSKB](https://github.com/rafaskb)'s [typing-label](https://github.com/rafaskb/typing-label) library.\n\nParts of this `README` were lazily copied and adapted from [EarlyGrey's library](https://github.com/earlygrey/shapedrawer) (with his agreement). Cheers!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpayne911%2Fpiemenu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpayne911%2Fpiemenu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpayne911%2Fpiemenu/lists"}