{"id":19892980,"url":"https://github.com/labymod/widgets","last_synced_at":"2025-05-02T19:30:31.394Z","repository":{"id":43033116,"uuid":"361485527","full_name":"LabyMod/widgets","owner":"LabyMod","description":"Widget model to create custom user interfaces via plugin messages","archived":false,"fork":false,"pushed_at":"2022-03-22T15:30:14.000Z","size":135,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2023-02-28T17:22:16.065Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LabyMod.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-25T16:52:34.000Z","updated_at":"2023-02-21T17:40:38.000Z","dependencies_parsed_at":"2022-09-03T06:01:37.565Z","dependency_job_id":null,"html_url":"https://github.com/LabyMod/widgets","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LabyMod%2Fwidgets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LabyMod%2Fwidgets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LabyMod%2Fwidgets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LabyMod%2Fwidgets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LabyMod","download_url":"https://codeload.github.com/LabyMod/widgets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224326956,"owners_count":17292971,"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":[],"created_at":"2024-11-12T18:26:30.969Z","updated_at":"2024-11-12T18:26:31.465Z","avatar_url":"https://github.com/LabyMod.png","language":"Java","readme":"## Widget model to create custom User Interfaces via plugin messages\n\nClick [here](https://docs.labymod.net/pages/server/minecraft/screen/) for more detailed information.\n\n### Available widgets:\n- Button\n- Text Field\n- Label\n- Color Picker\n- Image\n\n### Example\n![example](.github/images/example.png)\n\n### Serialize widgets\n```java\n// Create new screen\nWidgetScreen screen = new WidgetScreen(42); // The client will send this id back on an interaction\n\n// Centered anchor\nAnchor anchor = new Anchor(50, 50); // X: 50%   Y: 50%\n        \n// Add button to widget list\nscreen.addWidget(new ButtonWidget(0, anchor, -50, 20, \"Apply\", 100, 20));\n\n// Serialize widgets\nJsonObject object = screen.toJsonObject(EnumScreenAction.OPEN); // OPEN = Open the screen\n```\n\n### Anchor explanation image\n![example](.github/images/anchor.png)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flabymod%2Fwidgets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flabymod%2Fwidgets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flabymod%2Fwidgets/lists"}