public virtual void Initialize(string category = null, ISkinFile file = null) { if (category == null) { category = DefaultCategory; } if (file == null) { file = DefaultSkinFile; } TopLeftCorner = GetTexture(file, category, "TopLeftCorner"); TopRightCorner = GetTexture(file, category, "TopRightCorner"); BottomLeftCorner = GetTexture(file, category, "BottomLeftCorner"); BottomRightCorner = GetTexture(file, category, "BottomRightCorner"); TopBorder = GetTexture(file, category, "TopBorder"); BottomBorder = GetTexture(file, category, "BottomBorder"); LeftBorder = GetTexture(file, category, "LeftBorder"); RightBorder = GetTexture(file, category, "RightBorder"); Inside = GetTexture(file, category, "Inside"); inputMachine = new TextInputMachine(KeyboardInput, GetMonoFont(file, category, "Font")); inputMachine.TextAdded += new TextInputMachine.TextAddedEvent(inputMachine_TextAdded); Value = 0; inputMachine.Text = Value.ToString(); base.BaseInitialize(); }
public virtual void Initialize(string category = null, ISkinFile _file = null) { if (category == null) { category = DefaultCategory; } if (_file == null) { _file = DefaultSkinFile; } file = _file; TopRightCorner = GetTexture(file, category, "TopRightCorner"); BottomLeftCorner = GetTexture(file, category, "BottomLeftCorner"); BottomRightCorner = GetTexture(file, category, "BottomRightCorner"); UpperFieldBottomRightCorner = GetTexture(file, category, "UpperFieldBottomRightCorner"); TopBorder = GetTexture(file, category, "TopBorder"); BottomBorder = GetTexture(file, category, "BottomBorder"); LeftBorder = GetTexture(file, category, "LeftBorder"); MiddleBorder = GetTexture(file, category, "MiddleBorder"); RightBorder = GetTexture(file, category, "RightBorder"); Inside = GetTexture(file, category, "Inside"); FolderSign = GetTexture(file, category, "FolderSign"); IconTop = GetTexture(file, category, "IconTop"); IconBottom = GetTexture(file, category, "IconBottom"); IconLeft = GetTexture(file, category, "IconLeft"); IconRight = GetTexture(file, category, "IconRight"); IconInside = GetTexture(file, category, "IconInside"); IconUpSign = GetTexture(file, category, "IconUpSign"); IconInsidePressed = GetTexture(file, category, "IconInsidePressed"); IconUpSignPressed = GetTexture(file, category, "IconUpSignPressed"); Font = GetMonoFont(file, category, "Font"); inputMachine = new TextInputMachine(KeyboardInput, Font); base.BaseInitialize(); }
public virtual void Initialize(int bufferWidth, int bufferHeight, string category = null, ISkinFile file = null) { if (category == null) { category = DefaultCategory; } if (file == null) { file = DefaultSkinFile; } display = new char[bufferWidth, bufferHeight]; Font = GetMonoFont(file, category, "Font"); Width = bufferWidth * (Font.CharWidth + Font.HorizontalSpace); Height = bufferHeight * (Font.CharHeight + Font.VerticalSpace); inputMachine = new TextInputMachine(KeyboardInput, Font); inputMachine.CursorMoved += new TextInputMachine.CursorEvent(machine_CursorMoved); inputMachine.Cursor = inputMachine.Cursor; //This will call machine_CursorMoved() base.BaseInitialize(); }