PDA

View Full Version : Grey out multi-Clear Quest Filepath



Asuna Yuuki Nagato
02-24-2024, 12:59 AM
I think we should have Etc->Clear Quest Filepath grey out after clicking "Yes" on the Clear Quest Path msgbox, because there is no point in clearing it twice.

Asuna Yuuki Nagato
03-15-2024, 12:49 PM
The msgbox is created by onClearQuestFilepath() in zq_misc.cpp

Asuna Yuuki Nagato
04-13-2024, 11:25 PM
etc_menu is a static NewMenu declared in zquest.cpp

Asuna Yuuki Nagato
04-16-2024, 12:58 AM
The actual clearing is done by ZQ_ClearQuestPath() in zquest.cpp

filepath is a char* pointing to an empty string after a call to it completes.

Asuna Yuuki Nagato
04-16-2024, 01:07 AM
Here is an example of how to grey out a menu option:



edit_menu.disable_uid(MENUID_EDIT_UNDO, !Map.CanUndo());
edit_menu.disable_uid(MENUID_EDIT_REDO, !Map.CanRedo());