Daily update on 20250618-051714 by Nitload Youmu. Additional Message : Brief support to collection operation in EXPRESS. A collection type added in core lib and compilestack.
Signed-off-by: Nitload <YoumuLiu_NSI@whv0t.onmicrosoft.com>
This commit is contained in:
@@ -51,17 +51,9 @@ namespace StgSharp.Controls
|
||||
get => throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Rectangle BoundingBox
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public Rectangle BoundingBox { get; set; }
|
||||
|
||||
public Vec2 Position
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public Vec2 Position { get; set; }
|
||||
|
||||
public IEnumerator<PlainGeometryMesh> GetEnumerator()
|
||||
{
|
||||
|
||||
@@ -63,22 +63,14 @@ namespace StgSharp.Controls
|
||||
get => throw new NotSupportedException();
|
||||
}
|
||||
|
||||
public Rectangle BoundingBox
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public Rectangle BoundingBox { get; set; }
|
||||
|
||||
public TriggerButton CurrentButton
|
||||
{
|
||||
get => current;
|
||||
}
|
||||
|
||||
public Vec2 Position
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public Vec2 Position { get; set; }
|
||||
|
||||
protected List<TriggerButton> AllButton
|
||||
{
|
||||
|
||||
@@ -52,16 +52,15 @@ namespace StgSharp.Controls
|
||||
private PlainGeometryMesh _tittleMesh;
|
||||
|
||||
public CharacterLineIndexImage(
|
||||
int length,
|
||||
char defaultChar,
|
||||
PlainGeometryMesh tittleMesh,
|
||||
IEnumerable<(char, PlainGeometryMesh)> indexEnumeration )
|
||||
int length,
|
||||
char defaultChar,
|
||||
PlainGeometryMesh tittleMesh,
|
||||
IEnumerable<(char, PlainGeometryMesh)> indexEnumeration )
|
||||
{
|
||||
this.length = length;
|
||||
displayIndex = new char[length];
|
||||
_tittleMesh = tittleMesh;
|
||||
texIndex = indexEnumeration.ToDictionary(
|
||||
item => item.Item1, item => item.Item2 );
|
||||
texIndex = indexEnumeration.ToDictionary( item => item.Item1, item => item.Item2 );
|
||||
}
|
||||
|
||||
public bool IsEntity
|
||||
@@ -93,8 +92,8 @@ namespace StgSharp.Controls
|
||||
}
|
||||
|
||||
string result = ( message.Length >= length ) ?
|
||||
message.Substring( message.Length - displayIndex.Length ) : message.PadLeft(
|
||||
length, defaultChar );
|
||||
message.Substring( message.Length - displayIndex.Length ) : message.PadLeft(
|
||||
length, defaultChar );
|
||||
|
||||
displayIndex = result.ToCharArray();
|
||||
}
|
||||
|
||||
@@ -42,27 +42,13 @@ namespace StgSharp.Controls
|
||||
public interface ControllingItem : IEnumerable<PlainGeometryMesh>
|
||||
{
|
||||
|
||||
public abstract bool IsEntity
|
||||
{
|
||||
get;
|
||||
}
|
||||
public abstract bool IsEntity { get; }
|
||||
|
||||
public abstract ReadOnlySpan<Vec4> TextureBox
|
||||
{
|
||||
get;
|
||||
}
|
||||
public abstract ReadOnlySpan<Vec4> TextureBox { get; }
|
||||
|
||||
public abstract Rectangle BoundingBox
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public abstract Rectangle BoundingBox { get; set; }
|
||||
|
||||
public abstract Vec2 Position
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public abstract Vec2 Position { get; set; }
|
||||
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
|
||||
@@ -57,17 +57,9 @@ namespace StgSharp.Controls
|
||||
get => renderMesh.TextureCoord;
|
||||
}
|
||||
|
||||
public Rectangle BoundingBox
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public Rectangle BoundingBox { get; set; }
|
||||
|
||||
public Vec2 Position
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public Vec2 Position { get; set; }
|
||||
|
||||
public IEnumerator<PlainGeometryMesh> GetEnumerator()
|
||||
{
|
||||
|
||||
@@ -63,17 +63,9 @@ namespace StgSharp.Controls
|
||||
get => marker.TextureCoord;
|
||||
}
|
||||
|
||||
public Rectangle BoundingBox
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public Rectangle BoundingBox { get; set; }
|
||||
|
||||
public Vec2 Position
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public Vec2 Position { get; set; }
|
||||
|
||||
public IEnumerator<PlainGeometryMesh> GetEnumerator()
|
||||
{
|
||||
|
||||
@@ -41,9 +41,9 @@ using System.Text;
|
||||
namespace StgSharp.Controls
|
||||
{
|
||||
public delegate void RenderButtonTextureCallback(
|
||||
ButtonStatus status,
|
||||
float beginTime,
|
||||
in TextureProvider texture );
|
||||
ButtonStatus status,
|
||||
float beginTime,
|
||||
in TextureProvider texture );
|
||||
|
||||
public enum ButtonStatus
|
||||
{
|
||||
@@ -106,9 +106,11 @@ namespace StgSharp.Controls
|
||||
{
|
||||
add
|
||||
{
|
||||
if( _renderButton == null ) {
|
||||
if( _renderButton == null )
|
||||
{
|
||||
_renderButton = value;
|
||||
} else {
|
||||
} else
|
||||
{
|
||||
_renderButton += value;
|
||||
}
|
||||
}
|
||||
@@ -120,17 +122,9 @@ namespace StgSharp.Controls
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsHighLighted
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
public bool IsHighLighted { get; internal set; }
|
||||
|
||||
public bool IsDisabled
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
public bool IsDisabled { get; internal set; }
|
||||
|
||||
public bool IsEntity => true;
|
||||
|
||||
@@ -139,41 +133,17 @@ namespace StgSharp.Controls
|
||||
get => MemoryMarshal.Cast<Vec2, Vec4>( _texture.TextureCoordinate );
|
||||
}
|
||||
|
||||
public Rectangle BoundingBox
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public Rectangle BoundingBox { get; set; }
|
||||
|
||||
public TriggerButton Left
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
public TriggerButton Left { get; internal set; }
|
||||
|
||||
public TriggerButton Right
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
public TriggerButton Right { get; internal set; }
|
||||
|
||||
public TriggerButton Up
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
public TriggerButton Up { get; internal set; }
|
||||
|
||||
public TriggerButton Down
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
public TriggerButton Down { get; internal set; }
|
||||
|
||||
public Vec2 Position
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public Vec2 Position { get; set; }
|
||||
|
||||
internal TextureProvider Texture
|
||||
{
|
||||
@@ -181,11 +151,7 @@ namespace StgSharp.Controls
|
||||
set => _texture = value;
|
||||
}
|
||||
|
||||
protected ButtonStatus CurrentStatus
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
protected ButtonStatus CurrentStatus { get; set; }
|
||||
|
||||
public void DeHighlight()
|
||||
{
|
||||
@@ -209,9 +175,11 @@ namespace StgSharp.Controls
|
||||
|
||||
public void Enable()
|
||||
{
|
||||
if( CurrentStatus == ButtonStatus.Disable ) {
|
||||
if( CurrentStatus == ButtonStatus.Disable )
|
||||
{
|
||||
CurrentStatus = ButtonStatus.DisableToEnable;
|
||||
} else {
|
||||
} else
|
||||
{
|
||||
return;
|
||||
}
|
||||
if( enableCallback != null ) {
|
||||
@@ -227,9 +195,11 @@ namespace StgSharp.Controls
|
||||
|
||||
public void Highlight()
|
||||
{
|
||||
if( CurrentStatus == ButtonStatus.Enable ) {
|
||||
if( CurrentStatus == ButtonStatus.Enable )
|
||||
{
|
||||
CurrentStatus |= ButtonStatus.EnableToHighlight;
|
||||
} else {
|
||||
} else
|
||||
{
|
||||
return;
|
||||
}
|
||||
if( confirmCallback != null ) {
|
||||
|
||||
@@ -215,9 +215,9 @@ namespace StgSharp
|
||||
|
||||
}
|
||||
|
||||
#pragma warning restore CA1707
|
||||
#pragma warning restore CA1712
|
||||
#pragma warning restore CA7008
|
||||
#pragma warning restore CA1707
|
||||
#pragma warning restore CA1712
|
||||
#pragma warning restore CA7008
|
||||
|
||||
internal enum InputEquipment
|
||||
{
|
||||
|
||||
@@ -37,15 +37,9 @@ namespace StgSharp.Controlling.UsrActivity
|
||||
public interface IClickTrigger
|
||||
{
|
||||
|
||||
public int TargetKeyOrButtonID
|
||||
{
|
||||
get;
|
||||
}
|
||||
public int TargetKeyOrButtonID { get; }
|
||||
|
||||
public KeyStatus TriggeredStatus
|
||||
{
|
||||
get;
|
||||
}
|
||||
public KeyStatus TriggeredStatus { get; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,16 +70,12 @@ namespace StgSharp.Controlling.UsrActivity
|
||||
return $"Key {_stick} triggered when {_status}";
|
||||
}
|
||||
|
||||
public static bool operator !=(
|
||||
JoystickTrigger left,
|
||||
JoystickTrigger right )
|
||||
public static bool operator !=( JoystickTrigger left, JoystickTrigger right )
|
||||
{
|
||||
return !( left == right );
|
||||
}
|
||||
|
||||
public static bool operator ==(
|
||||
JoystickTrigger left,
|
||||
JoystickTrigger right )
|
||||
public static bool operator ==( JoystickTrigger left, JoystickTrigger right )
|
||||
{
|
||||
return ( left._status == right._status ) && ( left._stick == right._stick );
|
||||
}
|
||||
|
||||
@@ -73,7 +73,8 @@ namespace StgSharp.Controlling.UsrActivity
|
||||
|
||||
public static bool operator ==( KeyTrigger left, KeyTrigger right )
|
||||
{
|
||||
return ( left._triggerStat == right._triggerStat ) && ( left._targetKey == right._targetKey );
|
||||
return ( left._triggerStat == right._triggerStat ) &&
|
||||
( left._targetKey == right._targetKey );
|
||||
}
|
||||
|
||||
bool IEquatable<KeyTrigger>.Equals( KeyTrigger other )
|
||||
|
||||
@@ -49,42 +49,31 @@ namespace StgSharp.Controlling.UsrActivity
|
||||
private static KeyTrigger keyboardtemp;
|
||||
private static MouseTrigger mousetemp;
|
||||
|
||||
public static JoystickTrigger BuildJoystickClickTrigger(
|
||||
int keyCode,
|
||||
KeyStatus status )
|
||||
public static JoystickTrigger BuildJoystickClickTrigger( int keyCode, KeyStatus status )
|
||||
{
|
||||
if( keyCode > MouseMin && keyCode < MouseMax ) {
|
||||
return new JoystickTrigger( ( Joystick )keyCode, status );
|
||||
}
|
||||
throw new InvalidOperationException(
|
||||
"Known key code or key is not on joystick." );
|
||||
throw new InvalidOperationException( "Known key code or key is not on joystick." );
|
||||
}
|
||||
|
||||
public static KeyTrigger BuildKeyboardClickTrigger(
|
||||
int keyCode,
|
||||
KeyStatus status )
|
||||
public static KeyTrigger BuildKeyboardClickTrigger( int keyCode, KeyStatus status )
|
||||
{
|
||||
if( keyCode > KeyboardMin && keyCode < KeyboardMax ) {
|
||||
return new KeyTrigger( ( KeyboardKey )keyCode, status );
|
||||
}
|
||||
throw new InvalidOperationException(
|
||||
"Known key code or kay is not on keyboard." );
|
||||
throw new InvalidOperationException( "Known key code or kay is not on keyboard." );
|
||||
}
|
||||
|
||||
public static MouseTrigger BuildMouseClickTrigger(
|
||||
int keyCode,
|
||||
KeyStatus status )
|
||||
public static MouseTrigger BuildMouseClickTrigger( int keyCode, KeyStatus status )
|
||||
{
|
||||
if( keyCode >= MouseMin && keyCode <= MouseMax ) {
|
||||
return new MouseTrigger( ( Mouse )keyCode, status );
|
||||
}
|
||||
throw new InvalidOperationException(
|
||||
"Known key code or key is not on mouse." );
|
||||
throw new InvalidOperationException( "Known key code or key is not on mouse." );
|
||||
}
|
||||
|
||||
public static IClickTrigger BuildTrigger(
|
||||
int keyCode,
|
||||
KeyStatus status )
|
||||
public static IClickTrigger BuildTrigger( int keyCode, KeyStatus status )
|
||||
{
|
||||
if( keyCode > KeyboardMin && keyCode < KeyboardMax ) {
|
||||
return new KeyTrigger( ( KeyboardKey )keyCode, status );
|
||||
|
||||
Reference in New Issue
Block a user