public override void enter() { //コマンドリスト生成 mCommandList = new MyCommandList(); //配置オブジェクト選択欄 mPlaceTggle = GameObject.Find("placeObjectToggle").GetComponent <ToggleButtonGroup>(); mPlaceTggle.memberPushed("note");//配置するオブジェクトの初期設定 //設定欄 mSettingForm = GameObject.Find("musicSettingForm").GetComponent <MusicSettingForm>(); mSettingForm.reset();//設定欄表示リセット //編集モードに即移行 parent.changeState(new EditState(parent)); }
public TabHeader(int tabCount = 2, bool multiSelect = false) { this.MultiSelect = multiSelect; this.Height = 16; this.TabCount = Math.Max(2, tabCount); for (int i = 0; i < this.TabCount; i++) { this.ColumnDefinitions.Add(1, GridUnitType.Star); } this.LabelStyle = new GUIStyle() { alignment = TextAnchor.MiddleCenter }; this.LabelStyle.normal.textColor = new Color(0.7f, 0.7f, 0.7f, 1); if (!multiSelect) { _Group = new ToggleButtonGroup(); } this._Toggles = new Skill.Editor.UI.ToggleButton[this.TabCount]; this._Labels = new Label[this.TabCount]; for (int i = 0; i < this.TabCount; i++) { _Toggles[i] = new Skill.Editor.UI.ToggleButton() { Row = 0, Column = i, Group = _Group }; _Labels[i] = new Skill.Framework.UI.Label() { Row = 0, Column = i, Style = LabelStyle }; this.Controls.Add(_Toggles[i]); this.Controls.Add(_Labels[i]); if (multiSelect) { _Toggles[i].Changed += TabHeader_Changed; } else { _Toggles[i].Checked += TabHeader_Checked; } } this._SelectedTab = -1; this.SelectedTab = 0; this._FirstTryLoadEditorStyle = false; }
private void Start() { if (mName == "") { mName = name; } else { name = mName; } if (transform.parent != null) { mParent = transform.parent.GetComponent <ToggleButtonGroup>(); } if (mPushedMessage == "") { mPushedMessage = mName + "Pushed"; } }
public ChannelProgrammPage(ChannelProgramData channelProgram, ChannelPage parentChannelPage, bool isMasterChannel) : base("div") { const int labelSize = 235; _channelProgram = channelProgram; _parentChannelPage = parentChannelPage; #region Initialize Grid Grid grid = new Grid(this); grid.AddStyling(StylingOption.MarginRight, 2); grid.AddStyling(StylingOption.MarginLeft, 2); grid.AddStyling(StylingOption.MarginTop, 2); grid.AddStyling(StylingOption.MarginBottom, 2); #endregion Initialize Grid #region TextInputGroup ProgrammName _programmNameInputGroup = new TextInputGroup("ProgrammName", "N/A", labelSize, centeredText: true); _programmNameInputGroup.AddStyling(StylingOption.MarginBottom, 2); _programmNameInputGroup.TextInput.Value = channelProgram.Name; _deleteProgrammButton = new MyOoui.HtmlElements.Button(StylingColor.Danger, asOutline: true, text: "Programm Löschen", fontAwesomeIcon: "trash"); _deleteProgrammButton.Click += DeleteProgrammButtonOnClick; _programmNameInputGroup.AddFormElement(_deleteProgrammButton); grid.AddRow().AppendCollum(_programmNameInputGroup); #endregion TextInputGroup ProgrammName #region InputGroup > TwoStateButtonGroup ProgrammStatus MultiInputGroup programmEnabledMultiInputGroup = new MultiInputGroup(); programmEnabledMultiInputGroup.AppendLabel("Programmstatus", labelSize); programmEnabledMultiInputGroup.AddStyling(StylingOption.MarginBottom, 2); _programmEnabled = programmEnabledMultiInputGroup.AppendCustomElement(new TwoStateButtonGroup("Aktiv", "Inaktiv", channelProgram.Enabled, !channelProgram.Enabled), false); grid.AddRow().AppendCollum(programmEnabledMultiInputGroup, autoSize: true); #endregion InputGroup > TwoStateButtonGroup ProgrammStatus #region TextInputGroup StartZeit _startTimeInputGroup = new TextInputGroup("StartZeit", "N/A", labelSize, "", "Das angegebene Zeitformat passt nicht. Bitte Zeiten im Format hh:mm:ss angeben."); _startTimeInputGroup.AddStyling(StylingOption.MarginBottom, 2); _startTimeInputGroup.TextInput.Value = channelProgram.StartTime.ToString(); grid.AddRow().AppendCollum(_startTimeInputGroup); #endregion TextInputGroup StartZeit #region TextInputGroup Dauer _durationInputGroup = new TextInputGroup("Dauer", "N/A", labelSize, "", "Das angegebene Zeitformat passt nicht. Bitte Zeiten im Format hh:mm:ss angeben."); _durationInputGroup.AddStyling(StylingOption.MarginBottom, 2); _durationInputGroup.TextInput.Value = channelProgram.Duration.ToString(); grid.AddRow().AppendCollum(_durationInputGroup); #endregion TextInputGroup Dauer #region Row Declaration Row downRow = new Row(); grid.AddRow().AppendCollum(downRow); Row weekDaysRow = new Row(); downRow.AppendCollum(weekDaysRow, sizing: 4); Row otherRow = new Row(); downRow.AppendCollum(otherRow, sizing: 8); #endregion Row Declaration #region Weekdays _weekdaysMoMiFrRadioButtonLabeledInputGroup = new RadioButtonLabeledInputGroup(GetCheckedWeekdays(channelProgram.ChoosenWeekdays) == 1, "Mo, Mi, Fr"); //_weekdaysMoMiFrRadioButtonLabeledInputGroup.AddStyling(StylingOption.MarginBottom, 2); _weekdaysMoMiFrRadioButtonLabeledInputGroup.AddStyling(StylingOption.MarginLeft, 2); weekDaysRow.AppendCollum(_weekdaysMoMiFrRadioButtonLabeledInputGroup); weekDaysRow.AddNewLine(); _weekdaysDiDoRadioButtonLabeledInputGroup = new RadioButtonLabeledInputGroup(GetCheckedWeekdays(channelProgram.ChoosenWeekdays) == 2, "Di, Do", _weekdaysMoMiFrRadioButtonLabeledInputGroup.RadioButtonGroupName); //_weekdaysDiDoRadioButtonLabeledInputGroup.AddStyling(StylingOption.MarginBottom, 2); _weekdaysDiDoRadioButtonLabeledInputGroup.AddStyling(StylingOption.MarginLeft, 2); weekDaysRow.AppendCollum(_weekdaysDiDoRadioButtonLabeledInputGroup); weekDaysRow.AddNewLine(); _weekdaysSaSoRadioButtonLabeledInputGroup = new RadioButtonLabeledInputGroup(GetCheckedWeekdays(channelProgram.ChoosenWeekdays) == 3, "Sa, So", _weekdaysMoMiFrRadioButtonLabeledInputGroup.RadioButtonGroupName); //_weekdaysSaSoRadioButtonLabeledInputGroup.AddStyling(StylingOption.MarginBottom, 2); _weekdaysSaSoRadioButtonLabeledInputGroup.AddStyling(StylingOption.MarginLeft, 2); weekDaysRow.AppendCollum(_weekdaysSaSoRadioButtonLabeledInputGroup); weekDaysRow.AddNewLine(); _weekdaysChoosenToggleButtonGroup = new ToggleButtonGroup(StylingColor.Primary, StylingColor.Secondary); _weekdaysChoosenToggleButtonGroup.AddToggleButton("Mo", (channelProgram.ChoosenWeekdays & ChannelProgramData.Weekdays.Montag) == ChannelProgramData.Weekdays.Montag); _weekdaysChoosenToggleButtonGroup.AddToggleButton("Di", (channelProgram.ChoosenWeekdays & ChannelProgramData.Weekdays.Dienstag) == ChannelProgramData.Weekdays.Dienstag); _weekdaysChoosenToggleButtonGroup.AddToggleButton("Mi", (channelProgram.ChoosenWeekdays & ChannelProgramData.Weekdays.Mittwoch) == ChannelProgramData.Weekdays.Mittwoch); _weekdaysChoosenToggleButtonGroup.AddToggleButton("Do", (channelProgram.ChoosenWeekdays & ChannelProgramData.Weekdays.Donnerstag) == ChannelProgramData.Weekdays.Donnerstag); _weekdaysChoosenToggleButtonGroup.AddToggleButton("Fr", (channelProgram.ChoosenWeekdays & ChannelProgramData.Weekdays.Freitag) == ChannelProgramData.Weekdays.Freitag); _weekdaysChoosenToggleButtonGroup.AddToggleButton("Sa", (channelProgram.ChoosenWeekdays & ChannelProgramData.Weekdays.Samstag) == ChannelProgramData.Weekdays.Samstag); _weekdaysChoosenToggleButtonGroup.AddToggleButton("So", (channelProgram.ChoosenWeekdays & ChannelProgramData.Weekdays.Sonntag) == ChannelProgramData.Weekdays.Sonntag); _weekDaysChoosenRadioButtonInputGroup = new RadioButtonInputGroup(GetCheckedWeekdays(channelProgram.ChoosenWeekdays) == 4, _weekdaysChoosenToggleButtonGroup, _weekdaysMoMiFrRadioButtonLabeledInputGroup.RadioButtonGroupName, false); _weekDaysChoosenRadioButtonInputGroup.AddStyling(StylingOption.MarginLeft, 2); grid.AddRow().AppendCollum(_weekDaysChoosenRadioButtonInputGroup, autoSize: true); #endregion Weekdays #region InputGroup > TwoStateButtonGroup WetterInfos MultiInputGroup weatherEnabledMultiInputGroup = new MultiInputGroup(); weatherEnabledMultiInputGroup.AppendLabel("WetterInfos verwenden", labelSize); weatherEnabledMultiInputGroup.AddStyling(StylingOption.MarginBottom, 2); _weatherInfo = weatherEnabledMultiInputGroup.AppendCustomElement(new TwoStateButtonGroup("Aktiv", "Inaktiv", channelProgram.ActivateWeatherInfo, !channelProgram.ActivateWeatherInfo), false); otherRow.AppendCollum(weatherEnabledMultiInputGroup, autoSize: true); #endregion InputGroup > TwoStateButtonGroup WetterInfos otherRow.AddNewLine(); #region InputGroup > TwoStateButtonGroup Master Kanal MultiInputGroup activateMasterMultiInputGroup = new MultiInputGroup(); activateMasterMultiInputGroup.AppendLabel("Master Kanal auch Einschalten", labelSize); _activateMasterChannel = activateMasterMultiInputGroup.AppendCustomElement(new TwoStateButtonGroup("Aktiv", "Inaktiv", channelProgram.EnableMasterChannel, !channelProgram.EnableMasterChannel), false); otherRow.AppendCollum(activateMasterMultiInputGroup, autoSize: true); #endregion InputGroup > TwoStateButtonGroup Master Kanal #region TextAreaInputGroup Notizen _descriptionInputGroup = new TextAreaInputGroup("Notizen", "", labelSize); _descriptionInputGroup.AddStyling(StylingOption.MarginBottom, 2); _descriptionInputGroup.AddStyling(StylingOption.MarginTop, 2); _descriptionInputGroup.TextArea.Value = channelProgram.Description; grid.AddRow().AppendCollum(_descriptionInputGroup); #endregion TextAreaInputGroup Notizen if (isMasterChannel) { _activateMasterChannel.IsDisabled = true; } }
public void Init(ToggleButtonGroup group) { Group = group; Group.AddButton(this); }