Skip to content

Commit cd71b8c

Browse files
authored
Merge pull request #9 from Kersoph/P2_UT_Fixes
Including P2 UT fixes
2 parents 2b82f2d + d178a47 commit cd71b8c

File tree

74 files changed

+983
-416
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+983
-416
lines changed

data/core/landing_page/LandingPageNode.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
using Godot;
2-
3-
41
namespace Osls.LandingPage
52
{
63
/// <summary>

data/core/landing_page/LessonSelectionGridNode.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public override void _Ready()
3232
GD.PrintErr(e);
3333
GD.PushError(e.Message);
3434
}
35+
if (_lessonNodes != null && _lessonNodes.Length > 0) CallDeferred(nameof(SelectionChangedTo), _lessonNodes[0]);
3536
}
3637
#endregion
3738

data/core/lesson/viewer/LessonView.tscn

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[gd_scene load_steps=9 format=2]
1+
[gd_scene load_steps=10 format=2]
22

33
[ext_resource path="res://data/core/lesson/viewer/LessonInfo.cs" type="Script" id=1]
44
[ext_resource path="res://data/core/lesson/viewer/PlantView.cs" type="Script" id=2]
@@ -9,6 +9,8 @@
99
[ext_resource path="res://data/core/landing_page/RichTextLabel.tscn" type="PackedScene" id=7]
1010
[ext_resource path="res://data/core/theme/font/RobotoBoldFont.tres" type="DynamicFont" id=8]
1111

12+
[sub_resource type="StyleBoxEmpty" id=1]
13+
1214
[node name="LessonView" type="Control"]
1315
anchor_left = 1.0
1416
anchor_right = 1.0
@@ -57,6 +59,8 @@ margin_top = 2.0
5759
margin_right = -2.0
5860
margin_bottom = -2.0
5961
focus_mode = 2
62+
custom_styles/focus = SubResource( 1 )
63+
custom_colors/selection_color = Color( 0, 0, 0, 0.196078 )
6064
selection_enabled = true
6165

6266
[node name="ColorRect" type="ColorRect" parent="LessonInfo"]

data/core/scene_manager/navigation_steps/NavigationSteps.tscn

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[gd_scene load_steps=8 format=2]
1+
[gd_scene load_steps=9 format=2]
22

33
[ext_resource path="res://data/core/scene_manager/navigation_steps/NavigationSteps.cs" type="Script" id=1]
44
[ext_resource path="res://data/core/scene_manager/navigation_steps/NavigationButton.tscn" type="PackedScene" id=2]
@@ -7,6 +7,7 @@
77
[ext_resource path="res://data/core/scene_manager/navigation_steps/symbols/EditorStep.png" type="Texture" id=5]
88
[ext_resource path="res://data/core/scene_manager/navigation_steps/symbols/MenuStep.png" type="Texture" id=6]
99
[ext_resource path="res://data/core/theme/LightTheme.tres" type="Theme" id=7]
10+
[ext_resource path="res://data/core/theme/font/RobotoRegularFont.tres" type="DynamicFont" id=8]
1011

1112
[node name="NavigationSteps" type="ReferenceRect"]
1213
anchor_bottom = 1.0
@@ -27,6 +28,19 @@ margin_bottom = -80.0
2728
disabled = true
2829
icon = null
2930

31+
[node name="Version" type="Label" parent="FillerButton"]
32+
anchor_top = 1.0
33+
anchor_right = 1.0
34+
anchor_bottom = 1.0
35+
margin_top = -24.0
36+
custom_fonts/font = ExtResource( 8 )
37+
custom_colors/font_color = Color( 0.470588, 0.470588, 0.470588, 1 )
38+
text = "v0.9.0"
39+
align = 1
40+
__meta__ = {
41+
"_edit_use_anchors_": false
42+
}
43+
3044
[node name="ExaminationStepButton" parent="." instance=ExtResource( 2 )]
3145
anchor_top = 0.0
3246
anchor_bottom = 0.0
Binary file not shown.
-90 Bytes
Loading

data/core/theme/LightTheme.tres

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[ext_resource path="res://data/core/theme/rect/LightHoverStyle.tres" type="StyleBox" id=5]
88

