首次提交
This commit is contained in:
25
Assets/Scripts/UI/Common/Button/BtnInputControl.Designer.cs
generated
Normal file
25
Assets/Scripts/UI/Common/Button/BtnInputControl.Designer.cs
generated
Normal file
@@ -0,0 +1,25 @@
|
||||
/**本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
|
||||
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class BtnInputControl
|
||||
{
|
||||
public const string URL = "ui://6hgkvlaur03ut";
|
||||
|
||||
public Controller show;
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
show = GetController("show");
|
||||
OnInited();
|
||||
UILanguage.TrySetComponentLanguage(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dfab5a485e648254dad616e988d7a17e
|
||||
15
Assets/Scripts/UI/Common/Button/BtnInputControl.cs
Normal file
15
Assets/Scripts/UI/Common/Button/BtnInputControl.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
|
||||
|
||||
using UnityEngine;
|
||||
using FairyGUI;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class BtnInputControl : BtnInputControlBase
|
||||
{
|
||||
private void OnInited()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Common/Button/BtnInputControl.cs.meta
Normal file
2
Assets/Scripts/UI/Common/Button/BtnInputControl.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9bc3045114c90ef4888ae8cd51aa1e2e
|
||||
28
Assets/Scripts/UI/Common/Button/BtnInputControlBase.cs
Normal file
28
Assets/Scripts/UI/Common/Button/BtnInputControlBase.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using FairyGUI;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public abstract class BtnInputControlBase : GButton
|
||||
{
|
||||
public string ActionName;
|
||||
public string ShowName;
|
||||
|
||||
public virtual void SetData(string actionName, string showName, string map = InputManager.InputMapUI)
|
||||
{
|
||||
this.ActionName = actionName;
|
||||
this.ShowName = showName;
|
||||
if (!string.IsNullOrEmpty(showName))
|
||||
{
|
||||
title = Lan.Get(showName);
|
||||
}
|
||||
else
|
||||
{
|
||||
title = Lan.Get(actionName);
|
||||
}
|
||||
|
||||
var iconName = InputManager.Instance.GetInputIcon(map, ActionName);
|
||||
icon = UIPackage.GetItemURL(UIDef.Pack.Common, iconName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4da865139cbb401a91f63bcf30d233c4
|
||||
timeCreated: 1769960386
|
||||
27
Assets/Scripts/UI/Common/Button/BtnInputName.Designer.cs
generated
Normal file
27
Assets/Scripts/UI/Common/Button/BtnInputName.Designer.cs
generated
Normal file
@@ -0,0 +1,27 @@
|
||||
/**本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
|
||||
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class BtnInputName
|
||||
{
|
||||
public const string URL = "ui://6hgkvlaumnqhz2";
|
||||
|
||||
public Controller styleCtrl;
|
||||
public Transition start;
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
styleCtrl = GetController("styleCtrl");
|
||||
start = GetTransition("start");
|
||||
OnInited();
|
||||
UILanguage.TrySetComponentLanguage(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3bbc263e9355f5144b0b4a6989f72c05
|
||||
40
Assets/Scripts/UI/Common/Button/BtnInputName.cs
Normal file
40
Assets/Scripts/UI/Common/Button/BtnInputName.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
|
||||
|
||||
using UnityEngine;
|
||||
using FairyGUI;
|
||||
using NBC;
|
||||
using NBF.Setting;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class BtnInputName : GButton
|
||||
{
|
||||
// private InputAction _inputAction;
|
||||
private KeyBoardOption _keyBoardOption;
|
||||
private int _index;
|
||||
|
||||
private void OnInited()
|
||||
{
|
||||
}
|
||||
|
||||
public void SetData(int index, KeyBoardOption boardOption)
|
||||
{
|
||||
_index = index;
|
||||
_keyBoardOption = boardOption;
|
||||
// _inputAction = inputAction;
|
||||
|
||||
|
||||
var bindings = boardOption.InputAction.bindings;
|
||||
|
||||
if (bindings.Count > index)
|
||||
{
|
||||
title = boardOption.GetDisplayString(); //boardOption.InputAction.GetBindingDisplayString(index);
|
||||
}
|
||||
else
|
||||
{
|
||||
title = "未绑定";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Common/Button/BtnInputName.cs.meta
Normal file
2
Assets/Scripts/UI/Common/Button/BtnInputName.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5046c80b3e704c94886c9c81b9da0f2b
|
||||
25
Assets/Scripts/UI/Common/Button/BtnTitleInputControl.Designer.cs
generated
Normal file
25
Assets/Scripts/UI/Common/Button/BtnTitleInputControl.Designer.cs
generated
Normal file
@@ -0,0 +1,25 @@
|
||||
/**本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
|
||||
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class BtnTitleInputControl
|
||||
{
|
||||
public const string URL = "ui://6hgkvlaur03uj0";
|
||||
|
||||
public Controller style;
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
style = GetController("style");
|
||||
OnInited();
|
||||
UILanguage.TrySetComponentLanguage(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3a4cdcb09978fcd47b043fa05e53e433
|
||||
16
Assets/Scripts/UI/Common/Button/BtnTitleInputControl.cs
Normal file
16
Assets/Scripts/UI/Common/Button/BtnTitleInputControl.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
|
||||
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using FairyGUI;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class BtnTitleInputControl : BtnInputControlBase
|
||||
{
|
||||
private void OnInited()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 15ebd24da667f9146bc2cfbfec56a512
|
||||
Reference in New Issue
Block a user