1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- using System;
- using System.Collections.Generic;
- using UnityEngine;
- public class MessagEditWindow : BaseMaidPhotoWindow
- {
- public override void Awake()
- {
- base.Awake();
- EventDelegate.Add(this.NameInput.onChange, new EventDelegate.Callback(this.OnChangeValueName));
- EventDelegate.Add(this.TextInput.onChange, new EventDelegate.Callback(this.OnChangeValueText));
- this.VisibleCheckBox.onClick.Add(delegate(WFCheckBox check_box)
- {
- Dictionary<string, string> dictionary = base.GetWoldStoreData()["メッセージウィンドウ"];
- dictionary["visible"] = check_box.check.ToString();
- this.MessageViewer.SetActive(check_box.check);
- });
- this.UpdateChildren();
- }
- public override void Start()
- {
- base.Start();
- this.Init();
- }
- public void Init()
- {
- Dictionary<string, Dictionary<string, string>> woldStoreData = base.GetWoldStoreData();
- if (!woldStoreData.ContainsKey("メッセージウィンドウ"))
- {
- woldStoreData["メッセージウィンドウ"] = new Dictionary<string, string>();
- woldStoreData["メッセージウィンドウ"]["visible"] = false.ToString();
- woldStoreData["メッセージウィンドウ"]["name"] = string.Empty;
- woldStoreData["メッセージウィンドウ"]["text"] = string.Empty;
- }
- Dictionary<string, string> dictionary = woldStoreData["メッセージウィンドウ"];
- this.MessageViewer.SetActive(bool.Parse(dictionary["visible"]));
- this.VisibleCheckBox.check = bool.Parse(dictionary["visible"]);
- this.NameInput.value = dictionary["name"];
- this.TextInput.value = dictionary["text"];
- }
- public void OnChangeValueName()
- {
- this.NameLabel.text = this.NameInput.value;
- Dictionary<string, string> dictionary = base.GetWoldStoreData()["メッセージウィンドウ"];
- dictionary["name"] = this.NameLabel.text;
- }
- public void OnChangeValueText()
- {
- this.TextLabel.text = this.TextInput.value;
- Dictionary<string, string> dictionary = base.GetWoldStoreData()["メッセージウィンドウ"];
- dictionary["text"] = this.TextLabel.text;
- }
- public override void OnDeserializeEvent()
- {
- this.Init();
- }
- public new PhotoWindowManager mgr
- {
- get
- {
- return base.mgr;
- }
- }
- public WFCheckBox VisibleCheckBox;
- public UIInput NameInput;
- public UIInput TextInput;
- public GameObject MessageViewer;
- public UILabel NameLabel;
- public UILabel TextLabel;
- private UIWFTabPanel tab_panel_;
- private UIScrollView scroll_view_;
- }
|