View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002960 | The Dark Mod | GUI | public | 01.01.2012 14:08 | 21.12.2022 18:49 |
Reporter | tels | Assigned To | nbohr1more | ||
Priority | normal | Severity | minor | Reproducibility | N/A |
Status | resolved | Resolution | fixed | ||
Product Version | TDM 1.07 | ||||
Target Version | TDM 2.11 | Fixed in Version | TDM 2.11 | ||
Summary | 0002960: Add Mason font and translate the huge GUI headlines | ||||
Description | Some of our GUI headlines like "Settings", "Load - Save", "New Mission" etc. need to be translatable texts instead of bitmaps fused into the background. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
related to | 0002445 | resolved | Springheel | Load Screen options need rearranging |
related to | 0002989 | new | Add UnregisterFont() | |
child of | 0002779 | confirmed | Translate the menu and HUD into different languages |
As a first step, the Mason font has been added, including patches so that the "S" in "Setting" is lowered to the baseline. Also a new GUI #define has been added (MENU_BACKGROUND), that sep. the background parchment, the watermark, and the ornamental lines above/under the content. The watermarks have been added as texture, too. In addition, a new define that uses that for the Settings and one for the New Mission page have been added, including the nec. strings, see attached image for reference. Missing are the Load - Save screen (that is bug 0002445) and the "Download" menu screen. Also, the shop might have a few Mason headlines. |
|
The Load/Save screen and the Download menu have not yet been converted, so this issue remains open for now. | |
@nbohr1more, can this be closed now..? | |
Oof...The textures that need to be edited are already compressed as dds. Probably can find the uncompressed ones in an older TDM release? path: dds/guis/assets/mainmenu Load \ Save = parchment_load.dds (associated gui = mainmenu_loadsave.gui) Online Mission Archive = parchment_download_left.dds Download Status = parchment_download_right.dds ( associated gui = mainmenu_download.gui ) |
|
Load \ Save image was dds in the old St Lucia demo... | |
Edited Load \ Save DDS | |
Further findings: The translatable headings are defined in the "watermark" stanzas in mainmenu_defs.gui. Those defs inherit from MENU_BACKGROUND and thus override the parchment with baked images with a generic one. It is assumed that the "watermark image" will be available so that the appearance of the menu can be replicated but for the Load Save screen none of the assets match the watermark that is baked into the texture. Options forward? Ping Springheel to see whether the watermark is somewhere in his collection. Perform further edits to the parchment dds texture to remove dark gui elements then use threshold tools in GIMP to extract just the watermark image and attempt to color and size match it to the other stencils. Take the entire MENU_BACKGROUND definition and add a modified version of it to the mainmenu_loading GUI and use the above edited parchment with the baked watermark. |
|
Got it mostly working without using the templates and just setting two window defs. Translated text doesn't quite fit for many languages. Will need to figure out how to reconcile... // Load * Save Headline Translation windowDef LoadSaveHeadlineTextGlow { rect 137, 23.5 + "gui::headline_offset", 600, 200 text "#str_02122" // Load Save font "fonts/mason_glow" forecolor 1,1,0.80,0.8 textscale 0.75 textalign 1 textaligny -1 visible 1 } windowDef LoadSaveHeadlineText { rect 137, 23.5 + "gui::headline_offset", 600, 200 text "#str_02122" // Load Save font "fonts/mason" forecolor 0,0,0,1.0 textscale 0.75 textalign 1 visible 1 } mainmenu_loadsave.gui (15,957 bytes)
/* ============================================================================================= * * Load/Save Game GUI. This file is part of The Dark Mod's Main Menu GUI * * Mission Authors: DO NOT EDIT, INCLUDE OR OVERRIDE THIS FILE IN YOUR MISSION PK4. * * ============================================================================================= */ windowDef LoadSaveGameMenu { rect 0,0,640,640 visible 0 // Parchment Background windowDef LoadSaveGameMenuBackground { rect 280, 0, 320, 640 background "guis/assets/mainmenu/parchment_load" visible 1 } // Load * Save Headline Translation windowDef LoadSaveHeadlineTextGlow { rect 137, 23.5 + "gui::headline_offset", 600, 200 text "#str_02122" // Load Save font "fonts/mason_glow" forecolor 1,1,0.80,0.8 textscale 0.75 textalign 1 textaligny -1 visible 1 } windowDef LoadSaveHeadlineText { rect 137, 23.5 + "gui::headline_offset", 600, 200 text "#str_02122" // Load Save font "fonts/mason" forecolor 0,0,0,1.0 textscale 0.75 textalign 1 visible 1 } // This is called whenever the user switches to this screen windowDef LoadSaveGameMenuStateInit { noTime 1 // Init methods have onTime 10 instead of onTime 0. onTime 10 { set "cmd" "log 'LoadSaveGameMenuStateInit called.'"; set "cmd" "loadsavemenu_init"; // grayman #3733 resetTime "LoadSaveGameUpdateAll" 0; // Show our parent windowDef set "LoadSaveGameMenu::visible" 1; // grayman #3733 - fade in the campaign/mission titles if ("LoadSaveIntroAnimation::introAnimPlayed" == 0) { set "cmd" "log 'Trying to call load/save menu intro animation.'"; // Intro animation not yet played, show it now set "LoadSaveIntroAnimation::notime" "0"; resetTime "LoadSaveIntroAnimation" 0; } else { set "cmd" "log 'Skipping load/save menu intro animation.'"; } set "notime" 1; } } // General update routine windowDef LoadSaveGameUpdateAll { notime 1 onTime 0 { set "LSGSaveGameNameEntry::text" ""; set "LGCLevelSaveDate::text" ""; set "LGCLevelSaveTime::text" ""; resetTime "LSGSaveMissionButton_action" 0; set "LSGSaveMissionButton_lit::matcolor" "1 1 1 0"; resetTime "LSGDeleteSaveGameButton" 0; resetTime "LSGLoadMissionButton" 0; set "LSGLoadMissionButton_lit::matcolor" "1 1 1 0"; set "cmd" "updateSaveGameInfo;"; } } // Called when the MainMenuModeSelect script switches states. windowDef LoadSaveGameMenuStateEnd { noTime 1 onTime 0 { set "cmd" "log 'LoadSaveGameMenuStateEnd called.'"; set "LoadSaveGameMenu::visible" "0"; set "notime" "1"; } } // Savegame properties/preview windowDef LGCLoadGameSpecific { rect 0, 170, 300, 300 // Save game screenshot windowDef LGCLevelshot { rect 45, 65, 215, 175 background "gui::loadgame_shot" matcolor 1, 1, 1, 1 noevents 1 visible ("gui::loadGame_sel_0" >= 0) } // This box simulates a 'multiply' effect on screenshot windowDef LGCLevelshot_multiply { rect 45, 65, 215, 175 background "guis/assets/mainmenu/screenshot_multiply" matcolor 1, 1, 1, 1 bordersize 0 noevents 1 visible ("gui::loadGame_sel_0" >= 0) } windowDef LGCLevelshot_back { rect 12, 0, 282, 295 background "guis/assets/mainmenu/oldparchment_backdrop" matcolor 1, 1, 1, 1 bordersize 0 noevents 1 visible ("gui::loadGame_sel_0" >= 0) } // Savegame Name windowDef LGCLevelSaveName { rect 0, 0, 300, 35 text "gui::saveGameName" font "fonts/carleton" textscale 0.32 textalign 1 forecolor 1, 1, 1, 1 } // Date windowDef LGCLevelSaveDate { rect 20, 280, 100, 15 text "gui::saveGameDate" font "fonts/carleton" textscale 0.22 textalign 2 forecolor 1, 1, 1, 1 } // Time windowDef LGCLevelSaveTime { rect 185, 280, 100, 15 text "gui::saveGameTime" font "fonts/carleton" textscale 0.22 forecolor 1, 1, 1, 1 } } // Use this layer to move all content elements (lists, buttons, etc.) around in the GUI windowDef LSGContentParent { rect 0, 5, 640, 635 visible 1 // ------------ Campaign and Mission Titles (grayman #3733) ------------------- // LSCampaignTitleText and LSCampaignMissionTitleText will appear // as a pair when playing a campaign mission windowDef LSCampaignTitleText { rect LS_TITLE_CAMPAIGN LS_TITLE_FONT //text "No Honor Among Thieves:" // Campaign title text "gui::LSCampaignTitleText" // Campaign title } windowDef LSCampaignMissionTitleText { rect LS_TITLE_CAMPAIGN_MISSION LS_TITLE_FONT //text "A Night Out on the Town" // Campaign Mission title text "gui::LSCampaignMissionTitleText" // Campaign Mission title } // MissionTitleText will appear by itself when playing a non-campaign mission windowDef LSMissionTitleText { rect LS_TITLE_MISSION LS_TITLE_FONT //text "Return to the City" // Mission title text "gui::LSMissionTitleText" // Mission title } //----------------------------------------------------------------------------- // The list of available save games listDef LGSaveGameList { rect 325, 187, 250, 160 // grayman #3733 - was too far to the right forecolor 0, 0, 0, 1 bordercolor 0, 0, 0, 0.1 textscale 0.23 listName "loadGame" tabstops "2, 99, 180" font "fonts/carleton" onAction { set "cmd" "play sound/meta/menu/mnu_select;"; set "cmd" "updateSaveGameInfo;"; resetTime "LSGLoadMissionButton" "0"; set "LSGLoadMissionButton_lit::matcolor" "1 1 1 0"; resetTime "LSGDeleteSaveGameButton" 0; if ("gui::inGame" == 1) { resetTime "LSGSaveMissionButton_action" 0; } resetTime "LGSaveGameList" "0"; } onEnter { set "cmd" "play sound/meta/menu/mnu_select;" ; if ("gui::inGame" == 1) { // greebo: do nothing, double click is ambiguous } else { // No save game option available, route the double click to loadGame // Switch back to main menu set "gui::targetmode" MM_STATE_MAINMENU; resetTime "MainMenuModeSelect" 0; set "cmd" "loadGame"; resetTime "LSGResetButtons" 0; } } } // "Load Mission" button windowDef LSGLoadMissionButton { rect 290,380,160,20 background "guis/assets/mainmenu/buttons_loadsave/loadmission" matcolor 1, 1, 1, 0 notime 1 onTime 0 { if ( "gui::loadGame_sel_0" >= 0 ) { set "matcolor" "1 1 1 1" ; set "noevents" "0" } else { // greebo: No savegame selected, make insensitive set "matcolor" "0 0 0 0.3" ; set "noevents" "1" } } } windowDef LSGLoadMissionButton_lit { rect 290, 380, 160, 20 background "guis/assets/mainmenu/buttons_loadsave/loadmission_lit" matcolor 1, 1, 1, 0 } windowDef LSGLoadMissionButton_action { rect 340, 380, 110, 14 onMouseEnter { if ( "gui::loadGame_sel_0" >= 0 ) { transition "LSGLoadMissionButton::matcolor" "1 1 1 1" "1 1 1 0" "50" ; transition "LSGLoadMissionButton_lit::matcolor" "1 1 1 0" "1 1 1 1" "50" ; set "cmd" "play sound/meta/menu/mnu_hover;"; } } onMouseExit { if ( "gui::loadGame_sel_0" >= 0 ) { transition "LSGLoadMissionButton::matcolor" "1 1 1 0" "1 1 1 1" "50" ; transition "LSGLoadMissionButton_lit::matcolor" "1 1 1 1" "1 1 1 0" "50" ; } } onAction { if ("gui::loadGame_sel_0" >= 0) { set "cmd" "play sound/meta/menu/mnu_select; "; set "cmd" "updateSaveGameInfo;"; set "LGCLevelSaveName::text" ""; set "LGCLevelSaveDate::text" ""; set "LGCLevelSaveTime::text" ""; } } onActionRelease { if ("gui::loadGame_sel_0" >= 0) { // Switch to the main menu set "gui::targetmode" MM_STATE_MAINMENU; resetTime "MainMenuModeSelect" 0; set "cmd" "loadGame"; resetTime "LSGResetButtons" 0; } } } windowDef LGSaveGameNameText { rect 335,348,80,16 text "#str_07201" // Enter Name: font "fonts/carleton" textscale 0.22 forecolor 0,0,0,1 textaligny -4 visible ("gui::inGame" == 1) } // Savegame Name Entry Field windowDef LSGSaveGameName { rect 415,348,155,16 backcolor 0, 0, 0, 0.4 bordercolor 0, 0, 0, 0.7 bordersize 1 visible ("gui::inGame" == 1) editDef LSGSaveGameNameEntry { rect 0, 0, 140, 14 text "gui::saveGameName" font "fonts/carleton" textscale 0.22 forecolor 0.8,0.8,0.8,1 textaligny -4 maxchars 32 onEnter { set "cmd" "play sound/meta/menu/mnu_select; saveGame 1"; // Switch to the main menu after save set "gui::targetmode" MM_STATE_MAINMENU; resetTime "MainMenuModeSelect" 0; set "cmd" "close"; } onAction { // greebo: Update the SaveMission button on each event resetTime "LSGSaveMissionButton" 0; resetTime "LSGSaveMissionButton_action" 0; } } } // greebo: called by the engine when a savegame is about to be overwritten onNamedEvent saveGameOverwrite { // Nothing here. Use this to display an "Overwrite game?"-style dialog } // "Save Mission" button windowDef LSGSaveMissionButton { rect 435, 380, 160, 20 background "guis/assets/mainmenu/buttons_loadsave/savemission" matcolor 1, 1, 1, 0 visible ("gui::inGame" == 1) notime 1 onTime 0 { if ("LSGSaveGameNameEntry::text") { set "matcolor" "1 1 1 1" ; set "noevents" "0" } else { // greebo: No savegame name, make insensitive set "matcolor" "0 0 0 0.3"; set "noevents" "1" } } } windowDef LSGSaveMissionButton_lit { rect 435,380,160,20 background "guis/assets/mainmenu/buttons_loadsave/savemission_lit" matcolor 1,1,1,0 visible ("gui::inGame" == 1) } windowDef LSGSaveMissionButton_action { rect 455, 380, 95, 14 visible ("gui::inGame" == 1) notime 1 onTime 10 { if ("LSGSaveGameNameEntry::text") { set "LSGSaveMissionButton::matcolor" "1 1 1 1" ; set "LSGSaveMissionButton_lit::matcolor" "1 1 1 0" ; set "noevents" "0"; } else { // greebo: No savegame selected, make insensitive set "LSGSaveMissionButton::matcolor" "1 1 1 0.3" ; set "LSGSaveMissionButton_lit::matcolor" "1 1 1 0" ; set "noevents" "1"; } } onMouseEnter { if ("LSGSaveGameNameEntry::text") { set "cmd" "play sound/meta/menu/mnu_hover;"; transition "LSGSaveMissionButton::matcolor" "1 1 1 1" "1 1 1 0" "50" ; transition "LSGSaveMissionButton_lit::matcolor" "1 1 1 0" "1 1 1 1" "50" ; } } onMouseExit { if ("LSGSaveGameNameEntry::text") { set "cmd" "play sound/meta/menu/mnu_hover;"; transition "LSGSaveMissionButton_lit::matcolor" "1 1 1 1" "1 1 1 0" "50" ; transition "LSGSaveMissionButton::matcolor" "1 1 1 0" "1 1 1 1" "50" ; } } onAction { set "cmd" "play sound/meta/menu/mnu_select; saveGame 1"; // Switch back to main menu after save set "gui::targetmode" MM_STATE_MAINMENU; resetTime "MainMenuModeSelect" 0; set "cmd" "close"; } } // Delete Button windowDef LSGDeleteSaveGameButton { rect 323, 427, 100, 30 text "#str_07200" // Delete font "fonts/carleton" textscale 0.29 forecolor 0, 0, 0, 1 notime 1 onTime 0 { if ( "gui::loadGame_sel_0" >= 0 ) { set "forecolor" "0 0 0 1" ; set "noevents" "0" } else { // greebo: No savegame selected, make insensitive set "forecolor" "0 0 0 0.4" ; set "noevents" "1" } } onMouseEnter { set "cmd" "play sound/meta/menu/mnu_hover;"; transition "forecolor" "0 0 0 1" "1 1 1 1" "50" ; } onMouseExit { transition "forecolor" "1 1 1 1" "0 0 0 1" "50" ; } onAction { if ("gui::loadGame_sel_0" >= 0) { set "cmd" "play sound/meta/menu/mnu_select; deleteGame;"; set "cmd" "updateSaveGameInfo;"; resetTime "LSGResetTexts" 0; set "LGCLevelSaveName::text" ""; resetTime "LSGResetButtons" 0; } } } // greebo: This is used to reset the buttons after Load/Save action // so that they aren't left in a sensitive state with an empty listDef selection. windowDef LSGResetButtons { rect 0,0,0,0 notime 1 onTime 30 { resetTime "LSGSaveMissionButton_action" 0; set "LSGSaveMissionButton_lit::matcolor" "1 1 1 0"; resetTime "LSGDeleteSaveGameButton" 0; resetTime "LSGLoadMissionButton" 0; set "LSGLoadMissionButton_lit::matcolor" "1 1 1 0"; } } // Clears the texts for savegame info and savegame name windowDef LSGResetTexts { rect 0,0,0,0 notime 1 onTime 20 { set "LSGSaveGameNameEntry::text" ""; set "LGCLevelSaveDate::text" ""; set "LGCLevelSaveTime::text" ""; } } } // end windowDef LGContentParent // Main Menu Button -- this should go here regardless of rest of design windowDef LGMainMenuButtonH { MM_POS_SETTINGS_BACK_BUTTON_GLOW MM_FONT_RIGHT_GLOW text "#str_02114" // Main Menu } windowDef LGMainMenuButton { MM_POS_SETTINGS_BACK_BUTTON MM_FONT_RIGHT_BOLD text "#str_02114" // Main Menu } // "Normal" version used for highlighting windowDef LGMainMenuButtonN { MM_POS_SETTINGS_BACK_BUTTON MM_FONT_RIGHT text "#str_02114" // Main Menu } windowDef LGMainMenuButtonAction { MM_POS_SETTINGS_BACK_ACTION visible 1 float exit; onMouseEnter { set "exit" 0; transition "LGMainMenuButton::forecolor" SNORMAL_COLOR SINVISIBLE "50" ; transition "LGMainMenuButtonH::forecolor" SINVISIBLE SGLOW_RED_COLOR "50" ; transition "LGMainMenuButtonN::forecolor" SINVISIBLE SBOLDGLOW_WHITE_COLOR "50" ; set "cmd" "play sound/meta/menu/mnu_hover"; } onMouseExit { if ( "exit" == 0 ) { transition "LGMainMenuButton::forecolor" SBOLDGLOW_WHITE_COLOR SNORMAL_COLOR "50" ; transition "LGMainMenuButtonH::forecolor" SGLOW_RED_COLOR SINVISIBLE "50" ; transition "LGMainMenuButtonN::forecolor" SBOLDGLOW_WHITE_COLOR SINVISIBLE "50" ; } } onAction { transition "LGMainMenuButton::forecolor" SBOLDGLOW_WHITE_COLOR SNORMAL_COLOR "50" ; transition "LGMainMenuButtonH::forecolor" SGLOW_RED_COLOR SINVISIBLE "50" ; transition "LGMainMenuButtonN::forecolor" SBOLDGLOW_WHITE_COLOR SINVISIBLE "50" ; set "exit" 1; set "cmd" "play sound/meta/menu/mnu_select;"; // Switch to the main menu set "gui::targetmode" MM_STATE_MAINMENU; resetTime "MainMenuModeSelect" 0; } } /** * Intro (fade-in) animation, is only played once. */ windowDef LoadSaveIntroAnimation // grayman #3733 { rect 0,0,0,0 notime 1 visible 1 float introAnimPlayed; // this is 1 if the intro anim has already been played onTime 10 { set "cmd" "log 'LoadSaveIntroAnimation called.'"; if ("introAnimPlayed" == 1) { set "cmd" "log 'LoadSaveIntroAnimation has already been played, stopping.'"; set "notime" 1; } else { set "cmd" "log 'LoadSaveIntroAnimation started playing.'"; } } // grayman #3733 - show campaign and mission titles onTime 100 { // these titles will appear as a pair when playing a campaign mission transition "LSCampaignTitleText::forecolor" SINVISIBLE SLS_TITLE_COLOR "500" ; transition "LSCampaignMissionTitleText::forecolor" SINVISIBLE SLS_TITLE_COLOR "500" ; // this title will appear by itself when playing a non-campaign mission transition "LSMissionTitleText::forecolor" SINVISIBLE SLS_TITLE_COLOR "500" ; } onTime 200 { set "cmd" "log 'LoadSaveIntroAnimation successfully executed, stopping.'"; set "introAnimPlayed" 1; set "notime" 1; // stop animation } } } // end windowDef LoadSaveGameMenu |
|
Load \ Save menu completed in Rev 16691 Note: TDM must be restarted for some languages because the text size change does not take effect when the language is toggled |
|
Rev 16692 Downloads Menus are now complete. Example Italian and Spanish strings created to test the feature. Again, text resizing to accommodate other languages requires a restart. |
|
Font resize issue can probably be fixed by adding an unregister function for fonts. See 0002989 Looks sorta daunting because the font register function is filled with all sorts of branching and lookups. Not setting an Initialization function for fonts? |
|
Date Modified | Username | Field | Change |
---|---|---|---|
01.01.2012 14:08 | tels | New Issue | |
01.01.2012 14:08 | tels | Status | new => assigned |
01.01.2012 14:08 | tels | Assigned To | => tels |
01.01.2012 14:08 | tels | Relationship added | child of 0002779 |
01.01.2012 14:09 | tels | Relationship added | related to 0002445 |
01.01.2012 14:09 | tels | File Added: new_game_new_and_old.jpg | |
01.01.2012 14:25 | tels | Note Added: 0004225 | |
15.07.2012 14:47 | tels | Target Version | TDM 1.08 => |
15.07.2012 14:48 | tels | Note Added: 0004713 | |
15.05.2013 15:26 | tels | Assigned To | tels => |
03.06.2013 02:24 | grayman | Status | assigned => new |
28.03.2018 10:39 |
|
Assigned To | => nbohr1more |
28.03.2018 10:39 |
|
Status | new => assigned |
28.03.2018 10:39 |
|
Note Added: 0010241 | |
16.12.2022 06:57 | nbohr1more | Note Added: 0015580 | |
16.12.2022 18:00 | nbohr1more | Note Added: 0015581 | |
16.12.2022 20:28 | nbohr1more | Note Added: 0015582 | |
16.12.2022 20:28 | nbohr1more | File Added: parchment_load.dds | |
18.12.2022 13:37 | nbohr1more | Note Added: 0015591 | |
19.12.2022 06:28 | nbohr1more | Note Added: 0015592 | |
19.12.2022 06:28 | nbohr1more | File Added: mainmenu_loadsave.gui | |
19.12.2022 06:29 | nbohr1more | Note Edited: 0015592 | |
20.12.2022 05:14 | nbohr1more | Note Added: 0015593 | |
21.12.2022 04:38 | nbohr1more | Note Added: 0015595 | |
21.12.2022 04:38 | nbohr1more | Status | assigned => resolved |
21.12.2022 04:38 | nbohr1more | Resolution | open => fixed |
21.12.2022 04:38 | nbohr1more | Fixed in Version | => TDM 2.11 |
21.12.2022 04:38 | nbohr1more | Target Version | => TDM 2.11 |
21.12.2022 18:49 | nbohr1more | Note Added: 0015600 | |
21.12.2022 18:49 | nbohr1more | Relationship added | related to 0002989 |