Commit graph

49 commits

Author SHA1 Message Date
alexei-zebra
c269d6efb3
Give the Wayland window an Adwaita-like frame
The engine-drawn title bar grew to 48 px with 24x24 window controls,
12 px away from the edge and from each other, all sharing one hover
highlight. The controls use textures now (gui/cross, gui/minimize_w,
gui/maximize_w and gui/restore_w when maximized) with the vector icons
kept as a fallback, and the title is centred in the bar, clamped to the
free space between the button groups.

The bar now sits inside invisible margins that carry a drop shadow, so
the window is resizable from outside the visible frame: the surface is
content plus twice SHADOW_MARGIN and xdg_surface.set_window_geometry
tells the compositor which part is the window. The shadow follows
Adwaita's window shadow: a Gaussian blur of 7 px (sigma 3.5) expanded by
1 px, rgba(0,0,0,0.5) focused and 0.3 in the backdrop, plus a 1 px
hairline, symmetric on all four sides - a 16 px wide frame would show a
fatter tail than the reference. Margins exist only while the window is
decorated by us and not maximized or fullscreen.

The engine composes the frame itself: it renders exactly as before, then
the backend copies the frame into a texture, clears the surface, draws
the shadow and puts the content in place with alpha forced to 1, which
keeps the frame opaque without touching a single render pass. Only
frames the engine actually drew are cached, and the EGL window is
resized before its surface size is asked for, so no frame is composed
from a buffer the compositor just replaced - that was the one frame
blink after a resize.

Resize cursors match GNOME: directional shapes for edges and corners
(w/e/n/s/ne/nw/se/sw) instead of the double-headed diagonals, with the
extra CursorShape values appended so the existing GLFW indices stay.

Measured: window 1123x751 opens as saved, fullscreen round trip returns
the same size with the settings untouched, the shadow alpha profile is
0.20/0.10/0.03 at 1/4/7 px from the edge against Adwaita's 0.21/0.095/
0.055, all four sides equal, menu layout baseline unchanged (706),
no errors in the log.
2026-10-10 12:23:41 +03:00
MihailRis
ddd4f4f24f add common blank texture file 2025-12-28 18:27:24 +03:00
Xertis
1f0b6f0d9d Qol settings.controls update 2025-08-04 20:50:27 +03:00
MihailRis
1b84b7df5e fix sun and shadows position synchronization 2025-06-15 03:35:40 +03:00
MihailRis
4761c520d5 feat: component script reloading 2025-03-16 22:03:37 +03:00
MihailRis
6fb14ee0a4 feat: reloading hud scripts 2025-03-15 21:12:19 +03:00
MihailRis
f9998f0a93 feat: world script reloading 2025-03-14 17:07:10 +03:00
MihailRis
bcbfdd50c7 feat: running files with and block/item script reload 2025-03-13 22:08:22 +03:00
MihailRis
b66937c61d feat: scripts classification 2025-03-13 00:28:40 +03:00
MihailRis
fb18442322 update console layout 2025-03-12 18:00:28 +03:00
MihailRis
3d60777a12 feat: save edited files 2025-03-12 17:08:50 +03:00
MihailRis
e70746ae43 update console layout 2025-03-11 03:48:27 +03:00
MihailRis
bf5a5b243f Merge branch 'main' into precipitation 2025-03-09 23:13:04 +03:00
MihailRis
589518fb25 add fall.max_opacity, fall.opaque properties & update snow texture & weather mix test 2025-02-26 06:24:05 +03:00
MihailRis
d36eb85dba snow test 2025-02-26 02:24:16 +03:00
MihailRis
fa6e2e1b1d fix vertical uv mapping 2025-02-26 02:24:16 +03:00
MihailRis
b4456fdb51 add PrecipitationRenderer (WIP) 2025-02-26 02:24:16 +03:00
Xertis
a5aaddb379 add suggestive signs 2025-01-03 18:07:01 +03:00
Xertis
a1a4fc97fc add icons 2025-01-02 23:31:15 +03:00
Xertis
2018b2f8a4 add content_config 2024-11-28 22:26:48 +03:00
MihailRis
a47b650591 add core:struct_air 2024-10-04 01:53:17 +03:00
MihailRis
788ad1f6a6 add core:obstacle block & move cameras from base to core & add new generator 2024-09-25 15:45:45 +03:00
MihailRis
b021339a8a add window icon 2024-07-28 23:47:49 +03:00
MihailRis
5915b811f2 new content menu (WIP) 2024-05-02 04:07:07 +03:00
MihailRis
b1a79e3a6e block.material + minor refactor 2024-04-25 05:12:45 +03:00
MihailRis
6e2bc9ca95 world previews demo 2024-04-23 01:09:30 +03:00
MihailRis
3862dbda66 contentpack remove feature WIP 2024-02-29 23:47:07 +03:00
MihailRis
ef81a024c9 new crosshair + minor refactor 2024-02-14 04:38:34 +03:00
MihailRis
939f1a7d75 added error and warning icons 2024-02-05 05:02:22 +03:00
MihailRis
acacb88c66 no_icon.png size reduced 2024-01-27 00:37:11 +03:00
MihailRis
c57b2d0de3 Content menu, content-pack dependencies 2024-01-27 00:36:18 +03:00
MihailRis
a4a5aef422 skybox: added moon and stars 2024-01-26 02:49:42 +03:00
A-lex-Ra
42f3271f54 upd delete_icon.png 2024-01-19 20:33:35 +06:00
MihailRis
9119caca65 Delete world feature 2024-01-18 04:06:27 +03:00
MihailRis
396ee31bcc content-pack resources support 2023-12-14 02:30:39 +03:00
A-lex-Ra
dc5728a0c6 more colors! 2023-12-13 21:39:48 +06:00
A-lex-Ra
ae10ca248d fix pipe rotation + test blocks 2023-12-13 21:33:55 +06:00
MihailRis
d75d75eeb8 Rust texture update 2023-12-09 22:32:29 +03:00
MihailRis
9e04a723a9 Added lightbulb block 2023-12-09 21:52:27 +03:00
MihailRis
f513c094a9 Worlds indexing 2023-12-08 21:00:15 +03:00
MihailRis
e3f7f7218f AABB blocks render fix + new test block: pipe 2023-12-07 01:34:54 +03:00
MihailRis
c8a283c645 Base content package + ContentLoader 2023-12-01 16:26:42 +03:00
MihailRis
0c35eeb072 aabb block shape WIP + common refactor 2023-11-30 14:48:38 +03:00
MihailRis
275e4af9fd World structure update + new blocks 2023-11-24 02:20:13 +03:00
MihailRis
eb18269416 notfound texture 2023-11-22 15:18:11 +03:00
MihailRis
fb8d220cca Blocks atlas is auto-assembling now 2023-11-22 01:53:48 +03:00
MihailRis
3b03464d27 Introduced Content, ContentIndices, no more integer ids hardcoded, common refactor 2023-11-21 11:38:59 +03:00
MihailRis
ea729760d4 stone block texture brightness increased 2023-11-19 19:46:14 +03:00
Che10vek
2ee9e33c6d resources paths refact 2023-11-20 01:30:57 +10:00