Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Map: Add an option to show room names below their IDs. This is a fairly straightforward extension. TODO: use a separate font. * basic support for a separate font for room names * Use black room names on light background * Room name display and font sizing fixes Room name display is now independent of room number display. The cut-off for the font size is lower (4 instead of 7). Room names are scaled as if the number 88 would be printed in the room box, which works for all practical purposes. Font size discovery is now done in floating point, and by scaling with factors 1.2 (up) and 1.05 (down) which is faster *and* looks way better. * Don't show room names in grid mode * Tweak font size calculation Ensure that we start with a reasonable font size * Added functions to get/set a room name's offset float x/y, relative to the room rectangle (and in its units). TODO: document in the wiki: getRoomNameOffset(id) setRoomNameOffset(id, x_offset, y_offset) * Save file version updated to 21 Added: * global: room name font + size adjustment * per room: label offset * remove LayoutDirection directives * Re-sorted the grid layout items in ui/profile_prefs * Fix room name placement directly under the room's rectangle, no strange offset * Add userdata flag "room.ui_showName" indicating whether to show room name * Move room label position to userdata * Cleanup The flag whether to display room labels (both globally and per-room) is now stored in userdata. Reverted: ad6d3 Re-sorted the grid layout items in ui/profile_prefs 76834 remove LayoutDirection directives 5d81e Save file version updated to 21 TODO: flipping the global flag crashes for no good reason. * Crash workaround Not inlining "setUserDataBool" triggers a double-free bug (Debian amd64, Qt 5.14.2-3, gcc 10.2.0-9). I'm investigating this; in the meantime, this patch should be an acceptable workaround. * Update src/mudlet-lua/lua/GUIUtils.lua * Appease codefactor * Hide showRoomNames checkbox if no room name infrastructure exists as exhibited by map userData "room.ui_showName" not being present at all Co-authored-by: Vadim Peretokin <vperetokin@gmail.com>
- Loading branch information
Showing
11 changed files
with
260 additions
and
28 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.