Skip to content

Commit 65cedc7

Browse files
committed
Update UI v1.7
1 parent 1f28479 commit 65cedc7

4 files changed

Lines changed: 14 additions & 6 deletions

File tree

BasicUI_CocosSharp/BasicUI_CocosSharp/BasicUI_CocosSharp.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@
9696
<Reference Include="EmptyKeys.UserInterface.Core">
9797
<HintPath>..\..\EmptyKeysUI\Common\AnyCPU\EmptyKeys.UserInterface.Core.dll</HintPath>
9898
</Reference>
99+
<Reference Include="EmptyKeys.UserInterface.Debug">
100+
<HintPath>..\..\EmptyKeysUI\Common\AnyCPU\EmptyKeys.UserInterface.Debug.dll</HintPath>
101+
</Reference>
99102
<Reference Include="ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, processorArchitecture=MSIL">
100103
<HintPath>..\packages\CocosSharp.PCL.Shared.1.4.0.0\lib\net40\ICSharpCode.SharpZipLib.dll</HintPath>
101104
<Private>True</Private>

BasicUI_CocosSharp/BasicUI_CocosSharp/GeneratedUI/BasicUI.xaml.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace EmptyKeys.UserInterface.Generated {
2020
using EmptyKeys.UserInterface.Themes;
2121

2222

23-
[GeneratedCodeAttribute("Empty Keys UI Generator", "1.6.5.0")]
23+
[GeneratedCodeAttribute("Empty Keys UI Generator", "1.7.0.0")]
2424
public partial class BasicUI : UIRoot {
2525

2626
private Grid e_0;
@@ -228,7 +228,7 @@ private void InitializeComponent() {
228228
this.e_5.Height = 150F;
229229
this.e_5.Width = 400F;
230230
FontManager.Instance.AddFont("Segoe UI", 13.33333F, FontStyle.Regular, "Segoe_UI_10_Regular");
231-
this.e_5.ItemsSource = this.Get_e_5_Items();
231+
this.e_5.ItemsSource = Get_e_5_Items();
232232
// e_18 element
233233
this.e_18 = new ProgressBar();
234234
this.e_3.Children.Add(this.e_18);
@@ -359,7 +359,7 @@ private static UIElement combo_dtMethod(UIElement parent) {
359359
return e_4;
360360
}
361361

362-
private System.Collections.ObjectModel.ObservableCollection<object> Get_e_5_Items() {
362+
private static System.Collections.ObjectModel.ObservableCollection<object> Get_e_5_Items() {
363363
System.Collections.ObjectModel.ObservableCollection<object> items = new System.Collections.ObjectModel.ObservableCollection<object>();
364364
// e_6 element
365365
TabItem e_6 = new TabItem();
@@ -395,7 +395,7 @@ private System.Collections.ObjectModel.ObservableCollection<object> Get_e_5_Item
395395
e_11.Name = "e_11";
396396
e_11.Height = 100F;
397397
FontManager.Instance.AddFont("Segoe UI", 13.33333F, FontStyle.Regular, "Segoe_UI_10_Regular");
398-
e_11.ItemsSource = this.Get_e_11_Items();
398+
e_11.ItemsSource = Get_e_11_Items();
399399
items.Add(e_9);
400400
// e_16 element
401401
TabItem e_16 = new TabItem();
@@ -427,7 +427,7 @@ private static UIElement e_7_dtMethod(UIElement parent) {
427427
return e_8;
428428
}
429429

430-
private System.Collections.ObjectModel.ObservableCollection<object> Get_e_11_Items() {
430+
private static System.Collections.ObjectModel.ObservableCollection<object> Get_e_11_Items() {
431431
System.Collections.ObjectModel.ObservableCollection<object> items = new System.Collections.ObjectModel.ObservableCollection<object>();
432432
// e_12 element
433433
ListBoxItem e_12 = new ListBoxItem();

BasicUI_CocosSharp/BasicUI_CocosSharp/GeneratedUI/Dictionary.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace EmptyKeys.UserInterface.Generated {
2020
using EmptyKeys.UserInterface.Themes;
2121

2222

23-
[GeneratedCodeAttribute("Empty Keys UI Generator", "1.6.5.0")]
23+
[GeneratedCodeAttribute("Empty Keys UI Generator", "1.7.0.0")]
2424
public sealed class Dictionary : ResourceDictionary {
2525

2626
private static Dictionary singleton = new Dictionary();

BasicUI_CocosSharp/BasicUI_CocosSharp/IntroLayer.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.Collections.Generic;
33
using CocosSharp;
44
using EmptyKeys.UserInterface;
5+
using EmptyKeys.UserInterface.Debug;
56
using EmptyKeys.UserInterface.Generated;
67
using EmptyKeys.UserInterface.Media;
78
using Microsoft.Xna.Framework;
@@ -13,6 +14,7 @@ namespace BasicUI_CocosSharp
1314
public class IntroLayer : CCLayerColor
1415
{
1516
private BasicUI root;
17+
private DebugViewModel debug;
1618
private float elapsedGameTime;
1719

1820
public IntroLayer()
@@ -36,6 +38,7 @@ protected override void AddedToScene()
3638
FontManager.DefaultFont = Engine.Instance.Renderer.CreateFont(font);
3739

3840
root = new BasicUI((int)bounds.Size.Width, (int)bounds.Size.Height);
41+
debug = new DebugViewModel(root);
3942
root.DataContext = new BasicUIViewModel();
4043

4144
SoundManager.Instance.LoadSounds(content, "sounds");
@@ -53,6 +56,7 @@ protected override void AddedToScene()
5356
private void UpdateUI(float frameTimeInSeconds)
5457
{
5558
elapsedGameTime = frameTimeInSeconds * 1000;
59+
debug.Update();
5660
root.UpdateInput(elapsedGameTime);
5761
root.UpdateLayout(elapsedGameTime);
5862

@@ -63,6 +67,7 @@ public override void Visit()
6367
base.Visit();
6468

6569
root.Draw(elapsedGameTime);
70+
debug.Draw();
6671
}
6772

6873
void OnTouchesEnded(List<CCTouch> touches, CCEvent touchEvent)

0 commit comments

Comments
 (0)