99
[sub_resource type="StyleBoxFlat" id=1]
10-
bg_color = Color( 0.470588, 0.470588, 0.470588, 0.588235 )
10+
bg_color = Color( 0.627451, 0.627451, 0.627451, 1 )
1111
corner_detail = 5
1212

1313
[sub_resource type="StyleBoxFlat" id=2]
@@ -18,7 +18,7 @@ bg_color = Color( 1, 1, 0.705882, 1 )
1818

1919
[sub_resource type="StyleBoxFlat" id=4]
2020
content_margin_bottom = 5.0
21-
bg_color = Color( 0.313726, 0.313726, 0.313726, 1 )
21+
bg_color = Color( 0.235294, 0.235294, 0.235294, 1 )
2222
anti_aliasing = false
2323

2424
[sub_resource type="StyleBoxEmpty" id=5]
@@ -56,7 +56,7 @@ border_width_bottom = 1
5656
border_color = Color( 0.470588, 0.470588, 0.470588, 1 )
5757

5858
[sub_resource type="StyleBoxFlat" id=9]
59-
bg_color = Color( 0.470588, 0.470588, 0.470588, 0.588235 )
59+
bg_color = Color( 0.627451, 0.627451, 0.627451, 1 )
6060

6161
[sub_resource type="StyleBoxFlat" id=10]
6262
bg_color = Color( 1, 1, 0.705882, 1 )
@@ -66,7 +66,7 @@ bg_color = Color( 1, 1, 0.705882, 1 )
6666

6767
[sub_resource type="StyleBoxFlat" id=12]
6868
content_margin_left = 5.0
69-
bg_color = Color( 0.313726, 0.313726, 0.313726, 1 )
69+
bg_color = Color( 0.235294, 0.235294, 0.235294, 1 )
7070

7171
[sub_resource type="StyleBoxEmpty" id=13]
7272

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[gd_resource type="DynamicFont" load_steps=2 format=2]
2+
3+
[ext_resource path="res://data/core/theme/font/RobotoRegularData.tres" type="DynamicFontData" id=1]
4+
5+
[resource]
6+
size = 32
7+
outline_size = 3
8+
outline_color = Color( 0, 0, 0, 0.588235 )
9+
use_filter = true
10+
extra_spacing_top = -4
11+
extra_spacing_bottom = -4
12+
extra_spacing_char = -1
13+
font_data = ExtResource( 1 )

data/core/theme/nodes/HscRelative.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Osls
99
public class HscRelative : HSplitContainer
1010
{
1111
#region ==================== Fields / Properties ====================
12-
[Export] public float RelativeOffst = 1320f/1840f;
12+
[Export] public float RelativeOffset = 1320f/1840f;
1313
#endregion
1414

1515

@@ -22,7 +22,7 @@ public override void _Ready()
2222
{
2323
minSizeOffset = control.RectMinSize.x;
2424
}
25-
SplitOffset = Mathf.RoundToInt(RectSize.x * RelativeOffst - minSizeOffset);
25+
SplitOffset = Mathf.RoundToInt(RectSize.x * RelativeOffset - minSizeOffset);
2626
}
2727
#endregion
2828
}

data/diagram_models/sfc/data/SfcEntity.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ public class SfcEntity
1212
{
1313
#region ==================== Fields / Properties ====================
1414
public const int XKeyShift = 16;
15+
public const int YKeyMask = 0b1111111111111111;
16+
public const int KeyOffset = 1 << 15;
1517
private readonly Dictionary<int, PatchEntity> _patchMap = new Dictionary<int, PatchEntity>();
1618

1719
/// <summary>
@@ -45,7 +47,9 @@ public void AddPatch(PatchEntity patch)
4547
/// </summary>
4648
public static int CalculateMapKey(int x, int y)
4749
{
48-
return checked((x << XKeyShift) | y);
50+
int xKey = (KeyOffset + x) << XKeyShift;
51+
int yKey = (KeyOffset + y) & YKeyMask;
52+
return checked(xKey | yKey);
4953
}
5054

5155
/// <summary>

0 commit comments

Comments
 (0)