You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ultra wide screen restriction code refactoring and improvements:
1. Refactored ultra-wide screen mouse restriction code: Moved the main detection logic to asw_hud_master::OnThink() and reduced cpu load. Moved drawing code to asw_hud_master::Paint().
2. Add two new CVARs:
2.1 rd_draw_restricted_rectangles_coop (FCVAR_ARCHIVE | FCVAR_REPLICATED | FCVAR_NOTIFY)
2.2 rd_draw_restricted_rectangles_dm (FCVAR_ARCHIVE | FCVAR_REPLICATED | FCVAR_CHEAT | FCVAR_NOTIFY)
2.3 Purpose: Fill extra side FOVs with black on ultra-wide resolutions in coop / DM mode.
3. Move marine / weapon icons into the 16:9 area.
4. Move mission objectives into the 16:9 area.
5. Adapt 3D marine labels for ultra-wide screens accroding to different CVAR settings.
Copy file name to clipboardExpand all lines: src/game/client/swarm/vgui/asw_hud_master.cpp
+53-12Lines changed: 53 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -45,8 +45,17 @@ ConVar rd_draw_timer( "rd_draw_timer", "0", FCVAR_ARCHIVE, "Display the current
45
45
ConVar rd_draw_timer_color( "rd_draw_timer_color", "255 255 255 255", FCVAR_ARCHIVE, "The color of the current mission time" );
46
46
ConVar rd_draw_marine_health_counter( "rd_draw_marine_health_counter", "0", FCVAR_ARCHIVE, "Display a numeric counter for marine health on the HUD" );
47
47
48
+
// restricted area variables
49
+
int g_nRestrictedAreaLeft;
50
+
int g_nRestrictedAreaRight;
51
+
int g_nScreenAreaWidth;
52
+
int g_nScreenAreaHeight;
53
+
bool g_bUltraWideScreen;
54
+
// restricted area cvars
48
55
ConVar rd_draw_restricted_borders( "rd_draw_restricted_borders", "1", FCVAR_ARCHIVE, "Display the restricted cursor area when using ultra-wide resolution" );
49
56
ConVar rd_draw_restricted_borders_color("rd_draw_restricted_borders_color", "128 128 128 128", 0, "Color of the restricted cursor area borders");
57
+
ConVar rd_draw_restricted_rectangles_coop("rd_draw_restricted_rectangles_coop", "1", FCVAR_ARCHIVE | FCVAR_REPLICATED | FCVAR_NOTIFY, "Fill extra side FOVs with black on ultra-wide resolution in coop mode.");
58
+
ConVar rd_draw_restricted_rectangles_dm("rd_draw_restricted_rectangles_dm", "1", FCVAR_ARCHIVE | FCVAR_REPLICATED | FCVAR_CHEAT | FCVAR_NOTIFY, "Fill extra side FOVs with black on ultra-wide resolution in deathmatch mode.");
0 commit comments