public void DirectMessage(string body) { var formatted = String.Format(body, this.User.ScreenName, this.User.Name); InputModel.InputCore.SetText(InputSetting.CreateDirectMessage( this.Model.GetSuitableReplyAccount(), this.Status.User, formatted)); }
private void Awake() { gameStageData = GameFacade.GetInstance().gameStageData; inputSetting = GameFacade.GetInstance().inputSetting; playerBehaviour = GetComponent <PlayerBehaviour>(); }
public void Init(InputSetting inputSetData, UnityAction onButton) { mKeyName.SetText(inputSetData.Type); mText.SetText(inputSetData.Key); mButton.RemoveAllCallback(); mButton.AddCallback(onButton); }
public void Load(BinaryReader _reader) { try { int num1 = _reader.ReadInt32(); for (int index1 = 0; index1 < num1; ++index1) { string _controllerName = _reader.ReadString(); ControllerType _controllerType = (ControllerType)_reader.ReadInt32(); int num2 = _reader.ReadInt32(); this.DeleteControllerSetting(_controllerType, _controllerName); ControllerSetting controllerSetting = new ControllerSetting(_controllerName, _controllerType); for (int index2 = 0; index2 < num2; ++index2) { InputSetting _inputSetting = new InputSetting(_reader.ReadInt32(), _reader.ReadInt32(), (ControllerType)_reader.ReadInt32(), (ControllerElementType)_reader.ReadInt32(), _reader.ReadInt32(), (AxisRange)_reader.ReadInt32(), (KeyCode)_reader.ReadInt32(), (ModifierKeyFlags)_reader.ReadInt32(), _reader.ReadInt32(), (Pole)_reader.ReadInt32(), _reader.ReadBoolean(), _reader.ReadInt32()); controllerSetting.AddElement(_inputSetting); } this.controllerList.Add(controllerSetting); } Debug.Log((object)"ロードに成功しました:Load(BinaryReader _reader)"); } catch (Exception ex) { Debug.LogException(ex); } }
private void Reply() { if (this.IsSelected) { this.Parent.ReplySelecteds(); return; } InputModel.InputCore.SetText(InputSetting.CreateReply(this.Status)); }
/// <summary> /// 储存当前配置到存档文件 /// </summary> public static void SaveSettings() { InputSetting setting = new InputSetting(); setting.SaveKeymap = CurrrentKeymap; SaveManager settingSaved = new SaveManager(Application.persistentDataPath, "InputSetting.save"); settingSaved.SetData(setting); }
private void Awake() { m_InputSetting = new InputSetting(); m_InputSetting.Player.SetCallbacks(this); for (int i = 0; i < 10; ++i) { m_NumberKeyEvent.Add(new List <Action <InputActionPhase> >()); } }
private void SetupInputManager(GridEditableItem editableItem) { // style and set URL column's textbox as required var textBox = ((GridTextBoxColumnEditor)editableItem.EditManager.GetColumnEditor("URL")).TextBoxControl; InputSetting inputSetting = RadInputManager1.GetSettingByBehaviorID("TextBoxSetting1"); inputSetting.TargetControls.Add(new TargetInput(textBox.UniqueID, true)); inputSetting.InitializeOnClient = true; inputSetting.Validation.IsRequired = true; }
public MainForm() { // 初始化UI的界面 InitializeComponent(); // 读取UI设置 InputSetting inputSetting = new InputSetting(); inputSetting.ReadSettingFromFile(); // 设置UI文字 SetUIString(); }
public void ReplySelecteds() { var users = SelectedStatuses .Select(s => "@" + s.User.ScreenName) .Distinct() .JoinString(" "); var accs = CurrentAccounts.Select(id => Setting.Accounts.Get(id)) .Where(a => a != null) .ToArray(); InputModel.InputCore.SetText(InputSetting.Create(accs, users + " ")); DeselectAll(); }
public void QuotePermalink() { if (IsDirectMessage) { // disable on direct messages return; } var setting = InputSetting.Create(this.Model.GetSuitableReplyAccount(), " " + this.Status.Permalink); setting.CursorPosition = CursorPosition.Begin; InputModel.InputCore.SetText(setting); }
public void Quote() { if (IsDirectMessage) { // disable on direct messages return; } var setting = InputSetting.CreateReply(this.Status, " RT @" + this.User.ScreenName + ": " + this.Status.GetEntityAidedText(true), false); setting.CursorPosition = CursorPosition.Begin; InputModel.InputCore.SetText(setting); }
/// <summary> /// 从存档文件中读取配置 /// </summary> public static void LoadSettings() { InputSetting setting = new InputSetting(); SaveManager settingSaved = new SaveManager(Application.persistentDataPath, "InputSetting.save"); settingSaved.GetData(ref setting); if (setting.SaveKeymap.Keys.Count == DefaultKeymap.Keys.Count) { CurrrentKeymap = setting.SaveKeymap; } else { throw new System.ArrayTypeMismatchException("The saved key functions mismatch current key functions"); } }
private void Reply(string body) { // from key assign if (String.IsNullOrEmpty(body)) { this.Reply(); return; } try { var formatted = String.Format(body, this.User.ScreenName, this.User.Name); InputModel.InputCore.SetText(InputSetting.CreateReply(this.Status, formatted, false)); } catch (Exception ex) { BackstageModel.RegisterEvent(new OperationFailedEvent("返信フォーマット エラー(フォーマット: " + body + ")", ex)); } }
void _InitItems() { mItemRoot.DestroyAllChild(); mInputSettings.ForEach(setData => { mSetItemTem .Instantiate() .Parent(mItemRoot) .LocalIdentity() .ApplySelfTo(setItem => { setItem.Init(setData, new UnityEngine.Events.UnityAction(() => { mSelInputItem = setItem; mSelInputData = setData; })); }).Show(); }); }
public void UpdateView(InputSetting inputSetData) { mKeyName.SetText(inputSetData.Type); mText.SetText(inputSetData.Key); }
public void SetTextToInputBox() { InputModel.InputCore.SetText(InputSetting.Create(SelectedText)); }
public void AddElement(InputSetting _inputSetting) { this.elements.Add(_inputSetting); }
public ComboInput(InputSetting _input) { input = _input; }
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { InputInfoElement pDrawTarget = EditorCodeHelper.GetTargetObjectOfProperty(property) as InputInfoElement; position.height = EditorCodeHelper.singleLineHeight; property.isExpanded = EditorGUI.Foldout(position, property.isExpanded, "Input: " + pDrawTarget.IRelateByOther_GetDisplayName()); if (property.isExpanded == false) { return; } position.y += EditorCodeHelper.singleLineHeight; EditorCodeHelper.PropertyField(position, property.FindPropertyRelative(nameof(pDrawTarget.eInputInfoType)), "InputType"); position.y += EditorCodeHelper.singleLineHeight; if (pDrawTarget.eInputInfoType == InputInfoElement.EInputInfoType.GetAxis) { var listInput = InputSetting.GetInput_ValueDropDownList(); pDrawTarget.strInputAxisName = EditorCodeHelper.DrawEnumPopup(position, "Select Input", pDrawTarget.strInputAxisName, listInput); position.y += EditorCodeHelper.singleLineHeight; } else if (pDrawTarget.IsMouseInput()) { EditorCodeHelper.PropertyField(position, property.FindPropertyRelative(nameof(pDrawTarget.eMouseButtonType)), "Mouse"); position.y += EditorCodeHelper.singleLineHeight; } else { float fOriginX = position.x; float fOriginWidth = position.width; position.width *= 0.5f; position.x += position.width; var pKeyCodeProperty = property.FindPropertyRelative(nameof(pDrawTarget.eKeyCode)); if (pKeyCodeProperty.isExpanded) // Is Recording.. { if (UpdateKeyCode(property, pDrawTarget)) { pKeyCodeProperty.isExpanded = false; } if (GUI.Button(position, "Cancel Recording..")) { pKeyCodeProperty.isExpanded = false; } } else { if (GUI.Button(position, "Record KeyCode")) { pKeyCodeProperty.isExpanded = true; } } position.x = fOriginX; position.width = fOriginWidth; position.y += EditorCodeHelper.singleLineHeight; pKeyCodeProperty.intValue = (int)pDrawTarget.eKeyCode; EditorCodeHelper.PropertyField(position, pKeyCodeProperty, "KeyCode"); position.y += EditorCodeHelper.singleLineHeight; } EditorCodeHelper.PropertyField(position, property.FindPropertyRelative(nameof(pDrawTarget.bAlwaysInput)), "Is Always Input"); position.y += EditorCodeHelper.singleLineHeight; }
public void DirectMessage() { InputModel.InputCore.SetText( InputSetting.CreateDirectMessage(this.Model.GetSuitableReplyAccount(), this.Status.User)); }