Compare commits
2
Commits
b041075c09
...
41a523d2e3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
41a523d2e3 | ||
|
|
df95653b86 |
Generated
+461
-6
@@ -212,9 +212,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0348a1c054491f4bfe6ab86a7b6ab1e44e45d899005de92f58b3df180b36ddaf"
|
||||
dependencies = [
|
||||
"clipboard-win",
|
||||
"image",
|
||||
"log",
|
||||
"objc2 0.6.4",
|
||||
"objc2-app-kit 0.3.2",
|
||||
"objc2-core-foundation",
|
||||
"objc2-core-graphics",
|
||||
"objc2-foundation 0.3.2",
|
||||
"parking_lot",
|
||||
"percent-encoding",
|
||||
@@ -388,6 +391,57 @@ dependencies = [
|
||||
"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]]
|
||||
name = "bevy_a11y"
|
||||
version = "0.19.1"
|
||||
@@ -770,6 +824,51 @@ dependencies = [
|
||||
"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]]
|
||||
name = "bevy_encase_derive"
|
||||
version = "0.19.1"
|
||||
@@ -1899,6 +1998,17 @@ dependencies = [
|
||||
"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]]
|
||||
name = "bumpalo"
|
||||
version = "3.20.3"
|
||||
@@ -1957,18 +2067,43 @@ dependencies = [
|
||||
"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]]
|
||||
name = "calloop-wayland-source"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20"
|
||||
dependencies = [
|
||||
"calloop",
|
||||
"calloop 0.13.0",
|
||||
"rustix 0.38.44",
|
||||
"wayland-backend",
|
||||
"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]]
|
||||
name = "cc"
|
||||
version = "1.4.3"
|
||||
@@ -2030,6 +2165,15 @@ dependencies = [
|
||||
"unicode-width",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "color"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2ec7c5eb7a16992b1904d76c517d170ab353b0e0b3d5a0c81a8a0cd1037893cf"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "combine"
|
||||
version = "4.6.7"
|
||||
@@ -2406,12 +2550,49 @@ version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
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]]
|
||||
name = "either"
|
||||
version = "1.17.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9e5e8f6c15a24b9a3ee5efec809ccd006d3b30e8b3bb63c39af737c7f87daa1d"
|
||||
|
||||
[[package]]
|
||||
name = "emath"
|
||||
version = "0.34.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b53f0d33a479321da6b0caa71366c9f67e8a2c149762d90bdc0d16e601ee8ecb"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "encase"
|
||||
version = "0.12.1"
|
||||
@@ -2443,6 +2624,34 @@ dependencies = [
|
||||
"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]]
|
||||
name = "equivalent"
|
||||
version = "1.0.2"
|
||||
@@ -2511,6 +2720,12 @@ version = "2.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223"
|
||||
|
||||
[[package]]
|
||||
name = "fax"
|
||||
version = "0.2.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "caf1079563223d5d59d83c85886a56e586cfd5c1a26292e971a0fa266531ac5a"
|
||||
|
||||
[[package]]
|
||||
name = "fdeflate"
|
||||
version = "0.3.7"
|
||||
@@ -2520,6 +2735,15 @@ dependencies = [
|
||||
"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]]
|
||||
name = "find-msvc-tools"
|
||||
version = "0.1.11"
|
||||
@@ -2683,6 +2907,15 @@ dependencies = [
|
||||
"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]]
|
||||
name = "gethostname"
|
||||
version = "1.1.0"
|
||||
@@ -2712,8 +2945,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"js-sys",
|
||||
"libc",
|
||||
"r-efi 6.0.0",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3120,6 +3355,7 @@ dependencies = [
|
||||
"moxcms",
|
||||
"num-traits",
|
||||
"png",
|
||||
"tiff",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3358,6 +3594,18 @@ dependencies = [
|
||||
"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]]
|
||||
name = "lazy_static"
|
||||
version = "1.5.0"
|
||||
@@ -3603,6 +3851,12 @@ dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nohash-hasher"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451"
|
||||
|
||||
[[package]]
|
||||
name = "nom"
|
||||
version = "8.0.0"
|
||||
@@ -3618,6 +3872,15 @@ version = "0.5.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
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]]
|
||||
name = "ntapi"
|
||||
version = "0.4.3"
|
||||
@@ -4092,6 +4355,17 @@ version = "1.21.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
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]]
|
||||
name = "orbclient"
|
||||
version = "0.3.55"
|
||||
@@ -4192,6 +4466,19 @@ dependencies = [
|
||||
"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]]
|
||||
name = "percent-encoding"
|
||||
version = "2.3.2"
|
||||
@@ -4287,6 +4574,15 @@ dependencies = [
|
||||
"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]]
|
||||
name = "portable-atomic"
|
||||
version = "1.15.0"
|
||||
@@ -4358,6 +4654,12 @@ version = "0.1.30"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d55d956fa96f5ec02be2e13af0e20391a5aa83d6a074e3ad368959d0fab299ea"
|
||||
|
||||
[[package]]
|
||||
name = "quick-error"
|
||||
version = "2.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3"
|
||||
|
||||
[[package]]
|
||||
name = "quick-xml"
|
||||
version = "0.41.0"
|
||||
@@ -4444,6 +4746,16 @@ dependencies = [
|
||||
"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]]
|
||||
name = "read-fonts"
|
||||
version = "0.39.2"
|
||||
@@ -4647,10 +4959,16 @@ dependencies = [
|
||||
"ab_glyph",
|
||||
"log",
|
||||
"memmap2",
|
||||
"smithay-client-toolkit",
|
||||
"smithay-client-toolkit 0.19.2",
|
||||
"tiny-skia",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "self_cell"
|
||||
version = "1.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2ab42ca02749e120097e328d91d415325bdf43b1c72c4c8badf37375fe40a813"
|
||||
|
||||
[[package]]
|
||||
name = "semver"
|
||||
version = "1.0.28"
|
||||
@@ -4743,6 +5061,16 @@ version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
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]]
|
||||
name = "skrifa"
|
||||
version = "0.42.1"
|
||||
@@ -4791,8 +5119,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016"
|
||||
dependencies = [
|
||||
"bitflags 2.13.1",
|
||||
"calloop",
|
||||
"calloop-wayland-source",
|
||||
"calloop 0.13.0",
|
||||
"calloop-wayland-source 0.3.0",
|
||||
"cursor-icon",
|
||||
"libc",
|
||||
"log",
|
||||
@@ -4809,6 +5137,44 @@ dependencies = [
|
||||
"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]]
|
||||
name = "smol_str"
|
||||
version = "0.2.2"
|
||||
@@ -5006,6 +5372,20 @@ dependencies = [
|
||||
"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]]
|
||||
name = "tiny-skia"
|
||||
version = "0.11.4"
|
||||
@@ -5093,6 +5473,7 @@ version = "0.1.44"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100"
|
||||
dependencies = [
|
||||
"log",
|
||||
"pin-project-lite",
|
||||
"tracing-attributes",
|
||||
"tracing-core",
|
||||
@@ -5188,6 +5569,7 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"app_dirs2",
|
||||
"bevy",
|
||||
"bevy-inspector-egui",
|
||||
"derive_more",
|
||||
"jiff",
|
||||
"ron",
|
||||
@@ -5284,6 +5666,32 @@ version = "0.8.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
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]]
|
||||
name = "version_check"
|
||||
version = "0.9.5"
|
||||
@@ -5424,6 +5832,32 @@ dependencies = [
|
||||
"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]]
|
||||
name = "wayland-protocols-plasma"
|
||||
version = "0.3.12"
|
||||
@@ -5511,6 +5945,12 @@ dependencies = [
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "weezl"
|
||||
version = "0.1.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88"
|
||||
|
||||
[[package]]
|
||||
name = "wgpu"
|
||||
version = "29.0.4"
|
||||
@@ -6062,7 +6502,7 @@ dependencies = [
|
||||
"bitflags 2.13.1",
|
||||
"block2 0.5.1",
|
||||
"bytemuck",
|
||||
"calloop",
|
||||
"calloop 0.13.0",
|
||||
"cfg_aliases",
|
||||
"concurrent-queue",
|
||||
"core-foundation",
|
||||
@@ -6084,7 +6524,7 @@ dependencies = [
|
||||
"redox_syscall 0.4.1",
|
||||
"rustix 0.38.44",
|
||||
"sctk-adwaita",
|
||||
"smithay-client-toolkit",
|
||||
"smithay-client-toolkit 0.19.2",
|
||||
"smol_str",
|
||||
"tracing",
|
||||
"unicode-segmentation",
|
||||
@@ -6332,3 +6772,18 @@ name = "zmij"
|
||||
version = "1.0.23"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
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",
|
||||
]
|
||||
|
||||
@@ -6,6 +6,7 @@ edition = "2024"
|
||||
[dependencies]
|
||||
app_dirs2 = "2.5.5"
|
||||
bevy = { version = "0.19", features = ["system_clipboard", "debug"] }
|
||||
bevy-inspector-egui = "0.37"
|
||||
derive_more = { version = "2.1.1", features = ["deref", "deref_mut"] }
|
||||
jiff = { version = "0.2.35", features = ["serde"] }
|
||||
ron = "0.12.2"
|
||||
|
||||
@@ -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
@@ -3,19 +3,64 @@ use bevy::{
|
||||
input_focus::tab_navigation::TabIndex,
|
||||
prelude::*,
|
||||
text::{EditableText, EditableTextFilter, TextCursorStyle},
|
||||
ui_widgets::{RadioButton, RadioGroup},
|
||||
ui::Checked,
|
||||
ui_widgets::{RadioButton, RadioGroup, ValueChange},
|
||||
};
|
||||
|
||||
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;
|
||||
|
||||
#[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 {
|
||||
fn build(&self, app: &mut App) {
|
||||
app.init_resource::<LobbyUiState>();
|
||||
app.register_type::<LobbyUiState>();
|
||||
app.add_systems(
|
||||
OnEnter(AppState::Lobby),
|
||||
(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;
|
||||
|
||||
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! {
|
||||
#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)),
|
||||
padding: Val::all(px(24)),
|
||||
}
|
||||
BackgroundColor(Color::srgb(0.4, 0.4, 0.4))
|
||||
BackgroundColor(PANEL_BACKGROUND)
|
||||
Children [
|
||||
(
|
||||
Text("Server Settings")
|
||||
@@ -60,19 +108,22 @@ fn build_lobby_ui(mut commands: Commands, root_ui: Single<Entity, With<LobbyUiRo
|
||||
TextFont {
|
||||
font_size: px(100.0),
|
||||
}
|
||||
TextColor(Color::srgb(0.9, 0.9, 0.9))
|
||||
TextColor(TEXT_COLOR)
|
||||
TextShadow
|
||||
),
|
||||
(
|
||||
RadioGroup
|
||||
Node {
|
||||
display: Display::Flex,
|
||||
flex_direction: FlexDirection::Column,
|
||||
align_items: AlignItems::Start,
|
||||
column_gap: px(4),
|
||||
flex_direction: FlexDirection::Row,
|
||||
width: px(900),
|
||||
height: px(110),
|
||||
}
|
||||
TabIndex(0)
|
||||
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_size: px(66.0),
|
||||
}
|
||||
TextColor(Color::srgb(0.9, 0.9, 0.9))
|
||||
TextColor(TEXT_COLOR)
|
||||
TextShadow
|
||||
),
|
||||
(
|
||||
@@ -107,7 +158,7 @@ fn build_lobby_ui(mut commands: Commands, root_ui: Single<Entity, With<LobbyUiRo
|
||||
color: Color::BLACK
|
||||
}
|
||||
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)),
|
||||
padding: Val::all(px(24)),
|
||||
}
|
||||
BackgroundColor(Color::srgb(0.4, 0.4, 0.4))
|
||||
BackgroundColor(PANEL_BACKGROUND)
|
||||
Children [
|
||||
(
|
||||
Text("Lobby")
|
||||
@@ -130,7 +181,7 @@ fn build_lobby_ui(mut commands: Commands, root_ui: Single<Entity, With<LobbyUiRo
|
||||
TextFont {
|
||||
font_size: px(100.0),
|
||||
}
|
||||
TextColor(Color::srgb(0.9, 0.9, 0.9))
|
||||
TextColor(TEXT_COLOR)
|
||||
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_size: px(66.0),
|
||||
}
|
||||
TextColor(Color::srgb(0.9, 0.9, 0.9))
|
||||
TextColor(TEXT_COLOR)
|
||||
TextShadow
|
||||
),
|
||||
(
|
||||
@@ -165,50 +216,215 @@ fn build_lobby_ui(mut commands: Commands, root_ui: Single<Entity, With<LobbyUiRo
|
||||
color: Color::BLACK
|
||||
}
|
||||
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! {
|
||||
RadioButton
|
||||
LobbyPrivacyOption(privacy)
|
||||
Interaction
|
||||
Node {
|
||||
display: Display::Flex,
|
||||
flex_direction: FlexDirection::Row,
|
||||
justify_content: JustifyContent::FlexStart,
|
||||
flex_grow: 1.,
|
||||
justify_content: JustifyContent::Center,
|
||||
align_items: AlignItems::Center,
|
||||
align_content: AlignContent::Center,
|
||||
column_gap: px(8),
|
||||
border: UiRect::all(px(3)),
|
||||
border_radius,
|
||||
}
|
||||
Children [
|
||||
#RadioOuter
|
||||
Node {
|
||||
display: Display::Flex,
|
||||
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")
|
||||
BorderColor::all(OPTION_BORDER_COLOR)
|
||||
BackgroundColor(OPTION_BACKGROUND)
|
||||
Children [(
|
||||
Text(label)
|
||||
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
@@ -2,8 +2,9 @@ use bevy::{camera::ScalingMode, color::palettes::css::GREEN, prelude::*};
|
||||
use main_menu::MainMenuPlugin;
|
||||
use networking::NetworkingPlugin;
|
||||
|
||||
use crate::{lobby::LobbyPlugin, save::SavePlugin};
|
||||
use crate::{debug::DebugInspectorPlugin, lobby::LobbyPlugin, save::SavePlugin};
|
||||
|
||||
mod debug;
|
||||
mod lobby;
|
||||
mod main_menu;
|
||||
mod networking;
|
||||
@@ -35,6 +36,7 @@ fn main() {
|
||||
NetworkingPlugin,
|
||||
SavePlugin,
|
||||
LobbyPlugin,
|
||||
DebugInspectorPlugin,
|
||||
))
|
||||
.add_systems(Startup, setup)
|
||||
.add_systems(Update, debug_border)
|
||||
|
||||
Reference in New Issue
Block a user