public override void Draw(Structures.EntityRenderProp Properties) { DevicePanel d = Properties.Graphics; Classes.Scene.EditorEntity e = Properties.EditorObject; int x = Properties.DrawX; int y = Properties.DrawY; int Transparency = Properties.Transparency; string text = "UI/Text" + Methods.Solution.SolutionState.Main.CurrentManiaUILanguage + ".bin"; int frameID = (int)e.attributesMap["frameID"].ValueEnum; int listID = (int)e.attributesMap["listID"].ValueEnum; int align = (int)e.attributesMap["align"].ValueEnum; int width = (int)e.attributesMap["size"].ValueVector2.X.High; int height = (int)e.attributesMap["size"].ValueVector2.Y.High; bool invisible = e.attributesMap["invisible"].ValueBool; double alignmentVal = 0; var editorAnim = Methods.Drawing.ObjectDrawing.LoadAnimation(d, text, listID, frameID); switch (align) { case 0: alignmentVal = -((width / 2)) - editorAnim.RequestedFrame.PivotY; break; default: alignmentVal = editorAnim.RequestedFrame.PivotX + (22 / 2); break; } d.DrawQuad(x - (width / 2) - height, y - (height / 2), x + (width / 2) + height, y + (height / 2), System.Drawing.Color.FromArgb(Transparency, System.Drawing.Color.Black), System.Drawing.Color.FromArgb(Transparency, System.Drawing.Color.Black), 0); DrawTexture(d, editorAnim, listID, frameID, x + (int)alignmentVal, y + editorAnim.RequestedFrame.PivotY, Transparency); }
public override void Draw(Structures.EntityRenderProp properties) { DevicePanel d = properties.Graphics; EditorEntity entity = properties.EditorObject; int x = properties.DrawX; int y = properties.DrawY; int Transparency = properties.Transparency; bool fliph = false; bool flipv = false; string text = "UI/Text" + Methods.Solution.SolutionState.Main.CurrentManiaUILanguage + ".bin"; int arrowWidth = (int)entity.attributesMap["arrowWidth"].ValueEnum; if (arrowWidth != 0) { arrowWidth /= 2; } int frameID = (int)entity.attributesMap["frameID"].ValueEnum; int listID = (int)entity.attributesMap["listID"].ValueEnum; bool auxIcon = entity.attributesMap["auxIcon"].ValueBool; bool noText = entity.attributesMap["noText"].ValueBool; int auxframeID = (int)entity.attributesMap["auxFrameID"].ValueEnum; int auxlistID = (int)entity.attributesMap["auxListID"].ValueEnum; int width = (int)entity.attributesMap["size"].ValueVector2.X.High; int height = (int)entity.attributesMap["size"].ValueVector2.Y.High; double alignmentVal = 0; int align = (int)entity.attributesMap["align"].ValueEnum; switch (align) { case 0: alignmentVal = -(width / 2) + 16; break; case 1: alignmentVal = (22 / 2); break; } d.DrawQuad(x - (width / 2) - height, y - (height / 2), x + (width / 2) + height, y + (height / 2), System.Drawing.Color.FromArgb(Transparency, System.Drawing.Color.Black), System.Drawing.Color.FromArgb(Transparency, System.Drawing.Color.Black), 0); if (noText == false) { var editorAnim = LoadAnimation(text, d, listID, frameID); DrawTexturePivotNormal(d, editorAnim, editorAnim.RequestedAnimID, editorAnim.RequestedFrameID, x + (int)alignmentVal, y, Transparency, fliph, flipv); } var leftArrow = LoadAnimation("UI/UIElements.bin", d, 2, 0); DrawTexturePivotNormal(d, leftArrow, leftArrow.RequestedAnimID, leftArrow.RequestedFrameID, x - arrowWidth + (int)alignmentVal, y, Transparency, fliph, flipv); var rightArrow = LoadAnimation("UI/UIElements.bin", d, 2, 1); DrawTexturePivotNormal(d, rightArrow, rightArrow.RequestedAnimID, rightArrow.RequestedFrameID, x + arrowWidth + (int)alignmentVal, y, Transparency, fliph, flipv); if (auxIcon) { var editorAnimIcon = LoadAnimation("UI/SaveSelect.bin", d, auxlistID, auxframeID); DrawTexturePivotNormal(d, editorAnimIcon, editorAnimIcon.RequestedAnimID, editorAnimIcon.RequestedFrameID, x + (int)alignmentVal, y, Transparency, fliph, flipv); } }
public override void Draw(Structures.EntityRenderProp properties) { DevicePanel d = properties.Graphics; EditorEntity e = properties.EditorObject; int x = properties.DrawX; int y = properties.DrawY; int Transparency = properties.Transparency; bool fliph = false; bool flipv = false; string text = "UI/Text" + Methods.Solution.SolutionState.Main.CurrentManiaUILanguage + ".bin"; int width = 120; int height = 20; int buttonID = (int)e.attributesMap["buttonID"].ValueEnum; bool disabled = e.attributesMap["disabled"].ValueBool; if (buttonID == 3) { buttonID = 4; } double alignmentVal = 0; if (!disabled) { alignmentVal = (22 / 2); if (buttonID == 2) { var editorAnim4 = LoadAnimation("UI/MainIcons.bin", d, 1, 3); DrawTexturePivotNormal(d, editorAnim4, editorAnim4.RequestedAnimID, editorAnim4.RequestedFrameID, x + (int)alignmentVal, y - 10, Transparency, fliph, flipv); var editorAnim3 = LoadAnimation("UI/MainIcons.bin", d, 0, 3); DrawTexturePivotNormal(d, editorAnim3, editorAnim3.RequestedAnimID, editorAnim3.RequestedFrameID, x + (int)alignmentVal, y - 10, Transparency, fliph, flipv); } var editorAnim2 = LoadAnimation("UI/MainIcons.bin", d, 1, buttonID); DrawTexturePivotNormal(d, editorAnim2, editorAnim2.RequestedAnimID, editorAnim2.RequestedFrameID, x + (int)alignmentVal, y - 10, Transparency, fliph, flipv); var editorAnim = LoadAnimation("UI/MainIcons.bin", d, 0, buttonID); DrawTexturePivotNormal(d, editorAnim, editorAnim.RequestedAnimID, editorAnim.RequestedFrameID, x + (int)alignmentVal, y - 10, Transparency, fliph, flipv); d.DrawQuad(x - (width / 2) - height, y - (height / 2), x + (width / 2) + height, y + (height / 2), System.Drawing.Color.FromArgb(Transparency, System.Drawing.Color.Black), System.Drawing.Color.FromArgb(Transparency, System.Drawing.Color.Black), 0); var editorAnim5 = LoadAnimation(text, d, 1, buttonID); DrawTexturePivotNormal(d, editorAnim5, editorAnim5.RequestedAnimID, editorAnim5.RequestedFrameID, x + (int)alignmentVal, y, Transparency, fliph, flipv); } }
public override void Draw(Structures.EntityRenderProp properties) { DevicePanel d = properties.Graphics; EditorEntity entity = properties.EditorObject; int x = properties.DrawX; int y = properties.DrawY; int Transparency = properties.Transparency; bool fliph = false; bool flipv = false; string text = "UI/Text" + Methods.Solution.SolutionState.Main.CurrentManiaUILanguage + ".bin"; int listID = (int)entity.attributesMap["listID"].ValueEnum; int frameID = (int)entity.attributesMap["frameID"].ValueEnum; int width = (int)entity.attributesMap["size"].ValueVector2.X.High; int height = (int)entity.attributesMap["size"].ValueVector2.Y.High; int align = (int)entity.attributesMap["align"].ValueEnum; double alignmentVal = 0; d.DrawQuad(x - (width / 2) - height, y - (height / 2), x + (width / 2) + height, y + (height / 2), System.Drawing.Color.FromArgb(Transparency, System.Drawing.Color.Black), System.Drawing.Color.FromArgb(Transparency, System.Drawing.Color.Black), 0); var Animation = LoadAnimation(text, d, listID, frameID); DrawTexturePivotNormal(d, Animation, Animation.RequestedAnimID, Animation.RequestedFrameID, x, y, Transparency, fliph, flipv); }
public override void Draw(Structures.EntityRenderProp Properties) { DevicePanel d = Properties.Graphics; Classes.Scene.EditorEntity e = Properties.EditorObject; int x = Properties.DrawX; int y = Properties.DrawY; int Transparency = Properties.Transparency; string text = e.attributesMap["text"].ValueString; int width = (int)e.attributesMap["size"].ValueVector2.X.High; int height = (int)e.attributesMap["size"].ValueVector2.Y.High; int spacingAmount = 0; int fullWidth = 0; if (width == 0) { width = 1; } foreach (char symb in text) { var editorAnim = GetFrameID(d, symb); fullWidth = fullWidth + editorAnim.RequestedFrame.Width; } int x2 = x - (fullWidth / 2) + fullWidth % 2; int y2 = y - 5; d.DrawQuad(x - (width / 2) - height, y - (height / 2), x + (width / 2) + height, y + (height / 2), System.Drawing.Color.FromArgb(Transparency, System.Drawing.Color.Black), System.Drawing.Color.FromArgb(Transparency, System.Drawing.Color.Black), 0); foreach (char symb in text) { var editorAnim = GetFrameID(d, symb); Point Offset = GetFrame(editorAnim.RequestedFrame); DrawTexturePivotNormal(d, editorAnim, editorAnim.RequestedAnimID, editorAnim.RequestedFrameID, x2 + spacingAmount + Offset.X, y2 + Offset.Y, Transparency); spacingAmount = spacingAmount + editorAnim.RequestedFrame.Width; } }
public override void Draw(Structures.EntityRenderProp properties) { DevicePanel d = properties.Graphics; Classes.Scene.EditorEntity entity = properties.EditorObject; int x = properties.DrawX; int y = properties.DrawY; int Transparency = properties.Transparency; string text = "UI/Text" + Methods.Solution.SolutionState.Main.CurrentManiaUILanguage + ".bin"; int type = (int)entity.attributesMap["type"].ValueUInt8; int inputID = (int)entity.attributesMap["inputID"].ValueUInt8; int width = 48; int height = 12; int frameID = 1; int listID = 0; switch (type) { case 0: frameID = 7; break; case 1: frameID = 8; break; case 2: frameID = 9; break; case 3: frameID = 10; break; case 4: frameID = 13; break; case 5: frameID = 1; break; case 6: frameID = 3; break; case 7: frameID = 11; break; case 8: frameID = 12; break; } d.DrawQuad(x - (width / 2) - height, y - (height / 2), x + (width / 2) + height, y + (height / 2), System.Drawing.Color.FromArgb(Transparency, System.Drawing.Color.Black), System.Drawing.Color.FromArgb(Transparency, System.Drawing.Color.Black), 0); var editorAnim = LoadAnimation(text, d, listID, frameID); DrawTexture(d, editorAnim, editorAnim.RequestedAnimID, editorAnim.RequestedFrameID, x, y + editorAnim.RequestedFrame.PivotY, Transparency, false, false); var editorAnimKey = LoadAnimation("UI/Buttons.bin", d, 1, 0); DrawTexture(d, editorAnimKey, editorAnimKey.RequestedAnimID, editorAnimKey.RequestedFrameID, x + editorAnimKey.RequestedFrame.PivotX - 16, y + editorAnimKey.RequestedFrame.PivotY, Transparency, false, false); }