设备连接界面微调&划船机本地记录过滤
This commit is contained in:
parent
e7af21b126
commit
d9848e4e9d
@ -3615,6 +3615,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 3a8eec0d4bf3f4841982794180df6e10, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
newNav: {fileID: 0}
|
||||
--- !u!222 &454099902603697846
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -4611,7 +4612,7 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: a38e5e467140caa4d9bd38fd08291bf7, type: 3}
|
||||
m_Sprite: {fileID: 21300000, guid: c8c6fdc9e45c8c246ba0619dbba0abdf, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
|
||||
@ -364,7 +364,8 @@
|
||||
"Minimum time is 20s.": "最低时间是20s!",
|
||||
"Please enter an integer between 0-59.": "请输入一个0-59的整数!",
|
||||
"Please check the network status!": "请检查网络连接是否正常!",
|
||||
"FINISH": "终点"
|
||||
"FINISH": "终点",
|
||||
"Continue the game?": "有中断的划船记录,是否继续?"
|
||||
},
|
||||
"en": {
|
||||
"HOT ROUTES": "HOT ROUTES",
|
||||
@ -723,6 +724,7 @@
|
||||
"Minimum time is 20s.": "Minimum time is 20s.",
|
||||
"Please enter an integer between 0-59.": "Please enter an integer between 0-59.",
|
||||
"Please check the network status!": "Please check if the network connection is normal!",
|
||||
"FINISH": "FINISH"
|
||||
"FINISH": "FINISH",
|
||||
"Continue the game?": "Continue the game?"
|
||||
}
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ namespace Assets.Scripts.UI.Control
|
||||
private Text text;
|
||||
//private Texture2D cursor;
|
||||
private Outline outline;
|
||||
private Button mButton;
|
||||
public Button mButton { get;set; }
|
||||
private Sequence se = null;
|
||||
private Sequence a;
|
||||
private TweenerCore<float, float, FloatOptions> b;
|
||||
|
||||
@ -238,6 +238,9 @@ public class ConnectDeviceModal : PFUIPanel
|
||||
// firstDevice = devicesTemp.FirstOrDefault(d=>d)
|
||||
//}
|
||||
}
|
||||
//如果没有可连接的设备按钮只读
|
||||
connectBtn.mButton.enabled = deviceList.Count > 0;
|
||||
connectBtn.mButton.interactable = deviceList.Count > 0;
|
||||
}
|
||||
}
|
||||
//选中需要连接的设备
|
||||
|
||||
@ -70,7 +70,7 @@ public class DeviceView : MonoBehaviour
|
||||
mSearchButton = unconnectionPanel.transform.Find("SearchButton").gameObject;
|
||||
mPairButton = unconnectionPanel.transform.Find("PairButton").gameObject;
|
||||
searchState = unconnectionPanel.transform.Find("SearchState").GetComponent<Text>();
|
||||
mPairButton.SetActive(false);
|
||||
//mPairButton.SetActive(false);
|
||||
connectionPanel = this.transform.Find("ConnectionPanel").gameObject;
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
unconnectionButton = unconnectionPanel.GetComponent<Button>();
|
||||
@ -307,7 +307,7 @@ public class DeviceView : MonoBehaviour
|
||||
#if !(UNITY_IOS || UNITY_ANDROID)
|
||||
mSearchButton.SetActive(true);
|
||||
#endif
|
||||
mPairButton.SetActive(false);
|
||||
//mPairButton.SetActive(false);
|
||||
}
|
||||
}
|
||||
else if(connectedDevice.State == DeviceState.Connecting)
|
||||
|
||||
@ -857,10 +857,14 @@ public class RowerHomeScript : PFUIPanel
|
||||
{
|
||||
try
|
||||
{
|
||||
var files = Directory.GetFiles(PFConstants.RowerRecordCacheFolder);
|
||||
if (files.Length > 0)
|
||||
var dir = $"{PFConstants.RowerRecordCacheFolder}/{App.CurrentUser.Id}/";
|
||||
var hasLocalData = Directory.Exists(dir);
|
||||
if (hasLocalData)
|
||||
{
|
||||
UIManager.ShowConfirm(App.GetLocalString("Warn"), App.GetLocalString("continue a game?"), () =>
|
||||
var files = Directory.GetFiles(dir);
|
||||
if (files.Length == 0)
|
||||
return;
|
||||
UIManager.ShowConfirm(App.GetLocalString("Warning"), App.GetLocalString("Continue the game?"), () =>
|
||||
{
|
||||
var str = File.ReadAllText(files[0]);
|
||||
var list = str.Replace("\r\n", " ").Split(' ');
|
||||
@ -894,7 +898,12 @@ public class RowerHomeScript : PFUIPanel
|
||||
{
|
||||
try
|
||||
{
|
||||
var path = $"{PFConstants.RowerRecordCacheFolder}/{Id}.txt";
|
||||
var dir = $"{PFConstants.RowerRecordCacheFolder}/{App.CurrentUser.Id}/";
|
||||
var path = $"{dir}/{Id}.txt";
|
||||
if (!Directory.Exists(dir))
|
||||
{
|
||||
Directory.CreateDirectory(dir);
|
||||
}
|
||||
File.WriteAllText(path, string.Join("\r\n", records));
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user