1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 10:09:43 +01:00
VVVVVV/desktop_version/src
Dav999-v 0023c821db Make menus automatically centered and narrowed
All menus had a hardcoded X position (offset to an arbitrary starting
point of 110) and a hardcoded horizontal spacing for the "staircasing"
(mostly 30 pixels, but for some specific menus hardcoded to 15, 20 or
something else). Not all menus were centered, and seem to have been
manually made narrower (with lower horizontal spacing) whenever text
ran offscreen during development.

This system may already be hard to work with in an English-only menu
system, since you may need to adjust horizontal spacing or positioning
when adding an option. The main reason I made this change is that it's
even less optimal when menu options have to be translated, since
maximum string lengths are hard to determine, and it's easy to have
menu options running offscreen, especially when not all menus are
checked for all languages and when options could be added in the middle
of a menu after translations of that menu are already checked.

Now, menus are automatically centered based on their options, and they
are automatically made narrower if they won't fit with the default
horizontal spacing of 30 pixels (with some padding). The game.menuxoff
variable for the menu X position is now also offset to 0 instead of 110

The _default_ horizontal spacing can be changed on a per-menu basis,
and most menus (not all) which already had a narrower spacing set,
retain that as a maximum spacing, simply because they looked odd with
30 pixels of spacing (especially the main menu). They will be made even
narrower automatically if needed. In the most extreme case, the spacing
can go down to 0 and options will be displayed right below each other.
This isn't in the usual style of the game, but at least we did the best
we could to prevent options running offscreen.

