Repository navigation
UI framework update and Quit from Main Menu - #211
Merged
Merged
Conversation
Contributor
Author
|
Closes #203 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/UI_FRAMEWORK.mdreplacesdocs/port/ui_framework.md: what the framework is today, and a proposal for where it goes next.Closes #203
Title menu
port/src/title/title_menu.cpp). The words for Start, Continue and Option are retail's own in each language, read from its pictures (title.menu.*keys).TitleLoop's handling of the other rows is retail's.Quit
TakeBattleMenuTitleRequest,port/src/gameloop.cpp): it waits for loads in flight, stops the sound and jumps to map 800, so the title starts as it does at start-up. Nothing is saved on the way.Chronicle Title Bold
tools/font/README.mdhas its provenance.UI framework
FontWeight::Titleand a fourth caption font slot, embedded in the executable as the status font is.see_through: alpha makes the text transparent, as retail's sprites fade, instead of darkening it.haloandhalo_strength: a soft dark halo that fades out from the letters.kern: the font's kerning, through the newcapfont::KernPixels(a kern table or GPOS pair kerning). It is applied when a line is both measured and drawn, so a kerned label still aligns, and it is skipped for words placed letter by letter into retail's painted slots.ink_spacing: letters set by their outlines (the newcapfont::GetInkExtent) rather than their pictures. A picture's soft edge is a window pixel, so with picture spacing a word tightens as the window grows (CONTINUE measured 125, 118 and 114 logical pixels at 640×480, 1280×960 and 2560×1920); with ink spacing it stays within a pixel.UI::ConfirmModal::HitandConfirmModal::ButtonRectgive a yes/no box's buttons from the layoutDrawuses. The pause menu's Quit and Save/Load boxes now take the mouse through them. Their old hard-coded coordinates assumed 100×26 buttons at fixed places; the plates are 96×23, and they move as the text grows.ui_framework/lang.cpptobattlemenu/strings.cpp, since the framework holds no menu's content.battlemenu.saveload.*keys, with the same text.UI::JournalStringsis declared with the journal (menu_manual_port.hpp).internal.hppis removed, along with an include it didn't use.Docs
docs/UI_FRAMEWORK.md, moved fromdocs/port/(which otherwise holds the review ledger and the truncation report), rewritten:docs/PC.md: "The title menu, Exit and Quit".tools/font/README.md: Chronicle Title Bold.Testing
GfxValidation.*, which need a Vulkan validation layer the SDK doesn't ship.CaptionFont.KernsThePairsTheFontKerns,CaptionFont.InkExtentIsTheOutlineAtAnySize.scripts/port/truncations.py --checkpasses.Notes for reviewers