new workspace
1
wgui/uidev-vk/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
target
|
||||
3389
wgui/uidev-vk/Cargo.lock
generated
Normal file
22
wgui/uidev-vk/Cargo.toml
Normal file
@@ -0,0 +1,22 @@
|
||||
[package]
|
||||
name = "uidev-vk"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
anyhow = { workspace = true }
|
||||
glam = { workspace = true }
|
||||
log = { workspace = true }
|
||||
rust-embed = "8.7.2"
|
||||
tracing-subscriber = { version = "0.3.19", features = ["env-filter"] }
|
||||
wgui = { path = "../" }
|
||||
winit = "0.30.10"
|
||||
vulkano = { workspace = true }
|
||||
vulkano-shaders = { workspace = true }
|
||||
|
||||
[profile.dev]
|
||||
opt-level = 0
|
||||
debug = true
|
||||
strip = "none"
|
||||
debug-assertions = true
|
||||
incremental = true
|
||||
3
wgui/uidev-vk/assets/dashboard/add.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M11 13H5v-2h6V5h2v6h6v2h-6v6h-2z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 150 B |
3
wgui/uidev-vk/assets/dashboard/alphabetical.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M6 11a2 2 0 0 1 2 2v4H4a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2zm-2 2v2h2v-2zm16 0v2h2v2h-2a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2h2v2zm-8-6v4h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2V7zm0 8h2v-2h-2z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 308 B |
3
wgui/uidev-vk/assets/dashboard/apps.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" fill-rule="evenodd" d="M4.857 3A1.857 1.857 0 0 0 3 4.857v4.286C3 10.169 3.831 11 4.857 11h4.286A1.857 1.857 0 0 0 11 9.143V4.857A1.857 1.857 0 0 0 9.143 3zm10 0A1.857 1.857 0 0 0 13 4.857v4.286c0 1.026.831 1.857 1.857 1.857h4.286A1.857 1.857 0 0 0 21 9.143V4.857A1.857 1.857 0 0 0 19.143 3zm-10 10A1.857 1.857 0 0 0 3 14.857v4.286C3 20.169 3.831 21 4.857 21h4.286A1.857 1.857 0 0 0 11 19.143v-4.286A1.857 1.857 0 0 0 9.143 13zm10 0A1.857 1.857 0 0 0 13 14.857v4.286c0 1.026.831 1.857 1.857 1.857h4.286A1.857 1.857 0 0 0 21 19.143v-4.286A1.857 1.857 0 0 0 19.143 13z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 702 B |
3
wgui/uidev-vk/assets/dashboard/back.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="m9.55 12l7.35 7.35q.375.375.363.875t-.388.875t-.875.375t-.875-.375l-7.7-7.675q-.3-.3-.45-.675t-.15-.75t.15-.75t.45-.675l7.7-7.7q.375-.375.888-.363t.887.388t.375.875t-.375.875z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 293 B |
3
wgui/uidev-vk/assets/dashboard/bat_10.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M16 18H8V6h8m.67-2H15V2H9v2H7.33A1.33 1.33 0 0 0 6 5.33v15.34C6 21.4 6.6 22 7.33 22h9.34A1.33 1.33 0 0 0 18 20.67V5.33C18 4.6 17.4 4 16.67 4" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 258 B |
3
wgui/uidev-vk/assets/dashboard/bat_100.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M16.67 4H15V2H9v2H7.33A1.33 1.33 0 0 0 6 5.33v15.34C6 21.4 6.6 22 7.33 22h9.34A1.33 1.33 0 0 0 18 20.67V5.33C18 4.6 17.4 4 16.67 4" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 248 B |
3
wgui/uidev-vk/assets/dashboard/bat_20.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M16 17H8V6h8m.67-2H15V2H9v2H7.33A1.33 1.33 0 0 0 6 5.33v15.34C6 21.4 6.6 22 7.33 22h9.34A1.33 1.33 0 0 0 18 20.67V5.33C18 4.6 17.4 4 16.67 4" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 258 B |
3
wgui/uidev-vk/assets/dashboard/bat_30.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M16 15H8V6h8m.67-2H15V2H9v2H7.33A1.33 1.33 0 0 0 6 5.33v15.34C6 21.4 6.6 22 7.33 22h9.34A1.33 1.33 0 0 0 18 20.67V5.33C18 4.6 17.4 4 16.67 4" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 258 B |
3
wgui/uidev-vk/assets/dashboard/bat_40.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M16 14H8V6h8m.67-2H15V2H9v2H7.33A1.33 1.33 0 0 0 6 5.33v15.34C6 21.4 6.6 22 7.33 22h9.34A1.33 1.33 0 0 0 18 20.67V5.33C18 4.6 17.4 4 16.67 4" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 258 B |
3
wgui/uidev-vk/assets/dashboard/bat_50.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M16 13H8V6h8m.67-2H15V2H9v2H7.33A1.33 1.33 0 0 0 6 5.33v15.34C6 21.4 6.6 22 7.33 22h9.34A1.33 1.33 0 0 0 18 20.67V5.33C18 4.6 17.4 4 16.67 4" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 258 B |
3
wgui/uidev-vk/assets/dashboard/bat_60.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M16 12H8V6h8m.67-2H15V2H9v2H7.33A1.33 1.33 0 0 0 6 5.33v15.34C6 21.4 6.6 22 7.33 22h9.34A1.33 1.33 0 0 0 18 20.67V5.33C18 4.6 17.4 4 16.67 4" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 258 B |
3
wgui/uidev-vk/assets/dashboard/bat_70.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M16 10H8V6h8m.67-2H15V2H9v2H7.33A1.33 1.33 0 0 0 6 5.33v15.34C6 21.4 6.6 22 7.33 22h9.34A1.33 1.33 0 0 0 18 20.67V5.33C18 4.6 17.4 4 16.67 4" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 258 B |
3
wgui/uidev-vk/assets/dashboard/bat_80.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M16 9H8V6h8m.67-2H15V2H9v2H7.33A1.33 1.33 0 0 0 6 5.33v15.34C6 21.4 6.6 22 7.33 22h9.34A1.33 1.33 0 0 0 18 20.67V5.33C18 4.6 17.4 4 16.67 4" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 257 B |
3
wgui/uidev-vk/assets/dashboard/bat_90.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M16 8H8V6h8m.67-2H15V2H9v2H7.33A1.33 1.33 0 0 0 6 5.33v15.34C6 21.4 6.6 22 7.33 22h9.34A1.33 1.33 0 0 0 18 20.67V5.33C18 4.6 17.4 4 16.67 4" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 257 B |
3
wgui/uidev-vk/assets/dashboard/bat_chr_10.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M23.05 11h-3V4l-5 10h3v8M12 18H4l.05-12h8m.67-2h-1.67V2h-6v2H3.38a1.33 1.33 0 0 0-1.33 1.33v15.34c0 .73.6 1.33 1.33 1.33h9.34c.73 0 1.33-.6 1.33-1.33V5.33A1.33 1.33 0 0 0 12.72 4" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 296 B |
3
wgui/uidev-vk/assets/dashboard/bat_chr_100.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M23 11h-3V4l-5 10h3v8M12.67 4H11V2H5v2H3.33A1.33 1.33 0 0 0 2 5.33v15.34C2 21.4 2.6 22 3.33 22h9.34c.73 0 1.33-.6 1.33-1.33V5.33A1.33 1.33 0 0 0 12.67 4" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 270 B |
3
wgui/uidev-vk/assets/dashboard/bat_chr_20.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M23.05 11h-3V4l-5 10h3v8m-6-5h-8V6h8m.67-2h-1.67V2h-6v2H3.38a1.33 1.33 0 0 0-1.33 1.33v15.34c0 .73.6 1.33 1.33 1.33h9.34c.73 0 1.33-.6 1.33-1.33V5.33A1.33 1.33 0 0 0 12.72 4" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 291 B |
3
wgui/uidev-vk/assets/dashboard/bat_chr_30.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M12 15H4V6h8m.67-2H11V2H5v2H3.33A1.33 1.33 0 0 0 2 5.33v15.34C2 21.4 2.6 22 3.33 22h9.34c.73 0 1.33-.6 1.33-1.33V5.33A1.33 1.33 0 0 0 12.67 4M23 11h-3V4l-5 10h3v8z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 281 B |
3
wgui/uidev-vk/assets/dashboard/bat_chr_40.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M13 4h-2V2H5v2H3c-.6 0-1 .4-1 1v16c0 .6.4 1 1 1h10c.6 0 1-.4 1-1V5c0-.6-.4-1-1-1m-1 10.5H4V6h8zM23 11h-3V4l-5 10h3v8" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 234 B |
3
wgui/uidev-vk/assets/dashboard/bat_chr_50.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M23 11h-3V4l-5 10h3v8m-6-9H4V6h8m.67-2H11V2H5v2H3.33A1.33 1.33 0 0 0 2 5.33v15.34C2 21.4 2.6 22 3.33 22h9.34c.73 0 1.33-.6 1.33-1.33V5.33A1.33 1.33 0 0 0 12.67 4" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 279 B |
3
wgui/uidev-vk/assets/dashboard/bat_chr_60.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M12 11H4V6h8m.67-2H11V2H5v2H3.33A1.33 1.33 0 0 0 2 5.33v15.34C2 21.4 2.6 22 3.33 22h9.34c.73 0 1.33-.6 1.33-1.33V5.33A1.33 1.33 0 0 0 12.67 4M23 11h-3V4l-5 10h3v8z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 281 B |
3
wgui/uidev-vk/assets/dashboard/bat_chr_70.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M12 10H4V6h8m.67-2H11V2H5v2H3.33A1.33 1.33 0 0 0 2 5.33v15.34C2 21.4 2.6 22 3.33 22h9.34c.73 0 1.33-.6 1.33-1.33V5.33A1.33 1.33 0 0 0 12.67 4M23 11h-3V4l-5 10h3v8z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 281 B |
3
wgui/uidev-vk/assets/dashboard/bat_chr_80.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M23 11h-3V4l-5 10h3v8M12 9H4V6h8m.67-2H11V2H5v2H3.33A1.33 1.33 0 0 0 2 5.33v15.34C2 21.4 2.6 22 3.33 22h9.34c.73 0 1.33-.6 1.33-1.33V5.33A1.33 1.33 0 0 0 12.67 4" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 279 B |
3
wgui/uidev-vk/assets/dashboard/bat_chr_90.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M23 11h-3V4l-5 10h3v8M12 8H4V6h8m.67-2H11V2H5v2H3.33A1.33 1.33 0 0 0 2 5.33v15.34C2 21.4 2.6 22 3.33 22h9.34c.73 0 1.33-.6 1.33-1.33V5.33A1.33 1.33 0 0 0 12.67 4" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 279 B |
7
wgui/uidev-vk/assets/dashboard/binary.svg
Normal file
@@ -0,0 +1,7 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<g fill="none" stroke="white" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
|
||||
<rect width="4" height="6" x="14" y="14" rx="2" />
|
||||
<rect width="4" height="6" x="6" y="4" rx="2" />
|
||||
<path d="M6 20h4m4-10h4M6 14h2v6m6-16h2v6" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 344 B |
3
wgui/uidev-vk/assets/dashboard/burger.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M21 18H3v-2h18v2Zm0-5H3v-2h18v2Zm0-5H3V6h18v2Z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 165 B |
3
wgui/uidev-vk/assets/dashboard/category_search.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M3 20.5q-.425 0-.712-.288T2 19.5v-6q0-.425.288-.712T3 12.5h6q.425 0 .713.288T10 13.5v6q0 .425-.288.713T9 20.5zm1-2h4v-4H4zM14.725 10h-7.45q-.575 0-.862-.513t.012-1.012L10.15 2.4q.3-.5.85-.5t.85.5l3.725 6.075q.3.5.013 1.013t-.863.512M9.05 8h3.9L11 4.85zm11.825 14.25l-1.95-1.95q-.525.35-1.137.525T16.5 21q-1.875 0-3.187-1.312T12 16.5t1.313-3.187T16.5 12t3.188 1.313T21 16.5q0 .65-.175 1.263t-.5 1.137l1.95 1.95q.275.275.275.7t-.275.7t-.7.275t-.7-.275M16.5 19q1.05 0 1.775-.725T19 16.5t-.725-1.775T16.5 14t-1.775.725T14 16.5t.725 1.775T16.5 19M11 8" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 664 B |
3
wgui/uidev-vk/assets/dashboard/circle.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M12 22q-2.075 0-3.9-.788q-1.825-.787-3.175-2.137q-1.35-1.35-2.137-3.175Q2 14.075 2 12t.788-3.9q.787-1.825 2.137-3.175q1.35-1.35 3.175-2.138Q9.925 2 12 2t3.9.787q1.825.788 3.175 2.138q1.35 1.35 2.137 3.175Q22 9.925 22 12t-.788 3.9q-.787 1.825-2.137 3.175q-1.35 1.35-3.175 2.137Q14.075 22 12 22Z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 411 B |
3
wgui/uidev-vk/assets/dashboard/close.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M8.4 17L7 15.6l3.6-3.6L7 8.425l1.4-1.4l3.6 3.6l3.575-3.6l1.4 1.4l-3.6 3.575l3.6 3.6l-1.4 1.4L12 13.4z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 219 B |
4
wgui/uidev-vk/assets/dashboard/cpu.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 1024 1024">
|
||||
<path fill="white" d="M320 256a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64V320a64 64 0 0 0-64-64zm0-64h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128H320a128 128 0 0 1-128-128V320a128 128 0 0 1 128-128" />
|
||||
<path fill="white" d="M512 64a32 32 0 0 1 32 32v128h-64V96a32 32 0 0 1 32-32m160 0a32 32 0 0 1 32 32v128h-64V96a32 32 0 0 1 32-32m-320 0a32 32 0 0 1 32 32v128h-64V96a32 32 0 0 1 32-32m160 896a32 32 0 0 1-32-32V800h64v128a32 32 0 0 1-32 32m160 0a32 32 0 0 1-32-32V800h64v128a32 32 0 0 1-32 32m-320 0a32 32 0 0 1-32-32V800h64v128a32 32 0 0 1-32 32M64 512a32 32 0 0 1 32-32h128v64H96a32 32 0 0 1-32-32m0-160a32 32 0 0 1 32-32h128v64H96a32 32 0 0 1-32-32m0 320a32 32 0 0 1 32-32h128v64H96a32 32 0 0 1-32-32m896-160a32 32 0 0 1-32 32H800v-64h128a32 32 0 0 1 32 32m0-160a32 32 0 0 1-32 32H800v-64h128a32 32 0 0 1 32 32m0 320a32 32 0 0 1-32 32H800v-64h128a32 32 0 0 1 32 32" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 996 B |
3
wgui/uidev-vk/assets/dashboard/display.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M2 16V4q0-.825.588-1.412T4 2h14v2H4v12zm9 6v-2H8q-.825 0-1.412-.587T6 18V8q0-.825.588-1.412T8 6h13q.825 0 1.413.588T23 8v10q0 .825-.587 1.413T21 20h-3v2zm-3-4h13V8H8zm6.5-5" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 290 B |
6
wgui/uidev-vk/assets/dashboard/displayport.svg
Normal file
@@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 16 16">
|
||||
<g fill="white">
|
||||
<path d="M2.5 7a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 1 0V8h10v.5a.5.5 0 0 0 1 0v-1a.5.5 0 0 0-.5-.5z" />
|
||||
<path d="M1 5a1 1 0 0 0-1 1v3.191a1 1 0 0 0 .553.894l1.618.81a1 1 0 0 0 .447.105H15a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1zm0 1h14v4H2.618L1 9.191z" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 358 B |
6
wgui/uidev-vk/assets/dashboard/eye.svg
Normal file
@@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<g fill="none" stroke="white" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
|
||||
<path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0-4 0" />
|
||||
<path d="M21 12q-3.6 6-9 6t-9-6q3.6-6 9-6t9 6" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 300 B |
3
wgui/uidev-vk/assets/dashboard/fix_floor.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M6 22q-.825 0-1.412-.587T4 20V4q0-.825.588-1.412T6 2h12q.825 0 1.413.588T20 4v16q0 .825-.587 1.413T18 22zm12-2V4H6v16zm0-16H6zM9 9h6l-3-3zm3 9l3-3H9z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 267 B |
3
wgui/uidev-vk/assets/dashboard/games.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M7 6h10a6 6 0 0 1 6 6a6 6 0 0 1-6 6c-1.78 0-3.37-.77-4.47-2h-1.06c-1.1 1.23-2.69 2-4.47 2a6 6 0 0 1-6-6a6 6 0 0 1 6-6M6 9v2H4v2h2v2h2v-2h2v-2H8V9zm9.5 3a1.5 1.5 0 0 0-1.5 1.5a1.5 1.5 0 0 0 1.5 1.5a1.5 1.5 0 0 0 1.5-1.5a1.5 1.5 0 0 0-1.5-1.5m3-3a1.5 1.5 0 0 0-1.5 1.5a1.5 1.5 0 0 0 1.5 1.5a1.5 1.5 0 0 0 1.5-1.5A1.5 1.5 0 0 0 18.5 9" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 450 B |
3
wgui/uidev-vk/assets/dashboard/github.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M12 2A10 10 0 0 0 2 12c0 4.42 2.87 8.17 6.84 9.5c.5.08.66-.23.66-.5v-1.69c-2.77.6-3.36-1.34-3.36-1.34c-.46-1.16-1.11-1.47-1.11-1.47c-.91-.62.07-.6.07-.6c1 .07 1.53 1.03 1.53 1.03c.87 1.52 2.34 1.07 2.91.83c.09-.65.35-1.09.63-1.34c-2.22-.25-4.55-1.11-4.55-4.92c0-1.11.38-2 1.03-2.71c-.1-.25-.45-1.29.1-2.64c0 0 .84-.27 2.75 1.02c.79-.22 1.65-.33 2.5-.33s1.71.11 2.5.33c1.91-1.29 2.75-1.02 2.75-1.02c.55 1.35.2 2.39.1 2.64c.65.71 1.03 1.6 1.03 2.71c0 3.82-2.34 4.66-4.57 4.91c.36.31.69.92.69 1.85V21c0 .27.16.59.67.5C19.14 20.16 22 16.42 22 12A10 10 0 0 0 12 2" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 676 B |
3
wgui/uidev-vk/assets/dashboard/globe.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M12 22q-2.075 0-3.9-.788t-3.175-2.137T2.788 15.9T2 12t.788-3.9t2.137-3.175T8.1 2.788T12 2t3.9.788t3.175 2.137T21.213 8.1T22 12t-.788 3.9t-2.137 3.175t-3.175 2.138T12 22m0-2q3.35 0 5.675-2.325T20 12q0-.175-.012-.363t-.013-.312q-.125.725-.675 1.2T18 13h-2q-.825 0-1.412-.587T14 11v-1h-4V8q0-.825.588-1.412T12 6h1q0-.575.313-1.012t.762-.713q-.5-.125-1.012-.2T12 4Q8.65 4 6.325 6.325T4 12h5q1.65 0 2.825 1.175T13 16v1h-3v2.75q.5.125.988.188T12 20" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 560 B |
3
wgui/uidev-vk/assets/dashboard/home.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M4 21V9l8-6l8 6v12h-6v-7h-4v7Z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 148 B |
3
wgui/uidev-vk/assets/dashboard/knife.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><!-- Icon from Material Design Icons by Pictogrammers - https://github.com/Templarian/MaterialDesign/blob/master/LICENSE -->
|
||||
<path fill="#F22" d="M20.62 2c3.35 5.61-8.15 18.15-8.15 18.15L9.6 17.28L4.91 22l-2.14-2.14z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 311 B |
3
wgui/uidev-vk/assets/dashboard/magic_wand.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="none" stroke="white" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 21L21 6l-3-3L3 18zm9-15l3 3M9 3a2 2 0 0 0 2 2a2 2 0 0 0-2 2a2 2 0 0 0-2-2a2 2 0 0 0 2-2m10 10a2 2 0 0 0 2 2a2 2 0 0 0-2 2a2 2 0 0 0-2-2a2 2 0 0 0 2-2" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 348 B |
3
wgui/uidev-vk/assets/dashboard/microphone.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M12 2a3 3 0 0 1 3 3v6a3 3 0 0 1-3 3a3 3 0 0 1-3-3V5a3 3 0 0 1 3-3m7 9c0 3.53-2.61 6.44-6 6.93V21h-2v-3.07c-3.39-.49-6-3.4-6-6.93h2a5 5 0 0 0 5 5a5 5 0 0 0 5-5z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 277 B |
3
wgui/uidev-vk/assets/dashboard/minijack.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M11 4V3c0-.55.45-1 1-1s1 .45 1 1v1zm2 5V5h-2v4H9v6c0 1.3.84 2.4 2 2.82V22h2v-4.18c1.16-.42 2-1.52 2-2.82V9z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 225 B |
44
wgui/uidev-vk/assets/dashboard/monado.svg
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
id="vector"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 150.72 144.4"
|
||||
version="1.1"
|
||||
sodipodi:docname="ic_monado_notif.svg"
|
||||
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs1" />
|
||||
<sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="true"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="24.5"
|
||||
inkscape:cx="10.265306"
|
||||
inkscape:cy="15.469388"
|
||||
inkscape:window-width="2560"
|
||||
inkscape:window-height="1378"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="vector" />
|
||||
<g
|
||||
transform="translate(6.0288, 8.5612955) scale(0.92, 0.8814225)"
|
||||
id="g_0"
|
||||
style="fill:#ffffff">
|
||||
<path
|
||||
fill="#782b90"
|
||||
d="m143.23,19.75L79.85,0.66c-2.93,-0.88 -6.05,-0.88 -8.97,0L7.49,19.75c-4.45,1.34 -7.49,5.43 -7.49,10.08v85.07c0,4.66 3.07,8.77 7.54,10.09l63.43,18.77c2.87,0.85 5.92,0.85 8.79,0l63.43,-18.77c4.47,-1.32 7.54,-5.43 7.54,-10.09L150.72,29.83c0,-4.64 -3.04,-8.74 -7.49,-10.08ZM49.02,104l-17.99,-5.35c-2.52,-0.75 -4.24,-3.06 -4.24,-5.68v-36.81l22.23,30.57v17.28ZM75.36,108.15v0l-0,-0 -0,0v-0L26.79,41.84l17.99,-5.35c2.35,-0.7 4.88,0.12 6.38,2.06l24.19,31.33 24.19,-31.33c1.5,-1.94 4.04,-2.76 6.38,-2.06l17.99,5.35 -48.56,66.3ZM123.93,92.96c0,2.62 -1.72,4.94 -4.24,5.68l-17.99,5.35v-17.28l22.23,-30.57v36.81Z"
|
||||
id="path1"
|
||||
style="fill:#ffffff" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
3
wgui/uidev-vk/assets/dashboard/panorama.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M3 20q-.425 0-.712-.288T2 19V5q0-.425.288-.712T3 4q.2 0 .888.238t1.837.512t2.713.513T12 5.5t3.563-.238t2.712-.512t1.838-.513T21 4q.425 0 .713.288T22 5v14q0 .425-.288.713T21 20q-.2 0-.888-.238t-1.837-.512t-2.712-.513T12 18.5t-3.562.238t-2.713.512t-1.837.513T3 20m1-2.35q1.95-.575 3.963-.862T12 16.5t4.038.288T20 17.65V6.375q-1.95.575-3.963.85T12 7.5t-4.038-.275T4 6.375zM12 12" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 493 B |
3
wgui/uidev-vk/assets/dashboard/play.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M8 19V5l11 7z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 131 B |
3
wgui/uidev-vk/assets/dashboard/power.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M12 22q-2.075 0-3.9-.788t-3.175-2.137T2.788 15.9T2 12q0-2.1.788-3.912t2.137-3.163l1.4 1.4q-1.1 1.1-1.712 2.55T4 12q0 3.35 2.325 5.675T12 20t5.675-2.325T20 12q0-1.675-.612-3.125t-1.713-2.55l1.4-1.4q1.35 1.35 2.138 3.163T22 12q0 2.075-.788 3.9t-2.137 3.175t-3.175 2.138T12 22m-1-9V2h2v11z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 405 B |
3
wgui/uidev-vk/assets/dashboard/recenter.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M11 23v-4.175L9.9 19.9l-1.4-1.4L12 15l3.5 3.5l-1.4 1.4l-1.1-1.075V23zm-5.5-7.5l-1.4-1.4L5.175 13H1v-2h4.175L4.1 9.9l1.4-1.4L9 12zm13 0L15 12l3.5-3.5l1.4 1.4l-1.075 1.1H23v2h-4.175l1.075 1.1zm-6.5-2q-.625 0-1.062-.437T10.5 12t.438-1.062T12 10.5t1.063.438T13.5 12t-.437 1.063T12 13.5M12 9L8.5 5.5l1.4-1.4L11 5.175V1h2v4.175L14.1 4.1l1.4 1.4z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 458 B |
3
wgui/uidev-vk/assets/dashboard/refresh.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M12 20q-3.35 0-5.675-2.325T4 12t2.325-5.675T12 4q1.725 0 3.3.712T18 6.75V4h2v7h-7V9h4.2q-.8-1.4-2.187-2.2T12 6Q9.5 6 7.75 7.75T6 12t1.75 4.25T12 18q1.925 0 3.475-1.1T17.65 14h2.1q-.7 2.65-2.85 4.325T12 20" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 323 B |
3
wgui/uidev-vk/assets/dashboard/remove_circle.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="#F55" d="M7 12c0 .55.45 1 1 1h8c.55 0 1-.45 1-1s-.45-1-1-1H8c-.55 0-1 .45-1 1m5-10C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 308 B |
3
wgui/uidev-vk/assets/dashboard/search.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M9.5 16q-2.725 0-4.612-1.888T3 9.5t1.888-4.612T9.5 3t4.613 1.888T16 9.5q0 1.1-.35 2.075T14.7 13.3l5.6 5.6q.275.275.275.7t-.275.7t-.7.275t-.7-.275l-5.6-5.6q-.75.6-1.725.95T9.5 16m0-2q1.875 0 3.188-1.312T14 9.5t-1.312-3.187T9.5 5T6.313 6.313T5 9.5t1.313 3.188T9.5 14" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 382 B |
3
wgui/uidev-vk/assets/dashboard/settings.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="m9.25 22l-.4-3.2q-.325-.125-.612-.3t-.563-.375L4.7 19.375l-2.75-4.75l2.575-1.95Q4.5 12.5 4.5 12.338v-.675q0-.163.025-.338L1.95 9.375l2.75-4.75l2.975 1.25q.275-.2.575-.375t.6-.3l.4-3.2h5.5l.4 3.2q.325.125.613.3t.562.375l2.975-1.25l2.75 4.75l-2.575 1.95q.025.175.025.338v.674q0 .163-.05.338l2.575 1.95l-2.75 4.75l-2.95-1.25q-.275.2-.575.375t-.6.3l-.4 3.2zm2.8-6.5q1.45 0 2.475-1.025T15.55 12t-1.025-2.475T12.05 8.5q-1.475 0-2.488 1.025T8.55 12t1.013 2.475T12.05 15.5" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 583 B |
3
wgui/uidev-vk/assets/dashboard/sleep.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M23 12h-6v-2l3.39-4H17V4h6v2l-3.38 4H23zm-8 4H9v-2l3.39-4H9V8h6v2l-3.38 4H15zm-8 4H1v-2l3.39-4H1v-2h6v2l-3.38 4H7z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 232 B |
3
wgui/uidev-vk/assets/dashboard/terminal.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><!-- Icon from Material Symbols by Google - https://github.com/google/material-design-icons/blob/master/LICENSE -->
|
||||
<path fill="white" d="M4 20q-.825 0-1.412-.587T2 18V6q0-.825.588-1.412T4 4h16q.825 0 1.413.588T22 6v12q0 .825-.587 1.413T20 20zm0-2h16V8H4zm3.5-1l-1.4-1.4L8.675 13l-2.6-2.6L7.5 9l4 4zm4.5 0v-2h6v2z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 408 B |
3
wgui/uidev-vk/assets/dashboard/usage.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M12 22q-2.075 0-3.9-.788t-3.175-2.15t-2.137-3.187T2 12q0-3.925 2.6-6.75t6.4-3.2v3q-2.575.35-4.288 2.313T5 12q0 2.9 2.05 4.95T12 19q1.65 0 3.088-.7t2.412-1.9l2.6 1.5q-1.35 1.875-3.475 2.988T12 22m9.15-5.95l-2.6-1.5q.225-.6.337-1.237T19 12q0-2.675-1.713-4.637T13 5.05v-3q3.8.375 6.4 3.2T22 12q0 1.1-.2 2.125t-.65 1.925" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 434 B |
3
wgui/uidev-vk/assets/dashboard/volume.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M19 11.975q0-2.075-1.1-3.787t-2.95-2.563q-.375-.175-.55-.537t-.05-.738q.15-.4.538-.575t.787 0Q18.1 4.85 19.55 7.063T21 11.974t-1.45 4.913t-3.875 3.287q-.4.175-.788 0t-.537-.575q-.125-.375.05-.737t.55-.538q1.85-.85 2.95-2.562t1.1-3.788M7 15H4q-.425 0-.712-.288T3 14v-4q0-.425.288-.712T4 9h3l3.3-3.3q.475-.475 1.088-.213t.612.938v11.15q0 .675-.612.938T10.3 18.3zm9.5-3q0 1.05-.475 1.988t-1.25 1.537q-.25.15-.513.013T14 15.1V8.85q0-.3.263-.437t.512.012q.775.625 1.25 1.575t.475 2" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 595 B |
3
wgui/uidev-vk/assets/dashboard/volume_off.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="#FF8888" d="M16.775 19.575q-.275.175-.55.325t-.575.275q-.375.175-.762 0t-.538-.575q-.15-.375.038-.737t.562-.538q.1-.05.188-.1t.187-.1L12 14.8v2.775q0 .675-.612.938T10.3 18.3L7 15H4q-.425 0-.712-.288T3 14v-4q0-.425.288-.712T4 9h2.2L2.1 4.9q-.275-.275-.275-.7t.275-.7t.7-.275t.7.275l17 17q.275.275.275.7t-.275.7t-.7.275t-.7-.275zm2.225-7.6q0-2.075-1.1-3.787t-2.95-2.563q-.375-.175-.55-.537t-.05-.738q.15-.4.538-.575t.787 0Q18.1 4.85 19.55 7.05T21 11.975q0 .825-.15 1.638t-.425 1.562q-.2.55-.612.688t-.763.012t-.562-.45t-.013-.75q.275-.65.4-1.312T19 11.975m-4.225-3.55Q15.6 8.95 16.05 10t.45 2v.25q0 .125-.025.25q-.05.325-.35.425t-.55-.15L14.3 11.5q-.15-.15-.225-.337T14 10.775V8.85q0-.3.263-.437t.512.012M9.75 6.95Q9.6 6.8 9.6 6.6t.15-.35l.55-.55q.475-.475 1.087-.213t.613.938V8q0 .35-.3.475t-.55-.125z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 908 B |
3
wgui/uidev-vk/assets/dashboard/vr.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 15 15">
|
||||
<path fill="white" d="m.851 5.4l.137.48zm13.298 0l.137-.481zM4.58 12.352l.44.24zm5.84 0l.438-.239zM2.996 3.757l-.464-.185zm-.961 1.057a.5.5 0 0 0 .928.372zm9.967-1.057l.464-.185zm.033 1.429a.5.5 0 1 0 .928-.372zm1.964.68V9.21h1V5.865zM11.21 12h-.542v1h.542zm-6.878 0H3.79v1h.542zM1 9.21V5.865H0V9.21zM.988 5.88a23.7 23.7 0 0 1 13.024 0l.274-.961a24.7 24.7 0 0 0-13.572 0zM3.79 12A2.79 2.79 0 0 1 1 9.21H0A3.79 3.79 0 0 0 3.79 13zm.352.113a.22.22 0 0 1 .19-.113v1a.78.78 0 0 0 .687-.408zm.877.479c1.071-1.963 3.89-1.963 4.962 0l.877-.479c-1.45-2.658-5.267-2.658-6.716 0zM10.668 12c.08 0 .152.043.19.113l-.877.479a.78.78 0 0 0 .687.408zM14 9.21A2.79 2.79 0 0 1 11.21 12v1A3.79 3.79 0 0 0 15 9.21zm1-3.345a.984.984 0 0 0-.714-.946l-.274.961A.02.02 0 0 1 14 5.865zm-14 0a.02.02 0 0 1-.012.015l-.274-.96A.984.984 0 0 0 0 5.865zm1.533-2.293l-.497 1.242l.928.372l.497-1.243zm9.006.37l.497 1.244l.928-.372l-.497-1.242zM4.854 3h5.292V2H4.854zm7.613.572A2.5 2.5 0 0 0 10.146 2v1a1.5 1.5 0 0 1 1.393.943zm-9.006.37A1.5 1.5 0 0 1 4.854 3V2a2.5 2.5 0 0 0-2.321 1.572z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
110
wgui/uidev-vk/assets/dashboard/wayvr_dashboard.svg
Normal file
@@ -0,0 +1,110 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="30"
|
||||
height="30"
|
||||
viewBox="0 0 7.9375004 7.9375004"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
|
||||
sodipodi:docname="dashboard_logo.svg"
|
||||
inkscape:export-filename="dashboard_logo.png"
|
||||
inkscape:export-xdpi="409.60001"
|
||||
inkscape:export-ydpi="409.60001"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="true"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:zoom="16"
|
||||
inkscape:cx="11.8125"
|
||||
inkscape:cy="16.78125"
|
||||
inkscape:window-width="1836"
|
||||
inkscape:window-height="1185"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
showguides="false">
|
||||
<inkscape:grid
|
||||
id="grid2"
|
||||
units="mm"
|
||||
originx="0"
|
||||
originy="0"
|
||||
spacingx="0.26458333"
|
||||
spacingy="0.26458333"
|
||||
empcolor="#0099e5"
|
||||
empopacity="0.30196078"
|
||||
color="#0099e5"
|
||||
opacity="0.14901961"
|
||||
empspacing="5"
|
||||
enabled="true"
|
||||
visible="true" />
|
||||
</sodipodi:namedview>
|
||||
<defs
|
||||
id="defs1">
|
||||
<linearGradient
|
||||
id="linearGradient1"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
style="stop-color:#ad70ff;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop1" />
|
||||
<stop
|
||||
style="stop-color:#00ffff;stop-opacity:1;"
|
||||
offset="0.99844205"
|
||||
id="stop2" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient1"
|
||||
id="linearGradient2"
|
||||
x1="0"
|
||||
y1="8.4666653"
|
||||
x2="8.4664993"
|
||||
y2="0"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="scale(0.93751843,0.93750002)" />
|
||||
</defs>
|
||||
<g
|
||||
inkscape:label="back"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<rect
|
||||
style="font-variation-settings:'wght' 700;fill:url(#linearGradient2);stroke-width:0.468754;stroke-linecap:round;stroke-linejoin:round"
|
||||
id="rect1"
|
||||
width="7.9380002"
|
||||
height="7.9375"
|
||||
x="0"
|
||||
y="0"
|
||||
rx="1.5874999"
|
||||
ry="1.5874999" />
|
||||
<path
|
||||
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:1.05833;stroke-linecap:butt;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 1.5874998,3.7041664 v 1.3229167 h 1.3229166 v 1.3229165 l 1.3229165,-1e-7"
|
||||
id="path3"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<path
|
||||
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:1.05833;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 1.5874998,2.6458332 V 1.5875 c 3.1749997,-2e-7 4.7624995,1.5874997 4.7624995,4.7624995 H 5.2916661"
|
||||
id="path4"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer2"
|
||||
inkscape:label="front"
|
||||
style="stroke-width:2.11667;stroke-dasharray:none" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.4 KiB |
77
wgui/uidev-vk/assets/dashboard/wayvr_dashboard_mono.svg
Normal file
@@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="30"
|
||||
height="30"
|
||||
viewBox="0 0 7.9375004 7.9375004"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
inkscape:version="1.4.2 (ebf0e940d0, 2025-05-08)"
|
||||
sodipodi:docname="mono.svg"
|
||||
inkscape:export-filename="dashboard_logo.png"
|
||||
inkscape:export-xdpi="409.60001"
|
||||
inkscape:export-ydpi="409.60001"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="true"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:zoom="16"
|
||||
inkscape:cx="11.84375"
|
||||
inkscape:cy="16.78125"
|
||||
inkscape:window-width="1836"
|
||||
inkscape:window-height="1080"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
showguides="false">
|
||||
<inkscape:grid
|
||||
id="grid2"
|
||||
units="mm"
|
||||
originx="0"
|
||||
originy="0"
|
||||
spacingx="0.26458333"
|
||||
spacingy="0.26458333"
|
||||
empcolor="#0099e5"
|
||||
empopacity="0.30196078"
|
||||
color="#0099e5"
|
||||
opacity="0.14901961"
|
||||
empspacing="5"
|
||||
enabled="true"
|
||||
visible="true" />
|
||||
</sodipodi:namedview>
|
||||
<defs
|
||||
id="defs1" />
|
||||
<g
|
||||
inkscape:label="back"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<path
|
||||
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:1.05833;stroke-linecap:butt;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 1.5874998,3.7041664 v 1.3229167 h 1.3229166 v 1.3229165 l 1.3229165,-1e-7"
|
||||
id="path3"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<path
|
||||
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:1.05833;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 1.5874998,2.6458332 V 1.5875 c 3.1749997,-2e-7 4.7624995,1.5874997 4.7624995,4.7624995 H 5.2916661"
|
||||
id="path4"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer2"
|
||||
inkscape:label="front"
|
||||
style="stroke-width:2.11667;stroke-dasharray:none" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.4 KiB |
4
wgui/uidev-vk/assets/dashboard/window.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M16 7H4c-1.103 0-2 .897-2 2v10c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2V9c0-1.103-.897-2-2-2M4 19v-8h12V9l.002 10z" />
|
||||
<path fill="white" d="M22 5c0-1.103-.897-2-2-2H7c-1.103 0-2 .897-2 2h13.001c1.101 0 1.996.895 1.999 1.994L20.002 15H20v2c1.103 0 2-.897 2-2V8.007L22.001 8V6L22 5.99z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 404 B |
123
wgui/uidev-vk/assets/gui/anchor.xml
Normal file
@@ -0,0 +1,123 @@
|
||||
<layout>
|
||||
<include src="theme.xml" />
|
||||
|
||||
<theme>
|
||||
<var key="side_sprite_size" value="26" />
|
||||
</theme>
|
||||
|
||||
<elements>
|
||||
<!-- background for testing -->
|
||||
<rectangle position="absolute" color="#333333" width="100%" height="100%" />
|
||||
|
||||
<!-- left/right separator (menu and rest) -->
|
||||
<div flex_direction="row" width="100%" height="100%" gap="8">
|
||||
<!-- LEFT MENU -->
|
||||
<div id="menu" width="48" min_width="48" max_width="48" height="100%" align_items="center" justify_content="center">
|
||||
<rectangle
|
||||
width="100%"
|
||||
round="100%"
|
||||
color="~menu_dark"
|
||||
flex_direction="column"
|
||||
justify_content="center"
|
||||
align_items="center"
|
||||
gap="24"
|
||||
padding_top="16"
|
||||
padding_bottom="16"
|
||||
>
|
||||
<sprite src="dashboard/wayvr_dashboard_mono.svg" width="~side_sprite_size" height="~side_sprite_size" />
|
||||
<sprite src="dashboard/apps.svg" width="~side_sprite_size" height="~side_sprite_size" />
|
||||
<sprite src="dashboard/games.svg" width="~side_sprite_size" height="~side_sprite_size" />
|
||||
<sprite src="dashboard/monado.svg" width="~side_sprite_size" height="~side_sprite_size" />
|
||||
<sprite src="dashboard/window.svg" width="~side_sprite_size" height="~side_sprite_size" />
|
||||
<rectangle height="2" color="#FFFFFF33" width="~side_sprite_size" />
|
||||
<sprite src="dashboard/settings.svg" width="~side_sprite_size" height="~side_sprite_size" />
|
||||
</rectangle>
|
||||
</div>
|
||||
<!-- REST -->
|
||||
<!-- content/bottom panel separator -->
|
||||
<div flex_direction="column" gap="8" flex_grow="1">
|
||||
<!-- CONTENT -->
|
||||
<rectangle
|
||||
color2="#0d131acc" color="#244179aa" gradient="vertical" round="8" overflow_y="hidden"
|
||||
justify_content="center"
|
||||
flex_grow="1"
|
||||
>
|
||||
<div
|
||||
id="content"
|
||||
overflow_x="scroll"
|
||||
overflow_y="scroll"
|
||||
align_items="center"
|
||||
justify_content="center"
|
||||
flex_direction="column"
|
||||
gap="24"
|
||||
>
|
||||
<sprite src="dashboard/wayvr_dashboard.svg" min_width="96" min_height="96" />
|
||||
<label text="Hello, user!" size="32" weight="bold" color="#FFFFFF" />
|
||||
<label text="Connected to wlx-overlay-s" size="16" weight="bold" color="#bbffbb" />
|
||||
|
||||
<!-- main button list -->
|
||||
<div flex_direction="row" gap="8" margin_top="32">
|
||||
<rectangle width="120" height="82" round="8" border="2" border_color="#FFFFFF77" color="#00000033" align_items="center" justify_content="center" flex_direction="column" gap="8">
|
||||
<sprite src="dashboard/apps.svg" width="32" height="32" />
|
||||
<label weight="bold" color="#FFFFFF" size="18" text="Apps" />
|
||||
</rectangle>
|
||||
<rectangle width="120" height="82" round="8" border="2" border_color="#FFFFFF77" color="#00000033" align_items="center" justify_content="center" flex_direction="column" gap="8">
|
||||
<sprite src="dashboard/games.svg" width="32" height="32" />
|
||||
<label weight="bold" color="#FFFFFF" size="18" text="Games" />
|
||||
</rectangle>
|
||||
<rectangle width="120" height="82" round="8" border="2" border_color="#FFFFFF77" color="#00000033" align_items="center" justify_content="center" flex_direction="column" gap="8">
|
||||
<sprite src="dashboard/monado.svg" width="32" height="32" />
|
||||
<label weight="bold" color="#FFFFFF" size="18" text="Monado" />
|
||||
</rectangle>
|
||||
<rectangle width="120" height="82" round="8" border="2" border_color="#FFFFFF77" color="#00000033" align_items="center" justify_content="center" flex_direction="column" gap="8">
|
||||
<sprite src="dashboard/window.svg" width="32" height="32" />
|
||||
<label weight="bold" color="#FFFFFF" size="18" text="Processes" />
|
||||
</rectangle>
|
||||
<rectangle width="120" height="82" round="8" border="2" border_color="#FFFFFF77" color="#00000033" align_items="center" justify_content="center" flex_direction="column" gap="8">
|
||||
<sprite src="dashboard/settings.svg" width="32" height="32" />
|
||||
<label weight="bold" color="#FFFFFF" size="18" text="Settings" />
|
||||
</rectangle>
|
||||
</div>
|
||||
</div>
|
||||
</rectangle>
|
||||
<!-- BOTTOM PANEL -->
|
||||
<rectangle
|
||||
width="100%"
|
||||
height="48"
|
||||
box_sizing="border_box"
|
||||
round="8"
|
||||
flex_direction="row"
|
||||
align_items="center"
|
||||
justify_content="space_between"
|
||||
color="~bottom_panel"
|
||||
>
|
||||
<!-- left gradient -->
|
||||
<div position="absolute" width="100%" height="100%" justify_content="start">
|
||||
<rectangle position="absolute" width="40%" height="100%" color="#0a0a0a" color2="#0a0a0a00" round="8" gradient="horizontal" />
|
||||
</div>
|
||||
|
||||
<!-- right gradient -->
|
||||
<div position="absolute" width="100%" height="100%" justify_content="end">
|
||||
<rectangle position="absolute" width="40%" height="100%" color2="#0a0a0a" color="#0a0a0a00" round="8" gradient="horizontal" />
|
||||
</div>
|
||||
|
||||
<!-- top shine -->
|
||||
<div position="absolute" width="100%" height="100%" justify_content="center">
|
||||
<rectangle position="absolute" width="99%" height="2" color="#FFFFFF66" round="4" />
|
||||
</div>
|
||||
|
||||
<!-- Left bottom side -->
|
||||
<div margin_left="8">
|
||||
<sprite src="dashboard/volume.svg" width="24" height="24" margin="8" />
|
||||
<sprite src="dashboard/recenter.svg" width="24" height="24" margin="8" />
|
||||
</div>
|
||||
|
||||
<!-- Right bottom side -->
|
||||
<div margin_right="16">
|
||||
<label text="12:34" color="#FFFFFF" size="16" />
|
||||
</div>
|
||||
</rectangle>
|
||||
</div>
|
||||
</div>
|
||||
</elements>
|
||||
</layout>
|
||||
123
wgui/uidev-vk/assets/gui/dashboard.xml
Normal file
@@ -0,0 +1,123 @@
|
||||
<layout>
|
||||
<include src="theme.xml" />
|
||||
|
||||
<theme>
|
||||
<var key="side_sprite_size" value="26" />
|
||||
</theme>
|
||||
|
||||
<elements>
|
||||
<!-- background for testing -->
|
||||
<rectangle position="absolute" color="#333333" width="100%" height="100%" />
|
||||
|
||||
<!-- left/right separator (menu and rest) -->
|
||||
<div flex_direction="row" width="100%" height="100%" gap="8">
|
||||
<!-- LEFT MENU -->
|
||||
<div id="menu" width="48" min_width="48" max_width="48" height="100%" align_items="center" justify_content="center">
|
||||
<rectangle
|
||||
width="100%"
|
||||
round="100%"
|
||||
color="~menu_dark"
|
||||
flex_direction="column"
|
||||
justify_content="center"
|
||||
align_items="center"
|
||||
gap="24"
|
||||
padding_top="16"
|
||||
padding_bottom="16"
|
||||
>
|
||||
<sprite src="dashboard/wayvr_dashboard_mono.svg" width="~side_sprite_size" height="~side_sprite_size" />
|
||||
<sprite src="dashboard/apps.svg" width="~side_sprite_size" height="~side_sprite_size" />
|
||||
<sprite src="dashboard/games.svg" width="~side_sprite_size" height="~side_sprite_size" />
|
||||
<sprite src="dashboard/monado.svg" width="~side_sprite_size" height="~side_sprite_size" />
|
||||
<sprite src="dashboard/window.svg" width="~side_sprite_size" height="~side_sprite_size" />
|
||||
<rectangle height="2" color="#FFFFFF33" width="~side_sprite_size" />
|
||||
<sprite src="dashboard/settings.svg" width="~side_sprite_size" height="~side_sprite_size" />
|
||||
</rectangle>
|
||||
</div>
|
||||
<!-- REST -->
|
||||
<!-- content/bottom panel separator -->
|
||||
<div flex_direction="column" gap="8" flex_grow="1">
|
||||
<!-- CONTENT -->
|
||||
<rectangle
|
||||
color2="#0d131acc" color="#244179aa" gradient="vertical" round="8" overflow_y="hidden"
|
||||
justify_content="center"
|
||||
flex_grow="1"
|
||||
>
|
||||
<div
|
||||
id="content"
|
||||
overflow_x="scroll"
|
||||
overflow_y="scroll"
|
||||
align_items="center"
|
||||
justify_content="center"
|
||||
flex_direction="column"
|
||||
gap="24"
|
||||
>
|
||||
<sprite src="dashboard/wayvr_dashboard.svg" min_width="96" min_height="96" />
|
||||
<label text="Hello, user!" size="32" weight="bold" color="#FFFFFF" />
|
||||
<label text="Connected to wlx-overlay-s" size="16" weight="bold" color="#bbffbb" />
|
||||
|
||||
<!-- main button list -->
|
||||
<div flex_direction="row" gap="8" margin_top="32">
|
||||
<rectangle width="120" height="82" round="8" border="2" border_color="#FFFFFF77" color="#00000033" align_items="center" justify_content="center" flex_direction="column" gap="8">
|
||||
<sprite src="dashboard/apps.svg" width="32" height="32" />
|
||||
<label weight="bold" color="#FFFFFF" size="18" text="Apps" />
|
||||
</rectangle>
|
||||
<rectangle width="120" height="82" round="8" border="2" border_color="#FFFFFF77" color="#00000033" align_items="center" justify_content="center" flex_direction="column" gap="8">
|
||||
<sprite src="dashboard/games.svg" width="32" height="32" />
|
||||
<label weight="bold" color="#FFFFFF" size="18" text="Games" />
|
||||
</rectangle>
|
||||
<rectangle width="120" height="82" round="8" border="2" border_color="#FFFFFF77" color="#00000033" align_items="center" justify_content="center" flex_direction="column" gap="8">
|
||||
<sprite src="dashboard/monado.svg" width="32" height="32" />
|
||||
<label weight="bold" color="#FFFFFF" size="18" text="Monado" />
|
||||
</rectangle>
|
||||
<rectangle width="120" height="82" round="8" border="2" border_color="#FFFFFF77" color="#00000033" align_items="center" justify_content="center" flex_direction="column" gap="8">
|
||||
<sprite src="dashboard/window.svg" width="32" height="32" />
|
||||
<label weight="bold" color="#FFFFFF" size="18" text="Processes" />
|
||||
</rectangle>
|
||||
<rectangle width="120" height="82" round="8" border="2" border_color="#FFFFFF77" color="#00000033" align_items="center" justify_content="center" flex_direction="column" gap="8">
|
||||
<sprite src="dashboard/settings.svg" width="32" height="32" />
|
||||
<label weight="bold" color="#FFFFFF" size="18" text="Settings" />
|
||||
</rectangle>
|
||||
</div>
|
||||
</div>
|
||||
</rectangle>
|
||||
<!-- BOTTOM PANEL -->
|
||||
<rectangle
|
||||
width="100%"
|
||||
height="48"
|
||||
box_sizing="border_box"
|
||||
round="8"
|
||||
flex_direction="row"
|
||||
align_items="center"
|
||||
justify_content="space_between"
|
||||
color="~bottom_panel"
|
||||
>
|
||||
<!-- left gradient -->
|
||||
<div position="absolute" width="100%" height="100%" justify_content="start">
|
||||
<rectangle position="absolute" width="40%" height="100%" color="#0a0a0a" color2="#0a0a0a00" round="8" gradient="horizontal" />
|
||||
</div>
|
||||
|
||||
<!-- right gradient -->
|
||||
<div position="absolute" width="100%" height="100%" justify_content="end">
|
||||
<rectangle position="absolute" width="40%" height="100%" color2="#0a0a0a" color="#0a0a0a00" round="8" gradient="horizontal" />
|
||||
</div>
|
||||
|
||||
<!-- top shine -->
|
||||
<div position="absolute" width="100%" height="100%" justify_content="center">
|
||||
<rectangle position="absolute" width="99%" height="2" color="#FFFFFF66" round="4" />
|
||||
</div>
|
||||
|
||||
<!-- Left bottom side -->
|
||||
<div margin_left="8">
|
||||
<sprite src="dashboard/volume.svg" width="24" height="24" margin="8" />
|
||||
<sprite src="dashboard/recenter.svg" width="24" height="24" margin="8" />
|
||||
</div>
|
||||
|
||||
<!-- Right bottom side -->
|
||||
<div margin_right="16">
|
||||
<label text="12:34" color="#FFFFFF" size="16" />
|
||||
</div>
|
||||
</rectangle>
|
||||
</div>
|
||||
</div>
|
||||
</elements>
|
||||
</layout>
|
||||
87
wgui/uidev-vk/assets/gui/testbed.xml
Normal file
@@ -0,0 +1,87 @@
|
||||
<layout>
|
||||
<theme>
|
||||
<var key="aqua1" value="#00AAFF" />
|
||||
<var key="aqua2" value="#00CCFF" />
|
||||
<var key="aqua3" value="#00FFFF" />
|
||||
</theme>
|
||||
|
||||
<elements>
|
||||
<div overflow_y="scroll" overflow_x="scroll">
|
||||
<!-- 1/3 red rect -->
|
||||
<rectangle width="100%" padding="16" box_sizing="content_box" flex_wrap="wrap" gap="16" align_content="flex_start" color="#223344">
|
||||
<rectangle color="#99AAFF" round="100%" width="128" height="64" align_items="center" justify_content="center" border="8" border_color="#FFFFFF">
|
||||
<label text="I'm centered" color="#FF0000" weight="bold" />
|
||||
</rectangle>
|
||||
<div flex_direction="column">
|
||||
<label text="I'm a text!" color="~aqua1" />
|
||||
<label text="I'm a bold text!" color="~aqua2" weight="bold" />
|
||||
<label text="I'm a BIG text!" color="~aqua3" weight="bold" size="20" />
|
||||
</div>
|
||||
<rectangle round="4" id="my_div_parent" color="#FFCC99" align_items="center" align_content="flex_start" justify_content="center" flex_wrap="wrap" gap="8" padding="16" border="2" border_color="#ffffff">
|
||||
<!-- filled-in at runtime -->
|
||||
</rectangle>
|
||||
<rectangle width="400" round="8" padding="2" align_items="center" border_color="#ffffff">
|
||||
<include src="testbed/icons.xml" />
|
||||
</rectangle>
|
||||
|
||||
<!-- Embed sprites -->
|
||||
<sprite width="64" height="64" src="raster.png" />
|
||||
<sprite width="64" height="64" src="dashboard/wayvr_dashboard.svg" />
|
||||
</rectangle>
|
||||
<!-- 2/3 green rects -->
|
||||
<div width="100%" height="100%" flex_direction="column">
|
||||
<rectangle color="#44aa33" color2="#3344aa" round="4" gradient="radial" height="100%" border="2" border_color="#ffffff">
|
||||
<div margin="16" width="100%" height="100%" align_items="center" justify_content="center" flex_wrap="wrap" align_content="center">
|
||||
<rectangle width="64" height="64" color="#000000" />
|
||||
<rectangle width="64" height="64" color="#002222" />
|
||||
<rectangle width="64" height="64" color="#004444" />
|
||||
<rectangle width="64" height="64" color="#006666" />
|
||||
</div>
|
||||
</rectangle>
|
||||
<rectangle color="#aaff88" color2="#88aaff" round="4" gradient="vertical" height="100%">
|
||||
<div margin="16" width="100%" height="100%" flex_wrap="wrap" gap="16" align_content="flex_start">
|
||||
<rectangle width="64" height="32" color="#ff0000" />
|
||||
<rectangle width="64" height="32" color="#ff0000" border="2" border_color="#000000" />
|
||||
<rectangle width="64" height="32" color="#ff0000" border="4" border_color="#000000" />
|
||||
<rectangle width="64" height="32" color="#ff0000" border="6" border_color="#000000" />
|
||||
<rectangle width="64" height="32" color="#ff0000" border="8" border_color="#000000" />
|
||||
<rectangle width="64" height="64" color="#000000" border="2" round="100%" border_color="#FFFF00" />
|
||||
<rectangle width="64" height="64" color="#000000" border="8" round="100%" border_color="#FFFF00" />
|
||||
<rectangle width="64" height="64" color="#000000" border="16" round="100%" border_color="#FFFF00" />
|
||||
<rectangle width="64" height="64" color="#000000" border="30" round="100%" border_color="#FFFF00" />
|
||||
<rectangle width="64" height="64" color="#000000" border="2" round="50%" border_color="#FFFF00" />
|
||||
<rectangle width="64" height="64" color="#000000" border="8" round="50%" border_color="#FFFF00" />
|
||||
<rectangle width="64" height="64" color="#000000" border="12" round="50%" border_color="#FFFF00" />
|
||||
<rectangle width="64" height="64" color="#000000" border="13" round="50%" border_color="#FFFF00" />
|
||||
<rectangle width="64" height="64" color="#000000" border="14" round="50%" border_color="#FFFF00" />
|
||||
<rectangle width="64" height="64" color="#000000" border="15" round="50%" border_color="#FFFF00" />
|
||||
<rectangle width="64" height="64" color="#000000" border="16.5" round="50%" border_color="#FFFF00" />
|
||||
<rectangle width="64" height="64" color="#000000" border="30" round="50%" border_color="#FFFF00" />
|
||||
<rectangle color="#000000">
|
||||
<rectangle width="200" height="100" color="#ffffff" margin="2" />
|
||||
</rectangle>
|
||||
</div>
|
||||
</rectangle>
|
||||
</div>
|
||||
<!-- 3/3 yellow rect -->
|
||||
<rectangle color="#ffff99" width="100%" height="100%" flex_direction="column" padding="16">
|
||||
<div height="100%" flex_direction="column">
|
||||
<label text="Multi line test #1
This is aligned to the left." align="left" size="20" color="#330000" />
|
||||
<rectangle width="100%" height="1" />
|
||||
</div>
|
||||
<div height="100%" flex_direction="column">
|
||||
<label text="Multi line test #2
This is aligned to the right." align="right" size="20" color="#330000" />
|
||||
<rectangle width="100%" height="1" />
|
||||
</div>
|
||||
<div height="100%" flex_direction="column">
|
||||
<label text="Multi line test #3
This is aligned to the center.
The longer lines are still alinged to the center." align="center" size="20" color="#330000" />
|
||||
<rectangle width="100%" height="1" />
|
||||
</div>
|
||||
<div height="100%" flex_direction="column">
|
||||
<label text="Multi line test #4
This is justified alignment.
The longer lines are the same length as the shorter lines." align="justified" size="20" color="#330000" />
|
||||
<rectangle width="100%" height="1" />
|
||||
</div>
|
||||
</rectangle>
|
||||
</div>
|
||||
</elements>
|
||||
</layout>
|
||||
12
wgui/uidev-vk/assets/gui/testbed/icons.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<layout>
|
||||
<elements>
|
||||
<sprite width="32" height="32" src_ext="/usr/share/icons/nvtop.svg" />
|
||||
<sprite width="64" height="64" src_ext="/usr/share/icons/nvtop.svg" />
|
||||
<sprite width="128" height="128" src_ext="/usr/share/icons/nvtop.svg" />
|
||||
<!-- File not found, will show "Error" in purple -->
|
||||
<sprite width="32" height="32" src_ext="/this/file/does/not/exist.png" />
|
||||
<sprite width="32" height="32" src_ext="/usr/share/icons/hicolor/128x128/apps/blueman.png" />
|
||||
<sprite width="32" height="32" src_ext="/usr/share/icons/hicolor/32x32/apps/blueman.png" />
|
||||
<sprite width="64" height="64" src_ext="/usr/share/icons/hicolor/64x64/apps/blueman.png" />
|
||||
</elements>
|
||||
</layout>
|
||||
8
wgui/uidev-vk/assets/gui/theme.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<layout>
|
||||
<theme>
|
||||
<var key="menu_dark" value="#0A0A0ACC" />
|
||||
<var key="background_dark" value="#0d131acc" />
|
||||
<var key="background_light" value="#244179aa" />
|
||||
<var key="bottom_panel" value="#141e28" />
|
||||
</theme>
|
||||
</layout>
|
||||
BIN
wgui/uidev-vk/assets/raster.png
Normal file
|
After Width: | Height: | Size: 422 B |
0
wgui/uidev-vk/res/watch.xml
Normal file
12
wgui/uidev-vk/src/assets.rs
Normal file
@@ -0,0 +1,12 @@
|
||||
#[derive(rust_embed::Embed)]
|
||||
#[folder = "assets/"]
|
||||
pub struct Asset;
|
||||
|
||||
impl wgui::assets::AssetProvider for Asset {
|
||||
fn load_from_path(&mut self, path: &str) -> anyhow::Result<Vec<u8>> {
|
||||
match Asset::get(path) {
|
||||
Some(data) => Ok(data.data.to_vec()),
|
||||
None => anyhow::bail!("embedded file {} not found", path),
|
||||
}
|
||||
}
|
||||
}
|
||||
332
wgui/uidev-vk/src/main.rs
Normal file
@@ -0,0 +1,332 @@
|
||||
use glam::{Vec2, vec2};
|
||||
use std::sync::Arc;
|
||||
use testbed::Testbed;
|
||||
use timestep::Timestep;
|
||||
use tracing_subscriber::EnvFilter;
|
||||
use tracing_subscriber::filter::LevelFilter;
|
||||
use tracing_subscriber::layer::SubscriberExt;
|
||||
use tracing_subscriber::util::SubscriberInitExt;
|
||||
use vulkan::init_window;
|
||||
use vulkano::{
|
||||
Validated, VulkanError,
|
||||
command_buffer::CommandBufferUsage,
|
||||
format::Format,
|
||||
image::{ImageUsage, view::ImageView},
|
||||
swapchain::{
|
||||
Surface, SurfaceInfo, Swapchain, SwapchainCreateInfo, SwapchainPresentInfo, acquire_next_image,
|
||||
},
|
||||
sync::GpuFuture,
|
||||
};
|
||||
use wgui::{
|
||||
event::{MouseDownEvent, MouseMotionEvent, MouseUpEvent, MouseWheelEvent},
|
||||
gfx::WGfx,
|
||||
renderer_vk::{self},
|
||||
};
|
||||
use winit::{
|
||||
event::{ElementState, Event, MouseScrollDelta, WindowEvent},
|
||||
event_loop::ControlFlow,
|
||||
keyboard::{KeyCode, PhysicalKey},
|
||||
};
|
||||
|
||||
use crate::testbed::{testbed_dashboard::TestbedDashboard, testbed_generic::TestbedGeneric};
|
||||
|
||||
mod assets;
|
||||
mod profiler;
|
||||
mod testbed;
|
||||
mod timestep;
|
||||
mod vulkan;
|
||||
|
||||
fn init_logging() {
|
||||
tracing_subscriber::registry()
|
||||
.with(
|
||||
tracing_subscriber::fmt::layer()
|
||||
.pretty()
|
||||
.with_writer(std::io::stderr),
|
||||
)
|
||||
.with(
|
||||
/* read RUST_LOG env var */
|
||||
EnvFilter::builder()
|
||||
.with_default_directive(LevelFilter::DEBUG.into())
|
||||
.from_env_lossy(),
|
||||
)
|
||||
.init();
|
||||
}
|
||||
|
||||
fn load_testbed() -> anyhow::Result<Box<dyn Testbed>> {
|
||||
let name = std::env::var("TESTBED").unwrap_or_default();
|
||||
Ok(match name.as_str() {
|
||||
"dashboard" => Box::new(TestbedDashboard::new()?),
|
||||
_ => Box::new(TestbedGeneric::new()?),
|
||||
})
|
||||
}
|
||||
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
init_logging();
|
||||
|
||||
let (gfx, event_loop, window, surface) = init_window()?;
|
||||
let inner_size = window.inner_size();
|
||||
let mut swapchain_size = [inner_size.width, inner_size.height];
|
||||
|
||||
let mut swapchain_create_info =
|
||||
swapchain_create_info(&gfx, gfx.surface_format, surface.clone(), swapchain_size);
|
||||
|
||||
let (mut swapchain, mut images) = {
|
||||
let (swapchain, images) = Swapchain::new(
|
||||
gfx.device.clone(),
|
||||
surface.clone(),
|
||||
swapchain_create_info.clone(),
|
||||
)?;
|
||||
|
||||
let image_views = images
|
||||
.into_iter()
|
||||
.map(|image| ImageView::new_default(image).unwrap())
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
(swapchain, image_views)
|
||||
};
|
||||
|
||||
let mut recreate = false;
|
||||
let mut last_draw = std::time::Instant::now();
|
||||
|
||||
let mut scale = window.scale_factor() as f32;
|
||||
|
||||
let mut testbed = load_testbed()?;
|
||||
|
||||
let mut mouse = Vec2::ZERO;
|
||||
|
||||
let mut render_context =
|
||||
renderer_vk::context::Context::new(gfx.clone(), gfx.surface_format, scale)?;
|
||||
|
||||
render_context.update_viewport(swapchain_size, scale)?;
|
||||
println!("new swapchain_size: {swapchain_size:?}");
|
||||
|
||||
let mut profiler = profiler::Profiler::new(100);
|
||||
let mut frame_index: u64 = 0;
|
||||
|
||||
let mut timestep = Timestep::new();
|
||||
timestep.set_tps(60.0);
|
||||
|
||||
#[allow(deprecated)]
|
||||
event_loop.run(move |event, elwt| {
|
||||
elwt.set_control_flow(ControlFlow::Poll);
|
||||
|
||||
match event {
|
||||
Event::WindowEvent {
|
||||
event: WindowEvent::MouseWheel { delta, .. },
|
||||
..
|
||||
} => match delta {
|
||||
MouseScrollDelta::LineDelta(x, y) => testbed
|
||||
.layout()
|
||||
.push_event(&wgui::event::Event::MouseWheel(MouseWheelEvent {
|
||||
shift: Vec2::new(x, y),
|
||||
pos: mouse / scale,
|
||||
}))
|
||||
.unwrap(),
|
||||
MouseScrollDelta::PixelDelta(pos) => testbed
|
||||
.layout()
|
||||
.push_event(&wgui::event::Event::MouseWheel(MouseWheelEvent {
|
||||
shift: Vec2::new(pos.x as f32 / 5.0, pos.y as f32 / 5.0),
|
||||
pos: mouse / scale,
|
||||
}))
|
||||
.unwrap(),
|
||||
},
|
||||
Event::WindowEvent {
|
||||
event: WindowEvent::MouseInput { state, button, .. },
|
||||
..
|
||||
} => {
|
||||
if matches!(button, winit::event::MouseButton::Left) {
|
||||
if matches!(state, winit::event::ElementState::Pressed) {
|
||||
testbed
|
||||
.layout()
|
||||
.push_event(&wgui::event::Event::MouseDown(MouseDownEvent {
|
||||
pos: mouse / scale,
|
||||
}))
|
||||
.unwrap();
|
||||
} else {
|
||||
testbed
|
||||
.layout()
|
||||
.push_event(&wgui::event::Event::MouseUp(MouseUpEvent {
|
||||
pos: mouse / scale,
|
||||
}))
|
||||
.unwrap();
|
||||
}
|
||||
}
|
||||
}
|
||||
Event::WindowEvent {
|
||||
event: WindowEvent::CursorMoved { position, .. },
|
||||
..
|
||||
} => {
|
||||
mouse = vec2(position.x as _, position.y as _);
|
||||
testbed
|
||||
.layout()
|
||||
.push_event(&wgui::event::Event::MouseMotion(MouseMotionEvent {
|
||||
pos: mouse / scale,
|
||||
}))
|
||||
.unwrap();
|
||||
}
|
||||
Event::WindowEvent {
|
||||
event: WindowEvent::KeyboardInput { event, .. },
|
||||
..
|
||||
} => {
|
||||
if event.state == ElementState::Pressed {
|
||||
if event.physical_key == PhysicalKey::Code(KeyCode::Equal) {
|
||||
scale *= 1.25;
|
||||
render_context
|
||||
.update_viewport(swapchain_size, scale)
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
if event.physical_key == PhysicalKey::Code(KeyCode::Minus) {
|
||||
scale *= 0.75;
|
||||
render_context
|
||||
.update_viewport(swapchain_size, scale)
|
||||
.unwrap();
|
||||
}
|
||||
}
|
||||
}
|
||||
Event::WindowEvent {
|
||||
event: WindowEvent::CloseRequested,
|
||||
..
|
||||
} => {
|
||||
elwt.exit();
|
||||
}
|
||||
Event::WindowEvent {
|
||||
event: WindowEvent::Resized(_),
|
||||
..
|
||||
} => {
|
||||
recreate = true;
|
||||
}
|
||||
Event::WindowEvent {
|
||||
event: WindowEvent::RedrawRequested,
|
||||
..
|
||||
} => {
|
||||
if recreate {
|
||||
let inner_size = window.inner_size();
|
||||
swapchain_size = [inner_size.width, inner_size.height];
|
||||
|
||||
swapchain_create_info.image_extent = swapchain_size;
|
||||
|
||||
(swapchain, images) = {
|
||||
let (swapchain, images) = swapchain.recreate(swapchain_create_info.clone()).unwrap();
|
||||
|
||||
let image_views = images
|
||||
.into_iter()
|
||||
.map(|image| ImageView::new_default(image).unwrap())
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
(swapchain, image_views)
|
||||
};
|
||||
|
||||
render_context
|
||||
.update_viewport(swapchain_size, scale)
|
||||
.unwrap();
|
||||
|
||||
println!("new swapchain_size: {swapchain_size:?}");
|
||||
recreate = false;
|
||||
window.request_redraw();
|
||||
}
|
||||
|
||||
while timestep.on_tick() {
|
||||
testbed.layout().tick().unwrap();
|
||||
}
|
||||
|
||||
testbed
|
||||
.update(
|
||||
(swapchain_size[0] as f32 / scale) as _,
|
||||
(swapchain_size[1] as f32 / scale) as _,
|
||||
timestep.alpha,
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
if !render_context.dirty && !testbed.layout().check_toggle_needs_redraw() {
|
||||
// no need to redraw
|
||||
std::thread::sleep(std::time::Duration::from_millis(5)); // dirty fix to prevent cpu burning precious cycles doing a busy loop
|
||||
return;
|
||||
}
|
||||
|
||||
log::trace!("drawing frame {}", frame_index);
|
||||
frame_index += 1;
|
||||
|
||||
profiler.start();
|
||||
|
||||
{
|
||||
let (image_index, _, acquire_future) =
|
||||
match acquire_next_image(swapchain.clone(), None).map_err(Validated::unwrap) {
|
||||
Ok(r) => r,
|
||||
Err(VulkanError::OutOfDate) => {
|
||||
recreate = true;
|
||||
return;
|
||||
}
|
||||
Err(e) => panic!("failed to acquire next image: {e}"),
|
||||
};
|
||||
|
||||
let tgt = images[image_index as usize].clone();
|
||||
|
||||
last_draw = std::time::Instant::now();
|
||||
|
||||
let mut cmd_buf = gfx
|
||||
.create_gfx_command_buffer(CommandBufferUsage::OneTimeSubmit)
|
||||
.unwrap();
|
||||
cmd_buf.begin_rendering(tgt).unwrap();
|
||||
|
||||
let primitives = wgui::drawing::draw(testbed.layout()).unwrap();
|
||||
render_context
|
||||
.draw(&gfx, &mut cmd_buf, &primitives)
|
||||
.unwrap();
|
||||
|
||||
cmd_buf.end_rendering().unwrap();
|
||||
|
||||
let cmd_buf = cmd_buf.build().unwrap();
|
||||
|
||||
acquire_future
|
||||
.then_execute(gfx.queue_gfx.clone(), cmd_buf)
|
||||
.unwrap()
|
||||
.then_swapchain_present(
|
||||
gfx.queue_gfx.clone(),
|
||||
SwapchainPresentInfo::swapchain_image_index(swapchain.clone(), image_index),
|
||||
)
|
||||
.then_signal_fence_and_flush()
|
||||
.unwrap()
|
||||
.wait(None)
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
profiler.end();
|
||||
}
|
||||
Event::AboutToWait => {
|
||||
if last_draw.elapsed().as_millis() > 16 {
|
||||
window.request_redraw();
|
||||
}
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
})?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn swapchain_create_info(
|
||||
graphics: &WGfx,
|
||||
format: Format,
|
||||
surface: Arc<Surface>,
|
||||
extent: [u32; 2],
|
||||
) -> SwapchainCreateInfo {
|
||||
let surface_capabilities = graphics
|
||||
.device
|
||||
.physical_device()
|
||||
.surface_capabilities(&surface, SurfaceInfo::default())
|
||||
.unwrap(); // want panic
|
||||
|
||||
SwapchainCreateInfo {
|
||||
min_image_count: surface_capabilities.min_image_count.max(2),
|
||||
image_format: format,
|
||||
image_extent: extent,
|
||||
image_usage: ImageUsage::COLOR_ATTACHMENT,
|
||||
composite_alpha: surface_capabilities
|
||||
.supported_composite_alpha
|
||||
.into_iter()
|
||||
.next()
|
||||
.unwrap(), // want panic
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
49
wgui/uidev-vk/src/profiler.rs
Normal file
@@ -0,0 +1,49 @@
|
||||
use std::{sync::LazyLock, time::Instant};
|
||||
|
||||
static TIME_START: LazyLock<Instant> = LazyLock::new(Instant::now);
|
||||
|
||||
pub fn get_micros() -> u64 {
|
||||
TIME_START.elapsed().as_micros() as u64
|
||||
}
|
||||
|
||||
pub struct Profiler {
|
||||
interval_us: u64,
|
||||
last_measure_us: u64,
|
||||
frametime_sum_us: u64,
|
||||
measure_frames: u64,
|
||||
time_start_us: u64,
|
||||
}
|
||||
|
||||
impl Profiler {
|
||||
pub fn new(interval_ms: u64) -> Self {
|
||||
Self {
|
||||
frametime_sum_us: 0,
|
||||
interval_us: interval_ms * 1000,
|
||||
last_measure_us: 0,
|
||||
measure_frames: 0,
|
||||
time_start_us: 0,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn start(&mut self) {
|
||||
self.time_start_us = get_micros();
|
||||
}
|
||||
|
||||
pub fn end(&mut self) {
|
||||
let cur_micros = get_micros();
|
||||
|
||||
let frametime = cur_micros - self.time_start_us;
|
||||
self.measure_frames += 1;
|
||||
self.frametime_sum_us += frametime;
|
||||
|
||||
if self.last_measure_us + self.interval_us < cur_micros {
|
||||
log::debug!(
|
||||
"avg frametime: {:.3}ms",
|
||||
(self.frametime_sum_us / self.measure_frames) as f32 / 1000.0
|
||||
);
|
||||
self.last_measure_us = cur_micros;
|
||||
self.frametime_sum_us = 0;
|
||||
self.measure_frames = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
9
wgui/uidev-vk/src/testbed/mod.rs
Normal file
@@ -0,0 +1,9 @@
|
||||
use wgui::layout::Layout;
|
||||
|
||||
pub mod testbed_dashboard;
|
||||
pub mod testbed_generic;
|
||||
|
||||
pub trait Testbed {
|
||||
fn update(&mut self, width: f32, height: f32, timestep_alpha: f32) -> anyhow::Result<()>;
|
||||
fn layout(&mut self) -> &mut Layout;
|
||||
}
|
||||
34
wgui/uidev-vk/src/testbed/testbed_dashboard.rs
Normal file
@@ -0,0 +1,34 @@
|
||||
use crate::{assets, testbed::Testbed};
|
||||
use glam::Vec2;
|
||||
use wgui::layout::Layout;
|
||||
|
||||
pub struct TestbedDashboard {
|
||||
pub layout: Layout,
|
||||
}
|
||||
|
||||
impl TestbedDashboard {
|
||||
pub fn new() -> anyhow::Result<Self> {
|
||||
const XML_PATH: &str = "gui/dashboard.xml";
|
||||
|
||||
let mut layout = Layout::new(Box::new(assets::Asset {}))?;
|
||||
|
||||
let parent = layout.root_widget;
|
||||
|
||||
let _res = wgui::parser::parse_from_assets(&mut layout, parent, XML_PATH)?;
|
||||
|
||||
Ok(Self { layout })
|
||||
}
|
||||
}
|
||||
|
||||
impl Testbed for TestbedDashboard {
|
||||
fn update(&mut self, width: f32, height: f32, timestep_alpha: f32) -> anyhow::Result<()> {
|
||||
self
|
||||
.layout
|
||||
.update(Vec2::new(width, height), timestep_alpha)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn layout(&mut self) -> &mut Layout {
|
||||
&mut self.layout
|
||||
}
|
||||
}
|
||||
104
wgui/uidev-vk/src/testbed/testbed_generic.rs
Normal file
@@ -0,0 +1,104 @@
|
||||
use std::{cell::RefCell, rc::Rc};
|
||||
|
||||
use glam::{Mat4, Vec2};
|
||||
use wgui::{
|
||||
drawing::{self},
|
||||
event::EventListener,
|
||||
layout::{Layout, WidgetID},
|
||||
renderer_vk::text::TextStyle,
|
||||
};
|
||||
|
||||
use crate::{assets, testbed::Testbed};
|
||||
|
||||
pub struct TestbedGeneric {
|
||||
pub layout: Layout,
|
||||
rot: f32,
|
||||
widget_id: Rc<RefCell<Option<WidgetID>>>,
|
||||
}
|
||||
|
||||
impl TestbedGeneric {
|
||||
pub fn new() -> anyhow::Result<Self> {
|
||||
const XML_PATH: &str = "gui/testbed.xml";
|
||||
|
||||
let mut layout = Layout::new(Box::new(assets::Asset {}))?;
|
||||
|
||||
layout.assets.load_from_path(XML_PATH)?;
|
||||
|
||||
let parent = layout.root_widget;
|
||||
|
||||
let res = wgui::parser::parse_from_assets(&mut layout, parent, XML_PATH)?;
|
||||
|
||||
use wgui::components::button;
|
||||
let my_div_parent = res.require_by_id("my_div_parent")?;
|
||||
// create some buttons for testing
|
||||
for i in 0..4 {
|
||||
let n = i as f32 / 4.0;
|
||||
button::construct(
|
||||
&mut layout,
|
||||
my_div_parent,
|
||||
button::Params {
|
||||
text: "I'm a button!",
|
||||
color: drawing::Color::new(1.0 - n, n * n, n, 1.0),
|
||||
..Default::default()
|
||||
},
|
||||
)?;
|
||||
}
|
||||
|
||||
let button = button::construct(
|
||||
&mut layout,
|
||||
my_div_parent,
|
||||
button::Params {
|
||||
text: "Click me!!",
|
||||
color: drawing::Color::new(0.2, 0.2, 0.2, 1.0),
|
||||
size: Vec2::new(256.0, 64.0),
|
||||
text_style: TextStyle {
|
||||
size: Some(30.0),
|
||||
..Default::default()
|
||||
},
|
||||
},
|
||||
)?;
|
||||
|
||||
let widget_id = Rc::new(RefCell::new(None));
|
||||
|
||||
let wid = widget_id.clone();
|
||||
layout.add_event_listener(
|
||||
button.body,
|
||||
EventListener::MouseClick(Box::new(move |data| {
|
||||
button.set_text(data, "Congratulations!");
|
||||
*wid.borrow_mut() = Some(data.widget_id);
|
||||
})),
|
||||
);
|
||||
|
||||
Ok(Self {
|
||||
layout,
|
||||
rot: 0.0,
|
||||
widget_id,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl Testbed for TestbedGeneric {
|
||||
fn update(&mut self, width: f32, height: f32, timestep_alpha: f32) -> anyhow::Result<()> {
|
||||
if let Some(widget_id) = *self.widget_id.borrow() {
|
||||
self.rot += 0.01;
|
||||
|
||||
let a = self.layout.widget_states.get(widget_id).unwrap();
|
||||
let mut widget = a.lock().unwrap();
|
||||
widget.data.transform = Mat4::IDENTITY
|
||||
* Mat4::from_rotation_y(-self.rot)
|
||||
* Mat4::from_rotation_x(self.rot * 0.25)
|
||||
* Mat4::from_rotation_z(-self.rot * 0.1);
|
||||
|
||||
self.layout.needs_redraw = true;
|
||||
}
|
||||
|
||||
self
|
||||
.layout
|
||||
.update(Vec2::new(width, height), timestep_alpha)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn layout(&mut self) -> &mut Layout {
|
||||
&mut self.layout
|
||||
}
|
||||
}
|
||||
70
wgui/uidev-vk/src/timestep.rs
Normal file
@@ -0,0 +1,70 @@
|
||||
use std::{sync::LazyLock, time::Instant};
|
||||
static TIME_START: LazyLock<Instant> = LazyLock::new(Instant::now);
|
||||
|
||||
pub fn get_micros() -> u64 {
|
||||
TIME_START.elapsed().as_micros() as u64
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct Timestep {
|
||||
current_time_us: u64,
|
||||
accumulator: f32,
|
||||
time_micros: u64,
|
||||
ticks: u32,
|
||||
speed: f32,
|
||||
pub alpha: f32,
|
||||
delta: f32,
|
||||
loopnum: u8,
|
||||
}
|
||||
|
||||
impl Timestep {
|
||||
pub fn new() -> Timestep {
|
||||
let mut timestep = Timestep {
|
||||
speed: 1.0,
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
timestep.reset();
|
||||
timestep
|
||||
}
|
||||
|
||||
fn calculate_alpha(&mut self) {
|
||||
self.alpha = (self.accumulator / self.delta).clamp(0.0, 1.0);
|
||||
}
|
||||
|
||||
pub fn set_tps(&mut self, tps: f32) {
|
||||
self.delta = 1000.0 / tps;
|
||||
}
|
||||
|
||||
pub fn reset(&mut self) {
|
||||
self.current_time_us = get_micros();
|
||||
self.accumulator = 0.0;
|
||||
}
|
||||
|
||||
pub fn on_tick(&mut self) -> bool {
|
||||
let newtime = get_micros();
|
||||
let frametime = newtime - self.current_time_us;
|
||||
self.time_micros += frametime;
|
||||
self.current_time_us = newtime;
|
||||
self.accumulator += frametime as f32 * self.speed / 1000.0;
|
||||
self.calculate_alpha();
|
||||
|
||||
if self.accumulator >= self.delta {
|
||||
self.accumulator -= self.delta;
|
||||
self.loopnum += 1;
|
||||
self.ticks += 1;
|
||||
|
||||
if self.loopnum > 5 {
|
||||
// cannot keep up!
|
||||
self.loopnum = 0;
|
||||
self.accumulator = 0.0;
|
||||
return false;
|
||||
}
|
||||
|
||||
true
|
||||
} else {
|
||||
self.loopnum = 0;
|
||||
false
|
||||
}
|
||||
}
|
||||
}
|
||||
211
wgui/uidev-vk/src/vulkan.rs
Normal file
@@ -0,0 +1,211 @@
|
||||
use std::sync::{Arc, OnceLock};
|
||||
use vulkano::{
|
||||
device::{
|
||||
Device, DeviceCreateInfo, DeviceExtensions, DeviceFeatures, Queue, QueueCreateInfo, QueueFlags,
|
||||
physical::{PhysicalDevice, PhysicalDeviceType},
|
||||
},
|
||||
instance::{Instance, InstanceCreateInfo},
|
||||
swapchain::SurfaceInfo,
|
||||
};
|
||||
use wgui::gfx::WGfx;
|
||||
|
||||
static VULKAN_LIBRARY: OnceLock<Arc<vulkano::VulkanLibrary>> = OnceLock::new();
|
||||
fn get_vulkan_library() -> &'static Arc<vulkano::VulkanLibrary> {
|
||||
VULKAN_LIBRARY.get_or_init(|| vulkano::VulkanLibrary::new().unwrap()) // want panic
|
||||
}
|
||||
|
||||
#[allow(clippy::type_complexity)]
|
||||
pub fn init_window() -> anyhow::Result<(
|
||||
Arc<WGfx>,
|
||||
winit::event_loop::EventLoop<()>,
|
||||
Arc<winit::window::Window>,
|
||||
Arc<vulkano::swapchain::Surface>,
|
||||
)> {
|
||||
use vulkano::{instance::InstanceCreateFlags, swapchain::Surface};
|
||||
use winit::{event_loop::EventLoop, window::Window};
|
||||
|
||||
let event_loop = EventLoop::new().unwrap(); // want panic
|
||||
let mut vk_instance_extensions = Surface::required_extensions(&event_loop).unwrap();
|
||||
vk_instance_extensions.khr_get_physical_device_properties2 = true;
|
||||
log::debug!("Instance exts for runtime: {:?}", &vk_instance_extensions);
|
||||
|
||||
let instance = Instance::new(
|
||||
get_vulkan_library().clone(),
|
||||
InstanceCreateInfo {
|
||||
flags: InstanceCreateFlags::ENUMERATE_PORTABILITY,
|
||||
enabled_extensions: vk_instance_extensions,
|
||||
..Default::default()
|
||||
},
|
||||
)?;
|
||||
|
||||
#[allow(deprecated)]
|
||||
let window = Arc::new(
|
||||
event_loop
|
||||
.create_window(Window::default_attributes())
|
||||
.unwrap(), // want panic
|
||||
);
|
||||
let surface = Surface::from_window(instance.clone(), window.clone())?;
|
||||
|
||||
let mut device_extensions = DeviceExtensions::empty();
|
||||
device_extensions.khr_swapchain = true;
|
||||
|
||||
log::debug!("Device exts for app: {:?}", &device_extensions);
|
||||
|
||||
let (physical_device, mut my_extensions, queue_families) = instance
|
||||
.enumerate_physical_devices()?
|
||||
.filter_map(|p| {
|
||||
if p.supported_extensions().contains(&device_extensions) {
|
||||
Some((p, device_extensions))
|
||||
} else {
|
||||
log::debug!(
|
||||
"Not using {} because it does not implement the following device extensions:",
|
||||
p.properties().device_name,
|
||||
);
|
||||
for (ext, missing) in p.supported_extensions().difference(&device_extensions) {
|
||||
if missing {
|
||||
log::debug!(" {ext}");
|
||||
}
|
||||
}
|
||||
None
|
||||
}
|
||||
})
|
||||
.filter_map(|(p, my_extensions)| {
|
||||
try_all_queue_families(p.as_ref()).map(|families| (p, my_extensions, families))
|
||||
})
|
||||
.min_by_key(|(p, _, _)| prio_from_device_type(p))
|
||||
.expect("no suitable physical device found");
|
||||
|
||||
log::info!(
|
||||
"Using vkPhysicalDevice: {}",
|
||||
physical_device.properties().device_name,
|
||||
);
|
||||
|
||||
if physical_device.supported_extensions().img_filter_cubic {
|
||||
my_extensions.img_filter_cubic = true;
|
||||
log::info!("img_filter_cubic!");
|
||||
}
|
||||
|
||||
let surface_format = physical_device
|
||||
.surface_formats(&surface, SurfaceInfo::default())
|
||||
.unwrap()[0] // want panic
|
||||
.0;
|
||||
log::info!("Using surface format: {surface_format:?}");
|
||||
|
||||
let (device, queues) = Device::new(
|
||||
physical_device,
|
||||
DeviceCreateInfo {
|
||||
enabled_extensions: my_extensions,
|
||||
enabled_features: DeviceFeatures {
|
||||
dynamic_rendering: true,
|
||||
..DeviceFeatures::empty()
|
||||
},
|
||||
queue_create_infos: queue_families
|
||||
.iter()
|
||||
.map(|fam| QueueCreateInfo {
|
||||
queue_family_index: fam.queue_family_index,
|
||||
queues: fam.priorities.clone(),
|
||||
..Default::default()
|
||||
})
|
||||
.collect::<Vec<_>>(),
|
||||
..Default::default()
|
||||
},
|
||||
)?;
|
||||
|
||||
let (queue_gfx, queue_xfer, _) = unwrap_queues(queues.collect());
|
||||
|
||||
let me = WGfx::new_from_raw(instance, device, queue_gfx, queue_xfer, surface_format);
|
||||
Ok((me, event_loop, window, surface))
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
struct QueueFamilyLayout {
|
||||
queue_family_index: u32,
|
||||
priorities: Vec<f32>,
|
||||
}
|
||||
|
||||
fn prio_from_device_type(physical_device: &PhysicalDevice) -> u32 {
|
||||
match physical_device.properties().device_type {
|
||||
PhysicalDeviceType::DiscreteGpu => 0,
|
||||
PhysicalDeviceType::IntegratedGpu => 1,
|
||||
PhysicalDeviceType::VirtualGpu => 2,
|
||||
PhysicalDeviceType::Cpu => 3,
|
||||
_ => 4,
|
||||
}
|
||||
}
|
||||
|
||||
fn unwrap_queues(queues: Vec<Arc<Queue>>) -> (Arc<Queue>, Arc<Queue>, Option<Arc<Queue>>) {
|
||||
match queues[..] {
|
||||
[ref g, ref t, ref c] => (g.clone(), t.clone(), Some(c.clone())),
|
||||
[ref gt, ref c] => (gt.clone(), gt.clone(), Some(c.clone())),
|
||||
[ref gt] => (gt.clone(), gt.clone(), None),
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
||||
fn try_all_queue_families(physical_device: &PhysicalDevice) -> Option<Vec<QueueFamilyLayout>> {
|
||||
queue_families_priorities(
|
||||
physical_device,
|
||||
vec![
|
||||
// main-thread graphics + uploads
|
||||
QueueFlags::GRAPHICS | QueueFlags::TRANSFER,
|
||||
// capture-thread uploads
|
||||
QueueFlags::TRANSFER,
|
||||
],
|
||||
)
|
||||
.or_else(|| {
|
||||
queue_families_priorities(
|
||||
physical_device,
|
||||
vec![
|
||||
// main thread graphics
|
||||
QueueFlags::GRAPHICS,
|
||||
// main thread uploads
|
||||
QueueFlags::TRANSFER,
|
||||
// capture thread uploads
|
||||
QueueFlags::TRANSFER,
|
||||
],
|
||||
)
|
||||
})
|
||||
.or_else(|| {
|
||||
queue_families_priorities(
|
||||
physical_device,
|
||||
// main thread-only. software capture not supported.
|
||||
vec![QueueFlags::GRAPHICS | QueueFlags::TRANSFER],
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn queue_families_priorities(
|
||||
physical_device: &PhysicalDevice,
|
||||
mut requested_queues: Vec<QueueFlags>,
|
||||
) -> Option<Vec<QueueFamilyLayout>> {
|
||||
let mut result = Vec::with_capacity(3);
|
||||
|
||||
for (idx, props) in physical_device.queue_family_properties().iter().enumerate() {
|
||||
let mut remaining = props.queue_count;
|
||||
let mut want = 0usize;
|
||||
|
||||
requested_queues.retain(|requested| {
|
||||
if props.queue_flags.intersects(*requested) && remaining > 0 {
|
||||
remaining -= 1;
|
||||
want += 1;
|
||||
false
|
||||
} else {
|
||||
true
|
||||
}
|
||||
});
|
||||
|
||||
if want > 0 {
|
||||
result.push(QueueFamilyLayout {
|
||||
queue_family_index: idx as u32,
|
||||
priorities: std::iter::repeat_n(1.0, want).collect(),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if requested_queues.is_empty() {
|
||||
log::debug!("Selected GPU queue families: {result:?}");
|
||||
Some(result)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||