Compare commits

..
2 Commits
Author SHA1 Message Date
mitchell 41a523d2e3 fix the lobby privacy radio 2026-09-18 00:11:19 -05:00
mitchell df95653b86 work on lobby ui 2026-09-17 15:59:47 -05:00
5 changed files with 757 additions and 51 deletions
Generated
+461 -6
View File
@@ -212,9 +212,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0348a1c054491f4bfe6ab86a7b6ab1e44e45d899005de92f58b3df180b36ddaf" checksum = "0348a1c054491f4bfe6ab86a7b6ab1e44e45d899005de92f58b3df180b36ddaf"
dependencies = [ dependencies = [
"clipboard-win", "clipboard-win",
"image",
"log", "log",
"objc2 0.6.4", "objc2 0.6.4",
"objc2-app-kit 0.3.2", "objc2-app-kit 0.3.2",
"objc2-core-foundation",
"objc2-core-graphics",
"objc2-foundation 0.3.2", "objc2-foundation 0.3.2",
"parking_lot", "parking_lot",
"percent-encoding", "percent-encoding",
@@ -388,6 +391,57 @@ dependencies = [
"bevy_internal", "bevy_internal",
] ]
[[package]]
name = "bevy-inspector-egui"
version = "0.37.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38e425288304f5ec24cd026d39c813883225e670a88c94655272066d43d38078"
dependencies = [
"bevy-inspector-egui-derive",
"bevy_app",
"bevy_asset",
"bevy_camera",
"bevy_color",
"bevy_core_pipeline",
"bevy_ecs",
"bevy_egui",
"bevy_gizmos",
"bevy_image",
"bevy_light",
"bevy_log",
"bevy_math",
"bevy_mesh",
"bevy_mikktspace",
"bevy_pbr",
"bevy_platform",
"bevy_reflect",
"bevy_render",
"bevy_state",
"bevy_time",
"bevy_utils",
"bevy_window",
"bytemuck",
"disqualified",
"egui",
"fuzzy-matcher",
"image",
"opener",
"smallvec",
"uuid",
"winit",
]
[[package]]
name = "bevy-inspector-egui-derive"
version = "0.37.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "99bdb0f08cbcec82bf7909b880acd52d7a527e6d47156b99f8b60e4cb9765f3f"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.119",
]
[[package]] [[package]]
name = "bevy_a11y" name = "bevy_a11y"
version = "0.19.1" version = "0.19.1"
@@ -770,6 +824,51 @@ dependencies = [
"syn 2.0.119", "syn 2.0.119",
] ]
[[package]]
name = "bevy_egui"
version = "0.40.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7466095822999850fc52074c0b65e9f8b42da100bf7bbd10e5dc87415c6b3401"
dependencies = [
"arboard",
"bevy_app",
"bevy_asset",
"bevy_camera",
"bevy_color",
"bevy_core_pipeline",
"bevy_derive",
"bevy_ecs",
"bevy_image",
"bevy_input",
"bevy_log",
"bevy_math",
"bevy_mesh",
"bevy_platform",
"bevy_reflect",
"bevy_render",
"bevy_shader",
"bevy_time",
"bevy_transform",
"bevy_utils",
"bevy_window",
"bevy_winit",
"bytemuck",
"crossbeam-channel",
"egui",
"encase",
"getrandom 0.4.3",
"image",
"itertools",
"js-sys",
"smithay-clipboard",
"thread_local",
"wasm-bindgen",
"wasm-bindgen-futures",
"web-sys",
"wgpu-types",
"winit",
]
[[package]] [[package]]
name = "bevy_encase_derive" name = "bevy_encase_derive"
version = "0.19.1" version = "0.19.1"
@@ -1899,6 +1998,17 @@ dependencies = [
"piper", "piper",
] ]
[[package]]
name = "bstr"
version = "1.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6bb31b46c14244e20ee9984b11bf5c992b91fb6939fea616e3512c8baecdbe5f"
dependencies = [
"memchr",
"regex-automata",
"serde_core",
]
[[package]] [[package]]
name = "bumpalo" name = "bumpalo"
version = "3.20.3" version = "3.20.3"
@@ -1957,18 +2067,43 @@ dependencies = [
"thiserror 1.0.69", "thiserror 1.0.69",
] ]
[[package]]
name = "calloop"
version = "0.14.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4dbf9978365bac10f54d1d4b04f7ce4427e51f71d61f2fe15e3fed5166474df7"
dependencies = [
"bitflags 2.13.1",
"polling",
"rustix 1.1.4",
"slab",
"tracing",
]
[[package]] [[package]]
name = "calloop-wayland-source" name = "calloop-wayland-source"
version = "0.3.0" version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20"
dependencies = [ dependencies = [
"calloop", "calloop 0.13.0",
"rustix 0.38.44", "rustix 0.38.44",
"wayland-backend", "wayland-backend",
"wayland-client", "wayland-client",
] ]
[[package]]
name = "calloop-wayland-source"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "138efcf0940a02ebf0cc8d1eff41a1682a46b431630f4c52450d6265876021fa"
dependencies = [
"calloop 0.14.4",
"rustix 1.1.4",
"wayland-backend",
"wayland-client",
]
[[package]] [[package]]
name = "cc" name = "cc"
version = "1.4.3" version = "1.4.3"
@@ -2030,6 +2165,15 @@ dependencies = [
"unicode-width", "unicode-width",
] ]
[[package]]
name = "color"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2ec7c5eb7a16992b1904d76c517d170ab353b0e0b3d5a0c81a8a0cd1037893cf"
dependencies = [
"bytemuck",
]
[[package]] [[package]]
name = "combine" name = "combine"
version = "4.6.7" version = "4.6.7"
@@ -2406,12 +2550,49 @@ version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76"
[[package]]
name = "ecolor"
version = "0.34.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a05fbfa222ffb51989d5ccf33e5f7aebfcf96c5023413856b0c3618a7f79896e"
dependencies = [
"bytemuck",
"emath",
]
[[package]]
name = "egui"
version = "0.34.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42112be0ae157289312b92b3dfaf20e911b5a3c4c65d4aab0e7c47fbc0ce16e3"
dependencies = [
"accesskit",
"ahash",
"bitflags 2.13.1",
"emath",
"epaint",
"log",
"nohash-hasher",
"profiling",
"smallvec",
"unicode-segmentation",
]
[[package]] [[package]]
name = "either" name = "either"
version = "1.17.0" version = "1.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e5e8f6c15a24b9a3ee5efec809ccd006d3b30e8b3bb63c39af737c7f87daa1d" checksum = "9e5e8f6c15a24b9a3ee5efec809ccd006d3b30e8b3bb63c39af737c7f87daa1d"
[[package]]
name = "emath"
version = "0.34.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b53f0d33a479321da6b0caa71366c9f67e8a2c149762d90bdc0d16e601ee8ecb"
dependencies = [
"bytemuck",
]
[[package]] [[package]]
name = "encase" name = "encase"
version = "0.12.1" version = "0.12.1"
@@ -2443,6 +2624,34 @@ dependencies = [
"syn 2.0.119", "syn 2.0.119",
] ]
[[package]]
name = "epaint"
version = "0.34.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6675898a291ec212fc3df04f537d177fce8496120244590e6359dcaa4c25da79"
dependencies = [
"ahash",
"bytemuck",
"ecolor",
"emath",
"epaint_default_fonts",
"font-types 0.11.3",
"log",
"nohash-hasher",
"parking_lot",
"profiling",
"self_cell",
"skrifa 0.40.0",
"smallvec",
"vello_cpu",
]
[[package]]
name = "epaint_default_fonts"
version = "0.34.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8970033a4282a7bcf899b38b5ed3a58b732fe093d03785d58648515d8d309da"
[[package]] [[package]]
name = "equivalent" name = "equivalent"
version = "1.0.2" version = "1.0.2"
@@ -2511,6 +2720,12 @@ version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223"
[[package]]
name = "fax"
version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "caf1079563223d5d59d83c85886a56e586cfd5c1a26292e971a0fa266531ac5a"
[[package]] [[package]]
name = "fdeflate" name = "fdeflate"
version = "0.3.7" version = "0.3.7"
@@ -2520,6 +2735,15 @@ dependencies = [
"simd-adler32", "simd-adler32",
] ]
[[package]]
name = "fearless_simd"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8fb2907d1f08b2b316b9223ced5b0e89d87028ba8deae9764741dba8ff7f3903"
dependencies = [
"bytemuck",
]
[[package]] [[package]]
name = "find-msvc-tools" name = "find-msvc-tools"
version = "0.1.11" version = "0.1.11"
@@ -2683,6 +2907,15 @@ dependencies = [
"slab", "slab",
] ]
[[package]]
name = "fuzzy-matcher"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "54614a3312934d066701a80f20f15fa3b56d67ac7722b39eea5b4c9dd1d66c94"
dependencies = [
"thread_local",
]
[[package]] [[package]]
name = "gethostname" name = "gethostname"
version = "1.1.0" version = "1.1.0"
@@ -2712,8 +2945,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"js-sys",
"libc", "libc",
"r-efi 6.0.0", "r-efi 6.0.0",
"wasm-bindgen",
] ]
[[package]] [[package]]
@@ -3120,6 +3355,7 @@ dependencies = [
"moxcms", "moxcms",
"num-traits", "num-traits",
"png", "png",
"tiff",
] ]
[[package]] [[package]]
@@ -3358,6 +3594,18 @@ dependencies = [
"bitflags 2.13.1", "bitflags 2.13.1",
] ]
[[package]]
name = "kurbo"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4b60dfc32f652b926df6192e55525b16d186c69d47876c3ead4da5cc9f8450e2"
dependencies = [
"arrayvec",
"euclid",
"polycool",
"smallvec",
]
[[package]] [[package]]
name = "lazy_static" name = "lazy_static"
version = "1.5.0" version = "1.5.0"
@@ -3603,6 +3851,12 @@ dependencies = [
"libc", "libc",
] ]
[[package]]
name = "nohash-hasher"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451"
[[package]] [[package]]
name = "nom" name = "nom"
version = "8.0.0" version = "8.0.0"
@@ -3618,6 +3872,15 @@ version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "610a5acd306ec67f907abe5567859a3c693fb9886eb1f012ab8f2a47bef3db51" checksum = "610a5acd306ec67f907abe5567859a3c693fb9886eb1f012ab8f2a47bef3db51"
[[package]]
name = "normpath"
version = "1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9985ef7269fa99f3b12437bb698381da2428743ab90f20393f399fa14cab21a"
dependencies = [
"windows-sys 0.61.2",
]
[[package]] [[package]]
name = "ntapi" name = "ntapi"
version = "0.4.3" version = "0.4.3"
@@ -4092,6 +4355,17 @@ version = "1.21.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
[[package]]
name = "opener"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2b03ff07a220d0d0ec9a1f0f238951b7967a5a2e96aefcd21a117b1083415e9"
dependencies = [
"bstr",
"normpath",
"windows-sys 0.61.2",
]
[[package]] [[package]]
name = "orbclient" name = "orbclient"
version = "0.3.55" version = "0.3.55"
@@ -4192,6 +4466,19 @@ dependencies = [
"icu_properties", "icu_properties",
] ]
[[package]]
name = "peniko"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "839c8299360d2e998bdb106dc0a6cd71dcc5f4df51df1b620361bf50e283cca6"
dependencies = [
"bytemuck",
"color",
"kurbo",
"linebender_resource_handle",
"smallvec",
]
[[package]] [[package]]
name = "percent-encoding" name = "percent-encoding"
version = "2.3.2" version = "2.3.2"
@@ -4287,6 +4574,15 @@ dependencies = [
"windows-sys 0.61.2", "windows-sys 0.61.2",
] ]
[[package]]
name = "polycool"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50596ddc09eb5ad5f75cacd40209568e66df71baf86e1499a0e99c4cff12a5a6"
dependencies = [
"arrayvec",
]
[[package]] [[package]]
name = "portable-atomic" name = "portable-atomic"
version = "1.15.0" version = "1.15.0"
@@ -4358,6 +4654,12 @@ version = "0.1.30"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d55d956fa96f5ec02be2e13af0e20391a5aa83d6a074e3ad368959d0fab299ea" checksum = "d55d956fa96f5ec02be2e13af0e20391a5aa83d6a074e3ad368959d0fab299ea"
[[package]]
name = "quick-error"
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3"
[[package]] [[package]]
name = "quick-xml" name = "quick-xml"
version = "0.41.0" version = "0.41.0"
@@ -4444,6 +4746,16 @@ dependencies = [
"objc2-quartz-core 0.3.2", "objc2-quartz-core 0.3.2",
] ]
[[package]]
name = "read-fonts"
version = "0.37.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b634fabf032fab15307ffd272149b622260f55974d9fad689292a5d33df02e5"
dependencies = [
"bytemuck",
"font-types 0.11.3",
]
[[package]] [[package]]
name = "read-fonts" name = "read-fonts"
version = "0.39.2" version = "0.39.2"
@@ -4647,10 +4959,16 @@ dependencies = [
"ab_glyph", "ab_glyph",
"log", "log",
"memmap2", "memmap2",
"smithay-client-toolkit", "smithay-client-toolkit 0.19.2",
"tiny-skia", "tiny-skia",
] ]
[[package]]
name = "self_cell"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2ab42ca02749e120097e328d91d415325bdf43b1c72c4c8badf37375fe40a813"
[[package]] [[package]]
name = "semver" name = "semver"
version = "1.0.28" version = "1.0.28"
@@ -4743,6 +5061,16 @@ version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e"
[[package]]
name = "skrifa"
version = "0.40.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fbdfe3d2475fbd7ddd1f3e5cf8288a30eb3e5f95832829570cd88115a7434ac"
dependencies = [
"bytemuck",
"read-fonts 0.37.0",
]
[[package]] [[package]]
name = "skrifa" name = "skrifa"
version = "0.42.1" version = "0.42.1"
@@ -4791,8 +5119,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016"
dependencies = [ dependencies = [
"bitflags 2.13.1", "bitflags 2.13.1",
"calloop", "calloop 0.13.0",
"calloop-wayland-source", "calloop-wayland-source 0.3.0",
"cursor-icon", "cursor-icon",
"libc", "libc",
"log", "log",
@@ -4809,6 +5137,44 @@ dependencies = [
"xkeysym", "xkeysym",
] ]
[[package]]
name = "smithay-client-toolkit"
version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0512da38f5e2b31201a93524adb8d3136276fa4fe4aafab4e1f727a82b534cc0"
dependencies = [
"bitflags 2.13.1",
"calloop 0.14.4",
"calloop-wayland-source 0.4.1",
"cursor-icon",
"libc",
"log",
"memmap2",
"rustix 1.1.4",
"thiserror 2.0.20",
"wayland-backend",
"wayland-client",
"wayland-csd-frame",
"wayland-cursor",
"wayland-protocols",
"wayland-protocols-experimental",
"wayland-protocols-misc",
"wayland-protocols-wlr",
"wayland-scanner",
"xkeysym",
]
[[package]]
name = "smithay-clipboard"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71704c03f739f7745053bde45fa203a46c58d25bc5c4efba1d9a60e9dba81226"
dependencies = [
"libc",
"smithay-client-toolkit 0.20.0",
"wayland-backend",
]
[[package]] [[package]]
name = "smol_str" name = "smol_str"
version = "0.2.2" version = "0.2.2"
@@ -5006,6 +5372,20 @@ dependencies = [
"cfg-if", "cfg-if",
] ]
[[package]]
name = "tiff"
version = "0.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b63feaf3343d35b6ca4d50483f94843803b0f51634937cc2ec519fc32232bc52"
dependencies = [
"fax",
"flate2",
"half",
"quick-error",
"weezl",
"zune-jpeg",
]
[[package]] [[package]]
name = "tiny-skia" name = "tiny-skia"
version = "0.11.4" version = "0.11.4"
@@ -5093,6 +5473,7 @@ version = "0.1.44"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100"
dependencies = [ dependencies = [
"log",
"pin-project-lite", "pin-project-lite",
"tracing-attributes", "tracing-attributes",
"tracing-core", "tracing-core",
@@ -5188,6 +5569,7 @@ version = "0.1.0"
dependencies = [ dependencies = [
"app_dirs2", "app_dirs2",
"bevy", "bevy",
"bevy-inspector-egui",
"derive_more", "derive_more",
"jiff", "jiff",
"ron", "ron",
@@ -5284,6 +5666,32 @@ version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
[[package]]
name = "vello_common"
version = "0.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1bd1a4c633ce09e7d713df1a6e036644a125e15e0c169cfb5180ddf5836ca04b"
dependencies = [
"bytemuck",
"fearless_simd",
"hashbrown 0.16.1",
"log",
"peniko",
"skrifa 0.40.0",
"smallvec",
]
[[package]]
name = "vello_cpu"
version = "0.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0162bfe48aabf6a9fdcd401b628c7d9f260c2cbabb343c70a65feba6f7849edc"
dependencies = [
"bytemuck",
"hashbrown 0.16.1",
"vello_common",
]
[[package]] [[package]]
name = "version_check" name = "version_check"
version = "0.9.5" version = "0.9.5"
@@ -5424,6 +5832,32 @@ dependencies = [
"wayland-scanner", "wayland-scanner",
] ]
[[package]]
name = "wayland-protocols-experimental"
version = "20250721.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40a1f863128dcaaec790d7b4b396cc9b9a7a079e878e18c47e6c2d2c5a8dcbb1"
dependencies = [
"bitflags 2.13.1",
"wayland-backend",
"wayland-client",
"wayland-protocols",
"wayland-scanner",
]
[[package]]
name = "wayland-protocols-misc"
version = "0.3.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e9567599ef23e09b8dad6e429e5738d4509dfc46b3b21f32841a304d16b29c8"
dependencies = [
"bitflags 2.13.1",
"wayland-backend",
"wayland-client",
"wayland-protocols",
"wayland-scanner",
]
[[package]] [[package]]
name = "wayland-protocols-plasma" name = "wayland-protocols-plasma"
version = "0.3.12" version = "0.3.12"
@@ -5511,6 +5945,12 @@ dependencies = [
"wasm-bindgen", "wasm-bindgen",
] ]
[[package]]
name = "weezl"
version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88"
[[package]] [[package]]
name = "wgpu" name = "wgpu"
version = "29.0.4" version = "29.0.4"
@@ -6062,7 +6502,7 @@ dependencies = [
"bitflags 2.13.1", "bitflags 2.13.1",
"block2 0.5.1", "block2 0.5.1",
"bytemuck", "bytemuck",
"calloop", "calloop 0.13.0",
"cfg_aliases", "cfg_aliases",
"concurrent-queue", "concurrent-queue",
"core-foundation", "core-foundation",
@@ -6084,7 +6524,7 @@ dependencies = [
"redox_syscall 0.4.1", "redox_syscall 0.4.1",
"rustix 0.38.44", "rustix 0.38.44",
"sctk-adwaita", "sctk-adwaita",
"smithay-client-toolkit", "smithay-client-toolkit 0.19.2",
"smol_str", "smol_str",
"tracing", "tracing",
"unicode-segmentation", "unicode-segmentation",
@@ -6332,3 +6772,18 @@ name = "zmij"
version = "1.0.23" version = "1.0.23"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
[[package]]
name = "zune-core"
version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d56377fd46368984a170bc5aac5567e52ca5da874caa60bea39fcbca78fb658b"
[[package]]
name = "zune-jpeg"
version = "0.5.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "27bc9d5b815bc103f142aa054f561d9187d191692ec7c2d1e2b4737f8dbd7296"
dependencies = [
"zune-core",
]
+1
View File
@@ -6,6 +6,7 @@ edition = "2024"
[dependencies] [dependencies]
app_dirs2 = "2.5.5" app_dirs2 = "2.5.5"
bevy = { version = "0.19", features = ["system_clipboard", "debug"] } bevy = { version = "0.19", features = ["system_clipboard", "debug"] }
bevy-inspector-egui = "0.37"
derive_more = { version = "2.1.1", features = ["deref", "deref_mut"] } derive_more = { version = "2.1.1", features = ["deref", "deref_mut"] }
jiff = { version = "0.2.35", features = ["serde"] } jiff = { version = "0.2.35", features = ["serde"] }
ron = "0.12.2" ron = "0.12.2"
+32
View File
@@ -0,0 +1,32 @@
use bevy::prelude::*;
use bevy_inspector_egui::{bevy_egui::EguiPlugin, quick::ResourceInspectorPlugin};
use crate::lobby::LobbyUiState;
/// Whether the debug inspector is currently shown.
#[derive(Resource, Debug, Default)]
pub struct InspectorEnabled(bool);
pub struct DebugInspectorPlugin;
impl Plugin for DebugInspectorPlugin {
fn build(&self, app: &mut App) {
app.init_resource::<InspectorEnabled>()
.add_plugins(EguiPlugin::default())
.add_plugins(
ResourceInspectorPlugin::<LobbyUiState>::new()
.run_if(|enabled: Res<InspectorEnabled>| enabled.0),
)
.add_systems(Update, toggle_inspector);
}
}
fn toggle_inspector(keys: Res<ButtonInput<KeyCode>>, mut enabled: ResMut<InspectorEnabled>) {
if keys.just_pressed(KeyCode::F1) {
enabled.0 = !enabled.0;
info!(
"lobby ui inspector toggled {}",
if enabled.0 { "on" } else { "off" }
);
}
}
+260 -44
View File
@@ -3,19 +3,64 @@ use bevy::{
input_focus::tab_navigation::TabIndex, input_focus::tab_navigation::TabIndex,
prelude::*, prelude::*,
text::{EditableText, EditableTextFilter, TextCursorStyle}, text::{EditableText, EditableTextFilter, TextCursorStyle},
ui_widgets::{RadioButton, RadioGroup}, ui::Checked,
ui_widgets::{RadioButton, RadioGroup, ValueChange},
}; };
use crate::AppState; use crate::AppState;
const PANEL_BACKGROUND: Color = Color::srgb(0.4, 0.4, 0.4);
const TEXT_COLOR: Color = Color::srgb(0.9, 0.9, 0.9);
const TEXT_INPUT_BACKGROUND: Color = Color::srgb(0.48, 0.84, 0.87);
const OPTION_BORDER_COLOR: Color = Color::srgb(0.12, 0.16, 0.22);
const OPTION_TEXT_COLOR: Color = Color::srgb(0.92, 0.94, 0.98);
const OPTION_BACKGROUND: Color = Color::srgb(0.18, 0.22, 0.29);
const OPTION_HOVERED_BACKGROUND: Color = Color::srgb(0.26, 0.33, 0.42);
const OPTION_SELECTED_BACKGROUND: Color = Color::srgb(0.08, 0.42, 0.52);
const OPTION_SELECTED_PRESSED_BACKGROUND: Color = Color::srgb(0.07, 0.36, 0.44);
pub struct LobbyPlugin; pub struct LobbyPlugin;
#[derive(Resource, Debug, Clone, Copy, PartialEq, Eq, Reflect)]
#[reflect(Resource)]
pub struct LobbyUiState {
pub privacy: LobbyPrivacy,
}
impl Default for LobbyUiState {
fn default() -> Self {
Self {
privacy: LobbyPrivacy::Public,
}
}
}
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Reflect)]
pub enum LobbyPrivacy {
#[default]
Public,
FriendsOnly,
InviteOnly,
}
#[derive(Component, Debug, Clone, Copy, Default, PartialEq, Eq)]
struct LobbyPrivacyOption(LobbyPrivacy);
impl Plugin for LobbyPlugin { impl Plugin for LobbyPlugin {
fn build(&self, app: &mut App) { fn build(&self, app: &mut App) {
app.init_resource::<LobbyUiState>();
app.register_type::<LobbyUiState>();
app.add_systems( app.add_systems(
OnEnter(AppState::Lobby), OnEnter(AppState::Lobby),
(setup_lobby, build_lobby_ui).chain(), (setup_lobby, build_lobby_ui).chain(),
)
.add_systems(
Update,
(update_privacy_controls, style_privacy_options).chain(),
); );
app.add_observer(on_privacy_changed);
} }
} }
@@ -24,6 +69,9 @@ impl Plugin for LobbyPlugin {
struct LobbyUiRoot; struct LobbyUiRoot;
fn setup_lobby(mut commands: Commands) { fn setup_lobby(mut commands: Commands) {
// TODO: build from whatever info we have from the loaded save
commands.insert_resource(LobbyUiState::default());
commands.spawn_scene(bsn! { commands.spawn_scene(bsn! {
#LobbyUiRoot #LobbyUiRoot
LobbyUiRoot LobbyUiRoot
@@ -50,7 +98,7 @@ fn build_lobby_ui(mut commands: Commands, root_ui: Single<Entity, With<LobbyUiRo
border_radius: BorderRadius::all(px(24)), border_radius: BorderRadius::all(px(24)),
padding: Val::all(px(24)), padding: Val::all(px(24)),
} }
BackgroundColor(Color::srgb(0.4, 0.4, 0.4)) BackgroundColor(PANEL_BACKGROUND)
Children [ Children [
( (
Text("Server Settings") Text("Server Settings")
@@ -60,19 +108,22 @@ fn build_lobby_ui(mut commands: Commands, root_ui: Single<Entity, With<LobbyUiRo
TextFont { TextFont {
font_size: px(100.0), font_size: px(100.0),
} }
TextColor(Color::srgb(0.9, 0.9, 0.9)) TextColor(TEXT_COLOR)
TextShadow TextShadow
), ),
( (
RadioGroup RadioGroup
Node { Node {
display: Display::Flex, display: Display::Flex,
flex_direction: FlexDirection::Column, flex_direction: FlexDirection::Row,
align_items: AlignItems::Start, width: px(900),
column_gap: px(4), height: px(110),
} }
TabIndex(0)
Children [ Children [
radio_button(), privacy_option("Public", LobbyPrivacy::Public, BorderRadius::px(16., 0., 0., 16.)),
privacy_option("Friends Only", LobbyPrivacy::FriendsOnly, BorderRadius::ZERO),
privacy_option("Invite Only", LobbyPrivacy::InviteOnly, BorderRadius::px(0., 16., 16., 0.)),
] ]
), ),
( (
@@ -84,7 +135,7 @@ fn build_lobby_ui(mut commands: Commands, root_ui: Single<Entity, With<LobbyUiRo
// font: FontSourceTemplate::Handle("fonts/FiraSans-Bold.ttf"), // font: FontSourceTemplate::Handle("fonts/FiraSans-Bold.ttf"),
font_size: px(66.0), font_size: px(66.0),
} }
TextColor(Color::srgb(0.9, 0.9, 0.9)) TextColor(TEXT_COLOR)
TextShadow TextShadow
), ),
( (
@@ -107,7 +158,7 @@ fn build_lobby_ui(mut commands: Commands, root_ui: Single<Entity, With<LobbyUiRo
color: Color::BLACK color: Color::BLACK
} }
TabIndex(0) TabIndex(0)
BackgroundColor(Color::srgb(0.48, 0.84, 0.87)) BackgroundColor(TEXT_INPUT_BACKGROUND)
), ),
] ]
}); });
@@ -120,7 +171,7 @@ fn build_lobby_ui(mut commands: Commands, root_ui: Single<Entity, With<LobbyUiRo
border_radius: BorderRadius::all(px(24)), border_radius: BorderRadius::all(px(24)),
padding: Val::all(px(24)), padding: Val::all(px(24)),
} }
BackgroundColor(Color::srgb(0.4, 0.4, 0.4)) BackgroundColor(PANEL_BACKGROUND)
Children [ Children [
( (
Text("Lobby") Text("Lobby")
@@ -130,7 +181,7 @@ fn build_lobby_ui(mut commands: Commands, root_ui: Single<Entity, With<LobbyUiRo
TextFont { TextFont {
font_size: px(100.0), font_size: px(100.0),
} }
TextColor(Color::srgb(0.9, 0.9, 0.9)) TextColor(TEXT_COLOR)
TextShadow TextShadow
), ),
( (
@@ -142,7 +193,7 @@ fn build_lobby_ui(mut commands: Commands, root_ui: Single<Entity, With<LobbyUiRo
// font: FontSourceTemplate::Handle("fonts/FiraSans-Bold.ttf"), // font: FontSourceTemplate::Handle("fonts/FiraSans-Bold.ttf"),
font_size: px(66.0), font_size: px(66.0),
} }
TextColor(Color::srgb(0.9, 0.9, 0.9)) TextColor(TEXT_COLOR)
TextShadow TextShadow
), ),
( (
@@ -165,50 +216,215 @@ fn build_lobby_ui(mut commands: Commands, root_ui: Single<Entity, With<LobbyUiRo
color: Color::BLACK color: Color::BLACK
} }
TabIndex(0) TabIndex(0)
BackgroundColor(Color::srgb(0.48, 0.84, 0.87)) BackgroundColor(TEXT_INPUT_BACKGROUND)
), ),
] ]
}); });
} }
fn radio_button() -> impl Scene { fn privacy_option(
label: &'static str,
privacy: LobbyPrivacy,
border_radius: BorderRadius,
) -> impl Scene {
bsn! { bsn! {
RadioButton RadioButton
LobbyPrivacyOption(privacy)
Interaction
Node { Node {
display: Display::Flex, display: Display::Flex,
flex_direction: FlexDirection::Row, flex_grow: 1.,
justify_content: JustifyContent::FlexStart, justify_content: JustifyContent::Center,
align_items: AlignItems::Center, align_items: AlignItems::Center,
align_content: AlignContent::Center, border: UiRect::all(px(3)),
column_gap: px(8), border_radius,
} }
Children [ BorderColor::all(OPTION_BORDER_COLOR)
#RadioOuter BackgroundColor(OPTION_BACKGROUND)
Node { Children [(
display: Display::Flex, Text(label)
width: px(32),
height: px(32),
border: UiRect::all(px(4)),
border_radius: BorderRadius::MAX,
}
BorderColor::all(Color::BLACK)
Children [
#RadioInner
Node {
display: Display::Flex,
width: px(16),
height: px(16),
position_type: PositionType::Absolute,
left: px(4),
top: px(4),
border_radius: BorderRadius::MAX,
}
BackgroundColor(Color::srgb(0.35, 0.75, 0.35))
],
Text::new("Radio Button")
TextFont { TextFont {
font_size: FontSize::Px(33.0), font_size: px(38.0),
} }
] TextColor(OPTION_TEXT_COLOR)
)]
}
}
/// Updates the privacy control items from the [`LobbyUiState`] resource.
fn update_privacy_controls(
lobby_ui: Res<LobbyUiState>,
mut commands: Commands,
options: Query<(Entity, &LobbyPrivacyOption, &Interaction, Has<Checked>), With<RadioButton>>,
) {
for (entity, option, interaction, checked) in &options {
let should_be_checked = option.0 == lobby_ui.privacy;
if should_be_checked && !checked {
commands.entity(entity).insert(Checked);
} else if !should_be_checked && checked {
commands
.entity(entity)
.remove::<Checked>()
// Reinserting the interaction will trigger the visual redraw
.insert(*interaction);
}
}
}
/// Updates the lobby privacy in response to the RadioGroup change.
fn on_privacy_changed(
value_change: On<ValueChange<Entity>>,
options: Query<&LobbyPrivacyOption>,
mut lobby_ui: ResMut<LobbyUiState>,
) {
if let Ok(option) = options.get(value_change.value) {
lobby_ui.privacy = option.0;
}
}
/// Styles the UI options according to their interactions.
fn style_privacy_options(
mut options: Query<
(&Interaction, Has<Checked>, &mut BackgroundColor),
(
With<LobbyPrivacyOption>,
Or<(Changed<Interaction>, Changed<Checked>)>,
),
>,
) {
for (interaction, checked, mut bg) in options.iter_mut() {
bg.0 = match (checked, *interaction) {
// Hovering a selected radio is a no-op (pressing it changes
// nothing), so it keeps its selected color; pressing it darkens.
(true, Interaction::Pressed) => OPTION_SELECTED_PRESSED_BACKGROUND,
(true, _) => OPTION_SELECTED_BACKGROUND,
(false, Interaction::Hovered) => OPTION_HOVERED_BACKGROUND,
(false, _) => OPTION_BACKGROUND,
};
}
}
#[cfg(test)]
mod tests {
use super::*;
fn option(privacy: LobbyPrivacy) -> impl Bundle {
(
RadioButton,
LobbyPrivacyOption(privacy),
BackgroundColor(OPTION_BACKGROUND),
)
}
#[test]
fn checked_option_is_styled() {
let mut world = World::new();
world.insert_resource(LobbyUiState::default());
let checked = world
.spawn((
option(LobbyPrivacy::Public),
Interaction::default(),
Checked,
))
.id();
let unchecked = world
.spawn((option(LobbyPrivacy::FriendsOnly), Interaction::default()))
.id();
// Regression: without `Interaction` the style system can never match the
// option, so the background stays at the spawn-time color.
let missing_interaction = world.spawn(option(LobbyPrivacy::Public)).id();
let mut schedule = Schedule::default();
schedule.add_systems((update_privacy_controls, style_privacy_options).chain());
schedule.run(&mut world);
let checked_bg = *world.get::<BackgroundColor>(checked).unwrap();
assert_eq!(
checked_bg.0, OPTION_SELECTED_BACKGROUND,
"checked option must be restyled"
);
let unchecked_bg = *world.get::<BackgroundColor>(unchecked).unwrap();
assert_eq!(
unchecked_bg.0, OPTION_BACKGROUND,
"unchecked option must keep its base color"
);
let untouched_bg = *world.get::<BackgroundColor>(missing_interaction).unwrap();
assert_eq!(
untouched_bg.0, OPTION_BACKGROUND,
"option without Interaction is never styled"
);
}
#[test]
fn selected_option_interactions() {
let mut world = World::new();
world.insert_resource(LobbyUiState::default());
let hovered = world
.spawn((option(LobbyPrivacy::Public), Interaction::Hovered, Checked))
.id();
let pressed = world
.spawn((option(LobbyPrivacy::Public), Interaction::Pressed, Checked))
.id();
let mut schedule = Schedule::default();
schedule.add_systems(style_privacy_options);
schedule.run(&mut world);
assert_eq!(
world.get::<BackgroundColor>(hovered).unwrap().0,
OPTION_SELECTED_BACKGROUND,
"selected option must not change on hover"
);
assert_eq!(
world.get::<BackgroundColor>(pressed).unwrap().0,
OPTION_SELECTED_PRESSED_BACKGROUND,
"selected option must darken when pressed"
);
}
#[test]
fn deselected_option_is_restyled() {
let mut world = World::new();
world.insert_resource(LobbyUiState::default());
let first = world
.spawn((
option(LobbyPrivacy::Public),
Interaction::default(),
Checked,
))
.id();
let second = world
.spawn((option(LobbyPrivacy::FriendsOnly), Interaction::default()))
.id();
let mut schedule = Schedule::default();
schedule.add_systems((update_privacy_controls, style_privacy_options).chain());
schedule.run(&mut world);
assert_eq!(
world.get::<BackgroundColor>(first).unwrap().0,
OPTION_SELECTED_BACKGROUND,
"first option must be styled as checked"
);
// Selecting the other option moves the resource; `sync_privacy_options`
// must then move `Checked` and the style system must react to the move.
world.resource_mut::<LobbyUiState>().privacy = LobbyPrivacy::FriendsOnly;
schedule.run(&mut world);
assert_eq!(
world.get::<BackgroundColor>(first).unwrap().0,
OPTION_BACKGROUND,
"deselected option must be restyled to base color"
);
assert_eq!(
world.get::<BackgroundColor>(second).unwrap().0,
OPTION_SELECTED_BACKGROUND,
"newly checked option must be styled as checked"
);
} }
} }
+3 -1
View File
@@ -2,8 +2,9 @@ use bevy::{camera::ScalingMode, color::palettes::css::GREEN, prelude::*};
use main_menu::MainMenuPlugin; use main_menu::MainMenuPlugin;
use networking::NetworkingPlugin; use networking::NetworkingPlugin;
use crate::{lobby::LobbyPlugin, save::SavePlugin}; use crate::{debug::DebugInspectorPlugin, lobby::LobbyPlugin, save::SavePlugin};
mod debug;
mod lobby; mod lobby;
mod main_menu; mod main_menu;
mod networking; mod networking;
@@ -35,6 +36,7 @@ fn main() {
NetworkingPlugin, NetworkingPlugin,
SavePlugin, SavePlugin,
LobbyPlugin, LobbyPlugin,
DebugInspectorPlugin,
)) ))
.add_systems(Startup, setup) .add_systems(Startup, setup)
.add_systems(Update, debug_border) .add_systems(Update, debug_border)