Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tzachshabtay committed Jun 21, 2020
1 parent fdc3790 commit cadd7ac
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ private async Task<(object result, MethodModel model, MethodWizardAttribute attr
{
var methodParams = method.GetParameters();
ValueModel[] valueModels = methodParams.Select(m => parameters.TryGetValue(m.Name, out ValueModel val) ?
val : new ValueModel(MethodParam.GetDefaultValue(m.ParameterType))).ToArray();
val : new ValueModel(MethodParam.GetDefaultValue(m.ParameterType), type: m.ParameterType)).ToArray();
object[] values = valueModels.Select(v => v.Value).ToArray();
var returnType = method is MethodInfo methodInfo ? methodInfo.ReturnType : null;
var model = new MethodModel { InstanceName = FactoryProvider.GetFactoryScriptName(factory, _editor.Game), Name = method.Name, Parameters = valueModels, ReturnType = returnType };
Expand Down
1 change: 1 addition & 0 deletions Source/Engine/AGS.Engine/Game/Factories/AGSUIFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,7 @@ public static List<object> ConvertCheckboxToEntities(ICheckBox checkbox)
if (parent != null) comboBox.RenderLayer = parent.RenderLayer;
defaultHeight = dropDownButton?.Height ?? textBox?.Height ?? defaultHeight;
float itemWidth = textBox?.Width ?? defaultWidth;
comboBox.BaseSize = (itemWidth, defaultHeight);

if (textBox == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ private async Task<bool> walkStraightLine(WalkInstruction currentWalk, Position

if (debugRenderers != null)
{
IObject renderer = _objFactory.GetObject("Debug Line");
IObject renderer = _objFactory.GetObject($"Debug Line {this.Entity.ID} {debugRenderers.Count}");
var line = renderer.AddComponent<GLLineRenderer>();
if (line != null)
{
Expand Down

0 comments on commit cadd7ac

Please sign in to comment.