using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.IO;
using Barotrauma;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Graphics;
using System.Xml;
using System.Xml.Linq;
namespace QICrabUI
{
public partial class CUIComponent
{
//HACK This is potentially cursed
///
/// Arbitrary data
///
public object Data { get; set; }
///
/// Will prevent serialization to xml if true
///
public bool Unserializable { get; set; }
///
/// Is this a serialization cutoff point
/// Parent will serialize children down to this component
/// Further serialization should be hadled by this component
///
[CUISerializable] public bool BreakSerialization { get; set; }
///
/// Some props (like visible) are autopassed to all new childs
/// see PassPropsToChild
///
[CUISerializable] public bool ShouldPassPropsToChildren { get; set; } = true;
///
/// Don't inherit parent Visibility
///
[CUISerializable] public bool IgnoreParentVisibility { get; set; }
///
/// Don't inherit parent IgnoreEvents
///
[CUISerializable] public bool IgnoreParentEventIgnorance { get; set; }
///
/// Don't inherit parent ZIndex
///
[CUISerializable] public bool IgnoreParentZIndex { get; set; }
[CUISerializable] public bool IgnoreParentTransparency { get; set; }
///
/// Invisible components are not drawn, but still can be interacted with
///
[CUISerializable]
public bool Visible
{
get => CUIProps.Visible.Value;
set => CUIProps.Visible.SetValue(value);
}
///
/// Won't react to mouse events
///
[CUISerializable]
public bool IgnoreEvents
{
get => CUIProps.IgnoreEvents.Value;
set => CUIProps.IgnoreEvents.SetValue(value);
}
///
/// Visible + !IgnoreEvents
///
public bool Revealed
{
get => CUIProps.Revealed.Value;
set => CUIProps.Revealed.SetValue(value);
}
//HACK this is meant for buttons, but i want to access it on generic components in CUIMap
protected bool disabled;
///
/// Usually means - non interactable, e.g. unclickable gray button
///
[CUISerializable]
public virtual bool Disabled
{
get => disabled;
set => disabled = value;
}
}
}