Revert "Revert "Replace legacy Evaluator with IntegerExpressions.""

This reverts commit 4f16b0d464.
This commit is contained in:
Matthias Mailänder
2023-05-20 20:26:15 +02:00
committed by Gustas
parent b18c2fe855
commit 94abd8a928
3 changed files with 16 additions and 123 deletions

View File

@@ -15,7 +15,6 @@ using System.Linq;
using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits;
using OpenRA.Primitives;
using OpenRA.Support;
using OpenRA.Widgets;
namespace OpenRA.Mods.Common.Widgets.Logic
@@ -511,8 +510,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
{ "PARENT_BOTTOM", parentBounds.Height }
};
var width = Evaluator.Evaluate(w.Width, substitutions);
var height = Evaluator.Evaluate(w.Height, substitutions);
var width = w.Width.Evaluate(substitutions);
var height = w.Height.Evaluate(substitutions);
substitutions.Add("WIDTH", width);
substitutions.Add("HEIGHT", height);
@@ -521,8 +520,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
w.Bounds = new Rectangle(w.Bounds.X, w.Bounds.Y, width, w.Bounds.Height);
else
w.Bounds = new Rectangle(
Evaluator.Evaluate(w.X, substitutions),
Evaluator.Evaluate(w.Y, substitutions),
w.X.Evaluate(substitutions),
w.Y.Evaluate(substitutions),
width,
height);