Skip to content

Commit

Permalink
Fixed a bug in Loxodon.Framework.TextUGUI.asmdef
Browse files Browse the repository at this point in the history
Fixed the issue that lua files could not be read due to UTF8 BOM.
  • Loading branch information
Clark committed Jul 12, 2024
1 parent a5ce406 commit 5750d5f
Show file tree
Hide file tree
Showing 81 changed files with 1,713 additions and 340 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.vovgou.loxodon-framework-addressable",
"displayName": "Loxodon Framework Addressable",
"version": "2.6.5",
"version": "2.6.6",
"unity": "2018.4",
"description": "This is a plugin that uses Unity's addressable asset system to load resources.",
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.vovgou.loxodon-framework-connection",
"displayName": "Loxodon Framework Connection",
"version": "2.6.5",
"version": "2.6.6",
"unity": "2018.4",
"description": "This is a network component, using TCP protocol to connect to the server by default.",
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.vovgou.loxodon-framework-data-litedb",
"displayName": "Loxodon Framework Data LiteDB",
"version": "2.6.5",
"version": "2.6.6",
"unity": "2018.4",
"description": "LoxodonFramework is a lightweight MVVM(Model-View-ViewModel) framework built specifically to target Unity3D. Databinding and localization are supported.It has a very flexible extensibility.It makes your game development faster and easier.\n\nFor tutorials,examples and support,please see the project.You can also discuss the project in the Unity Forums.\n\nThe plugin is compatible with MacOSX,Windows,Linux,UWP,IOS and Android,and provides all the source code of the project.",
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.vovgou.loxodon-framework-data-newtonsoft",
"displayName": "Loxodon Framework Data Newtonsoft.JSON",
"version": "2.6.5",
"version": "2.6.6",
"unity": "2018.4",
"description": "LoxodonFramework is a lightweight MVVM(Model-View-ViewModel) framework built specifically to target Unity3D. Databinding and localization are supported.It has a very flexible extensibility.It makes your game development faster and easier.\n\nFor tutorials,examples and support,please see the project.You can also discuss the project in the Unity Forums.\n\nThe plugin is compatible with MacOSX,Windows,Linux,UWP,IOS and Android,and provides all the source code of the project.",
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.vovgou.loxodon-framework-data",
"displayName": "Loxodon Framework Data",
"version": "2.6.5",
"version": "2.6.6",
"unity": "2018.4",
"description": "LoxodonFramework is a lightweight MVVM(Model-View-ViewModel) framework built specifically to target Unity3D. Databinding and localization are supported.It has a very flexible extensibility.It makes your game development faster and easier.\n\nFor tutorials,examples and support,please see the project.You can also discuss the project in the Unity Forums.\n\nThe plugin is compatible with MacOSX,Windows,Linux,UWP,IOS and Android,and provides all the source code of the project.",
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.vovgou.loxodon-framework-fgui",
"displayName": "Loxodon Framework FairyGUI",
"version": "2.6.5",
"version": "2.6.6",
"unity": "2018.4",
"description": "",
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.vovgou.loxodon-framework-fody-bindingproxy",
"displayName": "Loxodon Framework Fody BindingProxy",
"version": "2.6.5",
"version": "2.6.6",
"unity": "2018.4",
"description": "This is a plugin for static weaving code that integrates BindingProxy.Fody into a Unity project.",
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.vovgou.loxodon-framework-fody-propertychanged",
"displayName": "Loxodon Framework Fody PropertyChanged",
"version": "2.6.5",
"version": "2.6.6",
"unity": "2018.4",
"description": "This is a plugin for static weaving code that integrates PropertyChanged.Fody into a Unity project, it can inject code which raises the PropertyChanged event into property setters of classes which implement INotifyPropertyChanged.",
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.vovgou.loxodon-framework-fody-tostring",
"displayName": "Loxodon Framework Fody ToString",
"version": "2.6.5",
"version": "2.6.6",
"unity": "2018.4",
"description": "This is a plugin for static weaving code that integrates ToString.Fody into a Unity project.",
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.vovgou.loxodon-framework-fody",
"displayName": "Loxodon Framework Fody",
"version": "2.6.5",
"version": "2.6.6",
"unity": "2018.4",
"description": "This is a plugin for static weaving code that integrates Fody into a Unity project.",
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.vovgou.loxodon-framework-ilruntime",
"displayName": "Loxodon Framework ILRuntime",
"version": "2.6.5",
"version": "2.6.6",
"unity": "2018.4",
"description": "ILRuntime",
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.vovgou.loxodon-framework-localization-csv",
"displayName": "Loxodon Framework Localization CSV",
"version": "2.6.5",
"version": "2.6.6",
"unity": "2018.4",
"description": "This is a plugin for the Loxodon.Framework, which supports reading localized resources from csv files.",
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.vovgou.loxodon-framework-log4net",
"displayName": "Loxodon Framework Log4Net",
"version": "2.6.5",
"version": "2.6.6",
"unity": "2018.4",
"description": "This is a plugin for the logging feature of Loxodon.Framework, which helps you use Log4Net in your Unity project.",
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.vovgou.loxodon-framework-nlog",
"displayName": "Loxodon Framework NLog",
"version": "2.6.5",
"version": "2.6.6",
"unity": "2018.4",
"description": "This is a plugin for the logging feature of Loxodon.Framework, which helps you use NLog in your Unity project.",
"license": "MIT",
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -1158,6 +1158,7 @@ GameObject:
- component: {fileID: 1259509741}
- component: {fileID: 1259509740}
- component: {fileID: 1259509738}
- component: {fileID: 1259509739}
m_Layer: 5
m_Name: GridView
m_TagString: Untagged
Expand Down Expand Up @@ -1272,6 +1273,18 @@ MonoBehaviour:
_CellHeightForceExpandInGroup: 0
contentPanelEndEdgeStationary: 0
keepVelocity: 0
--- !u!114 &1259509739
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1259509736}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 70741ba1a79bf7c448fd1b7ef035b198, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &1259509740
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1427,6 +1440,7 @@ MonoBehaviour:
border: {fileID: 1719219348}
selectButton: {fileID: 1991756267}
clickButton: {fileID: 0}
eventBehaviour: {fileID: 1259509739}
--- !u!114 &1376114102
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ GameObject:
- component: {fileID: 25762547}
- component: {fileID: 25762549}
- component: {fileID: 25762545}
- component: {fileID: 25762546}
m_Layer: 5
m_Name: ListView
m_TagString: Untagged
Expand Down Expand Up @@ -234,6 +235,18 @@ MonoBehaviour:
m_Calls: []
m_TypeName: Com.TheFallenGames.OSA.Util.PullToRefresh.PullToRefreshBehaviour+UnityEventFloat,
OSA, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
--- !u!114 &25762546
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 25762543}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 70741ba1a79bf7c448fd1b7ef035b198, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &25762547
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -4307,6 +4320,7 @@ MonoBehaviour:
border: {fileID: 324259011}
selectButton: {fileID: 1990119469}
clickButton: {fileID: 842416022}
eventBehaviour: {fileID: 25762546}
--- !u!1 &2020271446
GameObject:
m_ObjectHideFlags: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ public GridViewExampleViewModel()
this.items = this.CreateItems(3);
}

public SimpleCommand<ItemViewModel> ItemSelectCommand { get { return this.itemSelectCommand; } }

public ObservableList<ItemViewModel> Items
{
get { return this.items; }
Expand Down Expand Up @@ -112,7 +114,7 @@ private ObservableList<ItemViewModel> CreateItems(int count)

private ItemViewModel CreateItem()
{
return new ItemViewModel(this.itemSelectCommand)
return new ItemViewModel()
{
Title = "Item #" + (id++),
};
Expand Down Expand Up @@ -143,6 +145,7 @@ private void Start()
bindingSet.Bind(moveButton).For(v => v.onClick).To(vm => vm.MoveItem);
bindingSet.Bind(resetButton).For(v => v.onClick).To(vm => vm.ResetItem);
bindingSet.Bind(gridView).For(v => v.Items).To(vm => vm.Items);
bindingSet.Bind(gridView.GetComponent<ItemButtonEventBehaviour>()).For(v => v.OnSelected).To(vm => vm.ItemSelectCommand);
bindingSet.Build();

this.SetDataContext(new GridViewExampleViewModel());
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* MIT License
*
* Copyright (c) 2018 Clark Yang
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

using System;
using UnityEngine;
using UnityEngine.Events;
namespace Loxodon.Framework.Tutorials.OSA
{
public class ItemButtonEventBehaviour : MonoBehaviour
{
[Serializable]
public class SelectedEvent : UnityEvent<ItemViewModel>
{
}

[Serializable]
public class ClickEvent : UnityEvent<ItemViewModel>
{
}

public readonly SelectedEvent OnSelected = new SelectedEvent();

public readonly ClickEvent OnClick = new ClickEvent();
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,33 @@ public class ItemView : UIView
public Image border;
public Button selectButton;
public Button clickButton;
public ItemButtonEventBehaviour eventBehaviour;
protected override void Start()
{
BindingSet<ItemView, ItemViewModel> bindingSet = this.CreateBindingSet<ItemView, ItemViewModel>();
bindingSet.Bind(this.titleText).For(v => v.text).To(vm => vm.Title).OneWay();
bindingSet.Bind(this.background).For(v => v.color).To(vm => vm.Color).OneWay();
bindingSet.Bind(this.border).For(v => v.enabled).To(vm => vm.Selected).OneWay();
bindingSet.Bind(this.selectButton).For(v => v.onClick).To(vm => vm.SelectCommand).CommandParameter(this.GetDataContext);
if (this.clickButton != null)
bindingSet.Bind(this.clickButton).For(v => v.onClick).To(vm => vm.ClickCommand).CommandParameter(this.GetDataContext);
//bindingSet.Bind(this.selectButton).For(v => v.onClick).To(vm => vm.SelectCommand).CommandParameter(this.GetDataContext);
//if (this.clickButton != null)
// bindingSet.Bind(this.clickButton).For(v => v.onClick).To(vm => vm.ClickCommand).CommandParameter(this.GetDataContext);
bindingSet.Build();

if (this.selectButton != null)
this.selectButton.onClick.AddListener(this.OnSelected);

if (this.clickButton != null)
this.clickButton.onClick.AddListener(this.OnClick);
}

protected void OnSelected()
{
eventBehaviour.OnSelected.Invoke((ItemViewModel)this.GetDataContext());
}

protected void OnClick()
{
eventBehaviour.OnClick.Invoke((ItemViewModel)this.GetDataContext());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,36 +33,36 @@ public class ItemViewModel : ObservableObject
private string title;
private Color color;
private bool selected = false;
private ICommand clickCommand;
private ICommand selectCommand;
//private ICommand clickCommand;
//private ICommand selectCommand;

public ItemViewModel()
{
this.color = GetRandomColor();
}

public ItemViewModel(ICommand selectCommand)
{
this.selectCommand = selectCommand;
this.color = GetRandomColor();
}
//public ItemViewModel(ICommand selectCommand)
//{
// this.selectCommand = selectCommand;
// this.color = GetRandomColor();
//}
//
//public ItemViewModel(ICommand selectCommand, ICommand clickCommand)
//{
// this.selectCommand = selectCommand;
// this.clickCommand = clickCommand;
// this.color = GetRandomColor();
//}
//
//public ICommand ClickCommand
//{
// get { return this.clickCommand; }
//}

public ItemViewModel(ICommand selectCommand, ICommand clickCommand)
{
this.selectCommand = selectCommand;
this.clickCommand = clickCommand;
this.color = GetRandomColor();
}

public ICommand ClickCommand
{
get { return this.clickCommand; }
}

public ICommand SelectCommand
{
get { return this.selectCommand; }
}
//public ICommand SelectCommand
//{
// get { return this.selectCommand; }
//}

public string Title
{
Expand Down
Loading

0 comments on commit 5750d5f

Please sign in to comment.