Commit graph

17 commits

Author SHA1 Message Date
Bill Currie
bf05da26cc [ui] Make Canvas_SetLen operate on only one canvas
I plan on using sub-canvases to fix the imui window overlap issue and
don't want the windows being affected by (eg) hud canvas size changes.
2023-07-08 20:56:40 +09:00
Bill Currie
9ff38418d3 [client] Move cshift into client screen canvas
This fixes cshifts affecting the console and debug canvases. The
crosshair and center print have also been moved for the same reason.
2023-07-08 14:32:02 +09:00
Bill Currie
3138c7ae3b [client] Clean up screen view creation 2023-07-08 14:04:29 +09:00
Bill Currie
ecb9a15946 [model] Clean up the brush leaf api a little
Those functions now all take mod_brush_t since they don't work with any
other type of model.
2023-06-28 21:45:41 +09:00
Bill Currie
a561558748 [console] Switch to using a canvas for the console
While the console background is broken in that alpha doesn't work, it's
now rendered correctly in all renderers.
2023-01-22 03:45:50 +09:00
Bill Currie
3c8f02c655 [client] Switch to using canvases for screen and hud
Canvases provide layered rendering as for each canvas all components are
rendered in turn.
2023-01-21 03:43:18 +09:00
Bill Currie
31c1420682 [client] Further decouple screen and console
The wording might seem a little odd, but cl_screen is really the full 2D
client HUD while the console is completely independent of the client and
shouldn't know that the client even exists. Ideally, the resize events
would be handled by the canvas system, to which end this is a small
step.
2023-01-16 13:29:20 +09:00
Bill Currie
41d25df0d2 [ui] Attach text views to passage entities
Instead of creating new entities for the text views. This approximately
halves the number of entities required to display flowed text, but also
tests the ability to have an entity in multiple hierarchies (the goal of
the ECS component and system changes).
2022-12-14 22:38:37 +09:00
Bill Currie
bb677a1a7c [ecs] Move href_comp into hierarchy_t
This means that the component id used for hierarchy references must be
passed to Hierarchy_New and Hierarchy_Copy, but does all an entity to
have more than one hierarchy, which is useful for canvases (hierarchies
of views) in the 3d world (the canvas root would have a 3d hierarchy
reference and a 2d (view) hierarchy reference).
2022-12-12 00:20:20 +09:00
Bill Currie
7a64bb1149 [client] Use realtime for net icon check
viewstate's time is from cl.time which is not what's used to set
last_servermessage (that uses realtime). After careful investigation, I
found that cl.time is not at all suitable and that the original id code
used realtime (I think it was just me being lazy when I merged the
code). Fixes the stuck net icon.
2022-12-01 17:52:40 +09:00
Bill Currie
9ba2d26542 [client] Move sbar.h into client
Where it belongs :P
2022-12-01 15:00:09 +09:00
Bill Currie
9f6c367fce [console] Resurrect console scaling
Currently only for gl/glsl/vulkan. However, rather than futzing with
con_width and con_height (and trying to guess good values), con_scale
(currently an integer) gives consistent pixel scaling regardless of
window size.
2022-11-14 09:49:13 +09:00
Bill Currie
0d9b475759 [client] Implement finale overlay and death-solo
Deathmatch overlay isn't working properly for end of level or death in
qw.
2022-11-12 01:47:17 +09:00
Bill Currie
c6b79d49a4 [client] Fix incorrect function component setup
Need to pass the address of the pointer :/
2022-11-10 21:23:04 +09:00
Bill Currie
73e62de2fb [client] Clean up sbar's globals access
I had forgotten that the cl structs in nq and qw were different layouts,
which resulted in qw's sbar/hud being quite broken. Rather than messing
with the structs, I decided it would be far better in the long run to
clean up sbar's access to the cl struct and the few other nq/qw specific
globals it used. There are still plenty of bugs to fix, but now almost
everything is in the one place.
2022-11-09 19:38:54 +09:00
Bill Currie
bdbb8f1e0b [nq] Get intermission view working again
This is currently just the basic intermission view (not the finale view
or the deathmatch intermission view).
2022-11-03 17:49:05 +09:00
Bill Currie
4491ce213b [client] Merge cl_screen.c
The client state that was accessed by cl_screen is now put in viewstate
and maintained by the client before calling CL_UpdateScreen.
2022-11-02 15:11:09 +09:00
Renamed from nq/source/cl_screen.c (Browse further)