View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005323||The Dark Mod||Coding||public||09.08.2020 02:01||31.08.2020 16:55|
|Product Version||TDM 2.08|
|Target Version||TDM 2.09|
|Summary||0005323: Improve menu GUI and remove unexpected overrides of menu GUI files|
|Description||It seems that about 20 FMs override menu files which should not be overridden.|
This often have bad effect of being unable to change or fix these files.
It would be good to add missing capabilities to core GUI, and remove overriding files from FMs.
|Tags||No tags attached.|
Here are some necessary customizations I've heard about:
* Skipping some screen(s) in briefing sequence: BRIEFING, success, diffuculty, objectives
* Changing background image: title, briefing (figures on title page should be removable)
* Changing music
* Changing "wait until ready screen" (already works well)
* "problem with the custom guis is how long and full of comments they are, making it difficult to find something specific."
A better thing would be refactor GUI code, so that every screen includes some customizable file.
I'm not sure I'll be able to do it...
Huge effort spent on refactoring state skipping in GUI scripts.
Now MainMenuModeSelect simple calls same-named C++ cmd, instead of doing all the complicated logic by itself.
As the result, it allowed to properly implement disabling of the following FM-owned states:
//#define ENABLE_MAINMENU_BRIEFING_VIDEO 0
//#define ENABLE_MAINMENU_BRIEFING 0
//#define ENABLE_MAINMENU_DIFF_SELECT 0
//#define ENABLE_MAINMENU_SHOP 0
//#define ENABLE_MAINMENU_SUCCESS 0
In order to achieve that, I introduced pseudostates MM_STATE_FORWARD and MM_STATE_BACKWARD, which don't define any GUI. Somewhat similar to MM_STATE_MAINMENU, it is detected by state switching code (which is now in C++) and redirected to proper target state.
Speaking of commits, the following preliminary ones add new features and don't change/break any behavior:
r8923. Fixed GUI cmd concatenation bug. That was responsible for hazards like "initChoicelog", not the overflow.
r8924+r8948. Set mapStartCmd GUI variable when "start new game" is clicked. Before that, it was set independently in shop and in objectives code.
r8925. Added public method idUserInterface::ResetWindowTime.
r8926. Added public method to idParser for getting defines. This is going to be used to access FM-customized GUI defines from C++ code.
r8927. All defines in GUI scripts which are present at the end of parsing are saved now. They can be accessed with GetStateXXX methods, prepending '#' charactar to the name of define.
r15993. Updating comments with information about new (FFmpeg-based) videos.
r15995. Removed unused MainMenuWatchDog and commented Debug from GUI scripts.
This pair of commits refactors MainMenuModeSelect (moves to C++):
r8928. Implemented GUI command mainmenumodeselect. It replaces the code from "MainMenuModeSelect::onTime 0" in GUI scripts.
r15996. Big chunk of GUI code in "MainMenuModeSelect::onTime 0" replaced with call to "mainmenumodeselect" C++ command.
They can already break FMs which override GUI files which they should NOT override.
This pair adds FORWARD/BACKWARD system and supports states skipping:
r8929. Added FORWARD/BACKWARD actions and implemented state skipping in "mainmenumodeselect" cmd.
r15997. Added FORWARD/BACKWARD main menu pseudostate, use it where appropriate, supported state skipping.
I have extracted the major changes into branch 8323_mainmenu and reverted them in trunk.
The following commits were moved:
Here are some more changed which went into trunk.
This is generic change (not even for GUI) --- logfile improvement:
r8954. When writing messages to logfile (DM_LOG), print relative path to source file instead of absolute.
Adding detailed logging for GUI scripts (enabled under LC_MAINMENU/LT_DEBUG settings in darkmod.ini):
r8955. Save source location in every idGuiScript and print it when gui cmd is issued.
r8956. Report all events happening to all windows to logfile, with a simple spam filter.
Without it I could hardly debug any of the stupid problems that I face all the time!
One "decapsulation" method:
r8957. Added idSession::GetGui method, allowing to get active, mainmenu, etc. GUI at any moment.
And minor cleanup of GUI code:
r16012. Main menu cleanup: notime 0 should be everywhere.
And these changes went into branch.
Music is now tied to main state, no more separate state switcher.
r8959. Music state is now tied to main state (aka "mode"). MainMenuMusicSelect GUI script should no longer be used.
r16014. MainMenuMusicSelect is now empty: music is controlled by C++ code, tied to the main "mode" state.
Serious change of how initialization works (due to problems with menu after engine restart):
r16015. Major changes in how MainMenuStartUp works.
r8960. Drop main menu "mode" explicitly when starting game and when changing language.
|09.08.2020 02:01||stgatilov||New Issue|
|09.08.2020 02:01||stgatilov||Status||new => assigned|
|09.08.2020 02:01||stgatilov||Assigned To||=> stgatilov|
|09.08.2020 03:25||stgatilov||Note Added: 0012719|
|14.08.2020 05:46||stgatilov||Note Added: 0012733|
|14.08.2020 05:56||stgatilov||Note Added: 0012734|
|22.08.2020 06:21||stgatilov||Note Added: 0012746|
|31.08.2020 16:46||stgatilov||Note Edited: 0012734||View Revisions|
|31.08.2020 16:53||stgatilov||Note Added: 0012769|
|31.08.2020 16:55||stgatilov||Note Added: 0012770|