The only exception to automatic menu centering and narrowing is the
list of player levels, because it's a special case and existing
behavior would be better than automatic centering there.
2020-06-29 02:09:52 +02:00
..
BinaryBlob.cpp Maybe check the right size m8 2020-06-14 22:44:34 -04:00
BinaryBlob.h Sigh. 2020-06-15 07:37:05 -04:00
BlockV.cpp Remove blockclass::clear(), simplify blockclass initializations 2020-04-03 23:28:47 -04:00
BlockV.h Remove blockclass::clear(), simplify blockclass initializations 2020-04-03 23:28:47 -04:00
editor.cpp Make menus automatically centered and narrowed 2020-06-29 02:09:52 +02:00
editor.h Add '#if !defined(NO_EDITOR)' guards around editorinput/render/logic 2020-06-19 18:35:03 -04:00
Ent.cpp Fix red pill/mannequins/transmittor/radar dish being offset for 1 frame 2020-06-19 09:05:48 -04:00
Ent.h Fix, for in-GAMEMODE sprites, their colors updating too fast 2020-06-19 09:05:48 -04:00
Entity.cpp Fix animating entities' drawframes not being updated for 1 frame 2020-06-19 09:05:48 -04:00
Entity.h Interpolate trophy text 2020-06-19 09:05:48 -04:00
Enums.h Hello WWWWWWorld! 2020-01-08 10:37:50 -05:00
FileSystemUtils.cpp Fix gamecontrollerdb.txt path 2020-06-23 19:08:08 -04:00
FileSystemUtils.h Abstract assets mounting to FileSystemUtils.cpp 2020-06-21 20:25:22 -04:00
Finalclass.cpp Statically allocate level arrays 2020-05-29 10:21:25 -04:00
Finalclass.h Refactor Finalclass.cpp to not use strings for tilemaps 2020-05-17 22:03:29 -04:00
Game.cpp Make menus automatically centered and narrowed 2020-06-29 02:09:52 +02:00
Game.h Make menus automatically centered and narrowed 2020-06-29 02:09:52 +02:00
GOGNetwork.c Add support for multiple Network backends, stub in GOGNetwork 2020-01-13 11:15:22 -05:00
Graphics.cpp Make menus automatically centered and narrowed 2020-06-29 02:09:52 +02:00
Graphics.h Make menus automatically centered and narrowed 2020-06-29 02:09:52 +02:00
GraphicsResources.cpp Fix some leaks 2020-06-07 22:40:03 -04:00
GraphicsResources.h Fix some leaks 2020-06-07 22:40:03 -04:00
GraphicsUtil.cpp Move analogue mode filter update logic to fixed-timestep loop 2020-06-19 09:05:48 -04:00
GraphicsUtil.h Move analogue mode filter update logic to fixed-timestep loop 2020-06-19 09:05:48 -04:00
Input.cpp Use returntomenu(timetrials) instead of returnmenu in timetrialcomplete3 2020-06-25 20:27:51 -04:00
Input.h Remove global args from Input.cpp 2020-04-03 10:40:50 -04:00
KeyPoll.cpp Fix resumemusic/musicfadein not working 2020-06-27 17:23:07 -04:00
KeyPoll.h Fix resumemusic/musicfadein not working 2020-06-27 17:23:07 -04:00
Labclass.cpp Statically allocate level arrays 2020-05-29 10:21:25 -04:00
Labclass.h Refactor Labclass.cpp to not use strings for tilemaps 2020-05-17 22:03:29 -04:00
Logic.cpp Fix deltaframe tower BG flicker when exiting menu in H/V warp room 2020-06-23 15:23:57 -04:00
Logic.h Fix delta rendering glitch when going to options from new Esc menu 2020-06-23 15:23:57 -04:00
main.cpp Remove unnecessary middleman game.infocus 2020-06-27 17:23:07 -04:00
MakeAndPlay.h Re-comment out #define MAKEANDPLAY 2020-02-09 10:42:03 -05:00
Map.cpp Fix 1-frame glitch when entering a room with plats in finalmode 2020-06-19 09:05:48 -04:00
Map.h Save BG vars to temp vars when entering menu and revert them upon exit 2020-06-23 15:23:57 -04:00
Maths.h Hello WWWWWWorld! 2020-01-08 10:37:50 -05:00
Music.cpp Remove unused/useless vars music.custompd/musicfade(in)/volume 2020-06-27 17:23:07 -04:00
Music.h Remove unused/useless vars music.custompd/musicfade(in)/volume 2020-06-27 17:23:07 -04:00
Network.c Allow for conditional building of Steam and GOG APIs 2020-06-01 14:21:06 -04:00
Network.h Add support for multiple Network backends, stub in GOGNetwork 2020-01-13 11:15:22 -05:00
Otherlevel.cpp Statically allocate level arrays 2020-05-29 10:21:25 -04:00
Otherlevel.h Remove i/j/k attributes from classes that don't need them 2020-06-14 14:37:29 -04:00
preloader.cpp Move preloader update code to new function preloaderlogic() 2020-06-19 09:05:48 -04:00
preloader.h Move preloader update code to new function preloaderlogic() 2020-06-19 09:05:48 -04:00
Render.cpp Make menus automatically centered and narrowed 2020-06-29 02:09:52 +02:00
Render.h Merge towerrender() into gamerender() 2020-04-26 19:07:40 -04:00
Screen.cpp Work around SDL2 bug where VSync hint only applies on renderer creation 2020-06-19 17:44:53 -04:00
Screen.h Don't extern gameScreen, use *graphics.screenbuffer instead 2020-06-19 17:44:53 -04:00
Script.cpp Fix resumemusic/musicfadein not working 2020-06-27 17:23:07 -04:00
Script.h Refactor custom scripts to not be stored in one giant vector of lines 2020-06-11 22:13:52 -04:00
Scripts.cpp Remove include guards from Scripts.cpp and TerminalScripts.cpp 2020-06-11 22:13:52 -04:00
SoundSystem.cpp Revert "Add destructor for SoundTrack/MusicTrack (and explicitly define move constructor to prevent double-free)" 2020-06-07 22:40:03 -04:00
SoundSystem.h Revert "Add destructor for SoundTrack/MusicTrack (and explicitly define move constructor to prevent double-free)" 2020-06-07 22:40:03 -04:00
Spacestation2.cpp Statically allocate Prize for the Reckless tilemap 2020-05-29 19:39:05 -04:00
Spacestation2.h Refactor Spacestation2.cpp to not use strings for tilemaps 2020-05-17 22:03:29 -04:00
SteamNetwork.c Fix build on DragonFlyBSD 2020-04-23 23:35:33 -04:00
TerminalScripts.cpp Remove include guards from Scripts.cpp and TerminalScripts.cpp 2020-06-11 22:13:52 -04:00
Textbox.cpp Fix special text box images sometimes flashing 2020-06-19 09:05:48 -04:00
Textbox.h Fix special text box images sometimes flashing 2020-06-19 09:05:48 -04:00
Tower.cpp Remove now-unused fillbackground/fillcontents/fillminitower from Tower 2020-05-17 22:03:29 -04:00
Tower.h Remove i/j/k attributes from classes that don't need them 2020-06-14 14:37:29 -04:00
UtilityClass.cpp Move endsWith() to UtilityClass.cpp and put it in header file 2020-06-21 20:25:22 -04:00
UtilityClass.h Move endsWith() to UtilityClass.cpp and put it in header file 2020-06-21 20:25:22 -04:00
WarpClass.cpp Statically allocate level arrays 2020-05-29 10:21:25 -04:00
WarpClass.h Refactor WarpClass.cpp to not use strings for tilemaps 2020-05-17 22:03:29 -04:00