/// <summary> /// Initialization /// </summary> public override void _Ready() { createLevelBL = new CreateLevelBL(); questionNumberLabel = GetNode <Label>("QuestionNumberLabel"); errorMessageLabel = GetNode <Label>("ErrorMessageLabel"); checkbox1 = GetNode <CheckBox>("Options/Option1/CheckBox1"); checkbox2 = GetNode <CheckBox>("Options/Option2/CheckBox2"); checkbox3 = GetNode <CheckBox>("Options/Option3/CheckBox3"); checkbox4 = GetNode <CheckBox>("Options/Option4/CheckBox4"); question1Btn = GetNode <TextureButton>("QuestionSelect/Question1"); question2Btn = GetNode <TextureButton>("QuestionSelect/Question2"); question3Btn = GetNode <TextureButton>("QuestionSelect/Question3"); question4Btn = GetNode <TextureButton>("QuestionSelect/Question4"); question5Btn = GetNode <TextureButton>("QuestionSelect/Question5"); questionGroup = new ButtonGroup(); checkboxGroup = new ButtonGroup(); question1Btn.SetButtonGroup(questionGroup); question2Btn.SetButtonGroup(questionGroup); question3Btn.SetButtonGroup(questionGroup); question4Btn.SetButtonGroup(questionGroup); question5Btn.SetButtonGroup(questionGroup); checkbox1.SetButtonGroup(checkboxGroup); checkbox2.SetButtonGroup(checkboxGroup); checkbox3.SetButtonGroup(checkboxGroup); checkbox4.SetButtonGroup(checkboxGroup); checkbox1.SetPressed(true); questionTitleLine = GetNode <LineEdit>("QuestionTitle"); option1Line = GetNode <LineEdit>("Options/Option1"); option2Line = GetNode <LineEdit>("Options/Option2"); option3Line = GetNode <LineEdit>("Options/Option3"); option4Line = GetNode <LineEdit>("Options/Option4"); if (CreateLevelInit.updated == 0) { createLevelBL.InitializeQuestions(); } else { createLevelBL.ReloadTempQuestionList(); DisplayQuestion(); } }
/// <summary> /// Initialization /// </summary> public override void _Ready() { editLevelBL = new EditLevelBL(); questionNumberLabel = GetNode <Label>("QuestionNumberLabel"); errorMessageLabel = GetNode <Label>("ErrorMessageLabel"); checkbox1 = GetNode <CheckBox>("Options/Option1/CheckBox1"); checkbox2 = GetNode <CheckBox>("Options/Option2/CheckBox2"); checkbox3 = GetNode <CheckBox>("Options/Option3/CheckBox3"); checkbox4 = GetNode <CheckBox>("Options/Option4/CheckBox4"); question1Btn = GetNode <TextureButton>("QuestionSelect/Question1"); question2Btn = GetNode <TextureButton>("QuestionSelect/Question2"); question3Btn = GetNode <TextureButton>("QuestionSelect/Question3"); question4Btn = GetNode <TextureButton>("QuestionSelect/Question4"); question5Btn = GetNode <TextureButton>("QuestionSelect/Question5"); questionGroup = new ButtonGroup(); checkboxGroup = new ButtonGroup(); question1Btn.SetButtonGroup(questionGroup); question2Btn.SetButtonGroup(questionGroup); question3Btn.SetButtonGroup(questionGroup); question4Btn.SetButtonGroup(questionGroup); question5Btn.SetButtonGroup(questionGroup); checkbox1.SetButtonGroup(checkboxGroup); checkbox2.SetButtonGroup(checkboxGroup); checkbox3.SetButtonGroup(checkboxGroup); checkbox4.SetButtonGroup(checkboxGroup); questionTitleLine = GetNode <LineEdit>("QuestionTitle"); option1Line = GetNode <LineEdit>("Options/Option1"); option2Line = GetNode <LineEdit>("Options/Option2"); option3Line = GetNode <LineEdit>("Options/Option3"); option4Line = GetNode <LineEdit>("Options/Option4"); CustomLevel customLevelInfo = editLevelBL.LoadCustomLevelInfo(); DisplayQuestion(); }