Runtime のファイルをドメイン別フォルダへ整理
このコミットが含まれているのは:
26ファイル変更
検索条件に一致するファイルはありません
@@ -0,0 +1,17 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace LuaScript
|
||||
{
|
||||
internal sealed class AviUtlEffectRequest
|
||||
{
|
||||
public string Name { get; }
|
||||
|
||||
public IReadOnlyList<KeyValuePair<string, object>> Arguments { get; }
|
||||
|
||||
public AviUtlEffectRequest(string name, IReadOnlyList<KeyValuePair<string, object>> arguments)
|
||||
{
|
||||
Name = name;
|
||||
Arguments = arguments;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
using MoonSharp.Interpreter;
|
||||
|
||||
namespace LuaScript
|
||||
{
|
||||
internal sealed class AviUtlFontState
|
||||
{
|
||||
public string Family { get; private set; } = string.Empty;
|
||||
public double Size { get; private set; } = 34d;
|
||||
public bool Bold { get; private set; }
|
||||
public bool Italic { get; private set; }
|
||||
public int Color { get; private set; } = 0xFFFFFF;
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
Family = string.Empty;
|
||||
Size = 34d;
|
||||
Bold = false;
|
||||
Italic = false;
|
||||
Color = 0xFFFFFF;
|
||||
}
|
||||
|
||||
public void Apply(DynValue name, DynValue size, DynValue style, DynValue color)
|
||||
{
|
||||
if (name.Type == DataType.String)
|
||||
Family = name.String;
|
||||
else if (name.Type == DataType.Number)
|
||||
Family = name.CastToString();
|
||||
|
||||
Size = size.CastToNumber() ?? Size;
|
||||
|
||||
if (style.CastToNumber() is double styleNumber)
|
||||
{
|
||||
double flags = Math.Floor(styleNumber);
|
||||
Bold = FloorMod(flags, 2d) == 1d;
|
||||
Italic = FloorMod(Math.Floor(flags / 2d), 2d) == 1d;
|
||||
}
|
||||
|
||||
Color = (int)(color.CastToNumber() ?? Color);
|
||||
}
|
||||
|
||||
private static double FloorMod(double value, double divisor) =>
|
||||
value - Math.Floor(value / divisor) * divisor;
|
||||
}
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする