MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / OnInitDialog

Method OnInitDialog

editor/ScriptLevelInterface.cpp:767–808  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

765}
766
767BOOL CScriptLevelInterface::OnInitDialog() {
768 CDialog::OnInitDialog();
769 int value;
770 bool bvalue;
771
772 // restore settings
773 if (Database->read_int("EditorScriptViewType", &value)) {
774 m_ViewType = value;
775 } else {
776 m_ViewType = 0;
777 }
778
779 if (Database->read_int("EditorScriptType", &value)) {
780 m_ScriptType = value;
781 } else {
782 m_ScriptType = 0;
783 }
784
785 if (Database->read("EditorScriptShowNonCheckedOut", &bvalue)) {
786 m_ShowNonCheckedOut = bvalue;
787 } else {
788 m_ShowNonCheckedOut = 0;
789 }
790
791 if (Database->read("EditorAutoCheckScriptsWithLevels", &bvalue)) {
792 m_AutoCheckScripts = bvalue;
793 } else {
794 m_AutoCheckScripts = 0;
795 }
796
797 value = 256;
798 if (!Database->read("EditorLastScript", LastScriptSelected, &value)) {
799 LastScriptSelected[0] = '\0';
800 }
801
802 UpdateData(false);
803 UpdateDialog();
804
805 SetStatus("Ready");
806
807 return TRUE;
808}
809
810void CScriptLevelInterface::OnAddnew() {
811 InCritical = true;

Callers

nothing calls this directly

Calls 1

readMethod · 0.45

Tested by

no test coverage detected