latex bot discord
| -rw-r--r-- | addons/GodoTeX/GodoTeX.cs | 15 | ||||
| -rw-r--r-- | addons/GodoTeX/LaTeX.cs | 99 | ||||
| -rw-r--r-- | addons/GodoTeX/LaTeX3D.cs | 98 | ||||
| -rw-r--r-- | addons/GodoTeX/LaTeXButton.cs | 105 | ||||
| -rw-r--r-- | addons/GodoTeX/icon.svg | 1 | ||||
| -rw-r--r-- | addons/GodoTeX/icon.svg.import | 38 | ||||
| -rw-r--r-- | addons/GodoTeX/iconButton.svg | 1 | ||||
| -rw-r--r-- | addons/GodoTeX/iconButton.svg.import | 35 | ||||
| -rw-r--r-- | addons/GodoTeX/iconRed.svg | 41 | ||||
| -rw-r--r-- | addons/GodoTeX/iconRed.svg.import | 35 |
10 files changed, 0 insertions, 468 deletions
diff --git a/addons/GodoTeX/GodoTeX.cs b/addons/GodoTeX/GodoTeX.cs index a783376..e6d60d2 100644 --- a/addons/GodoTeX/GodoTeX.cs +++ b/addons/GodoTeX/GodoTeX.cs @@ -8,25 +8,10 @@ public class GodoTeX : EditorPlugin { var texture_grey = GD.Load<Texture>("addons/GodoTeX/iconGrey.svg"); var texture_script = GD.Load<Script>("addons/GodoTeX/LaTeXture.cs"); AddCustomType("LaTeXture", "ImageTexture", texture_script, texture_grey); - - var texture_red = GD.Load<Texture>("addons/GodoTeX/iconRed.svg"); - var spatial_script = GD.Load<Script>("addons/GodoTeX/LaTeX3D.cs"); - AddCustomType("LaTeX3D", "Sprite3D", spatial_script, texture_red); - - var texture = GD.Load<Texture>("addons/GodoTeX/icon.svg"); - var script = GD.Load<Script>("addons/GodoTeX/LaTeX.cs"); - AddCustomType("LaTeX", "Sprite", script, texture); - - var texture_button = GD.Load<Texture>("addons/GodoTeX/iconButton.svg"); - var button_script = GD.Load<Script>("addons/GodoTeX/LaTeXButton.cs"); - AddCustomType("LaTeXButton", "TextureButton", button_script, texture_button); } public override void _ExitTree() { - RemoveCustomType("LaTeX"); - RemoveCustomType("LaTeX3D"); RemoveCustomType("LaTeXture"); - RemoveCustomType("LaTeXButton"); } } #endif diff --git a/addons/GodoTeX/LaTeX.cs b/addons/GodoTeX/LaTeX.cs deleted file mode 100644 index 2aefa1e..0000000 --- a/addons/GodoTeX/LaTeX.cs +++ /dev/null @@ -1,99 +0,0 @@ -using Godot; - - -[Tool] -public class LaTeX : Sprite { - // The following wordy declarations ensure that changing the properties - // inside the editor causes the expression to re-render. - - public string LatexExpression; - [Export(PropertyHint.MultilineText)] - private string _latexExpression { - get {return LatexExpression;} - set { - // This runs when LatexExpression is set in the editor. - - LatexExpression = value; - Render(); - } - } - - public float FontSize = 40f; - [Export(PropertyHint.Range, "10,60,1,or_greater,or_lesser")] - private float _fontSize { - get {return FontSize;} - set { - FontSize = value; - Render(); - } - } - - public Color MathColor = new Color(0,0,0,1); - [Export] - private Color _mathColor { - get {return MathColor;} - set { - MathColor = value; - Render(); - } - } - - public bool AntiAliasing = true; - [Export] - private bool _antiAliasing { - get {return AntiAliasing;} - set { - AntiAliasing = value; - Render(); - } - } - - public bool Fill = true; - [Export] - private bool _fill { - get {return Fill;} - set { - Fill = value; - Render(); - } - } - - public bool ShowError = true; - [Export] - private bool _showError { - get {return ShowError;} - set { - ShowError = value; - Render(); - } - } - - // These are the measures of the generated image. - public float Width; - public float Height; - public float OffsetX; - public float OffsetY; - - // You may call this from outside to re-render the expression. - // This is not done automatically so that you can change the values very - // often, say multiple times a millisecond, without significant slowdown. - public void Render() { - var texture = new LaTeXture(); - texture.LatexExpression = this.LatexExpression; - texture.FontSize = this.FontSize; - texture.AntiAliasing = this.AntiAliasing; - texture.Fill = this.Fill; - texture.MathColor = this.MathColor; - texture.ShowError = this.ShowError; - texture.Render(); - this.Texture = texture; - this.Width = texture.Width; - this.Height = texture.Height; - this.OffsetX = texture.OffsetX; - this.OffsetY = texture.OffsetY; - } - - public override void _Ready() { - Render(); - } -} diff --git a/addons/GodoTeX/LaTeX3D.cs b/addons/GodoTeX/LaTeX3D.cs deleted file mode 100644 index b3a9de4..0000000 --- a/addons/GodoTeX/LaTeX3D.cs +++ /dev/null @@ -1,98 +0,0 @@ -using Godot; - -[Tool] -public class LaTeX3D : Sprite3D { - // The following wordy declarations ensure that changing the properties - // inside the editor causes the expression to re-render. - - public string LatexExpression; - [Export(PropertyHint.MultilineText)] - private string _latexExpression { - get {return LatexExpression;} - set { - // This runs when LatexExpression is set in the editor. - - LatexExpression = value; - Render(); - } - } - - public float FontSize = 40f; - [Export(PropertyHint.Range, "10,60,1,or_greater,or_lesser")] - private float _fontSize { - get {return FontSize;} - set { - FontSize = value; - Render(); - } - } - - public Color MathColor = new Color(0,0,0,1); - [Export] - private Color _mathColor { - get {return MathColor;} - set { - MathColor = value; - Render(); - } - } - - public bool AntiAliasing = true; - [Export] - private bool _antiAliasing { - get {return AntiAliasing;} - set { - AntiAliasing = value; - Render(); - } - } - - public bool Fill = true; - [Export] - private bool _fill { - get {return Fill;} - set { - Fill = value; - Render(); - } - } - - public bool ShowError = true; - [Export] - private bool _showError { - get {return ShowError;} - set { - ShowError = value; - Render(); - } - } - - // These are the measures of the generated image. - public float Width; - public float Height; - public float OffsetX; - public float OffsetY; - - // You may call this from outside to re-render the expression. - // This is not done automatically so that you can change the values very - // often, say multiple times a millisecond, without significant slowdown. - public void Render() { - var texture = new LaTeXture(); - texture.LatexExpression = this.LatexExpression; - texture.FontSize = this.FontSize; - texture.AntiAliasing = this.AntiAliasing; - texture.Fill = this.Fill; - texture.MathColor = this.MathColor; - texture.ShowError = this.ShowError; - texture.Render(); - this.Texture = texture; - this.Width = texture.Width; - this.Height = texture.Height; - this.OffsetX = texture.OffsetX; - this.OffsetY = texture.OffsetY; - } - - public override void _Ready() { - Render(); - } -} diff --git a/addons/GodoTeX/LaTeXButton.cs b/addons/GodoTeX/LaTeXButton.cs deleted file mode 100644 index 166a6c7..0000000 --- a/addons/GodoTeX/LaTeXButton.cs +++ /dev/null @@ -1,105 +0,0 @@ -using Godot; - -[Tool] -public class LaTeXButton : TextureButton { - // The following wordy declarations ensure that changing the properties - // inside the editor causes the expression to re-render. - - public string LatexExpression; - [Export(PropertyHint.MultilineText)] - private string _latexExpression { - get {return LatexExpression;} - set { - // This runs when LatexExpression is set in the editor. - - LatexExpression = value; - Render(); - } - } - - public float FontSize = 40f; - [Export(PropertyHint.Range, "10,60,1,or_greater,or_lesser")] - private float _fontSize { - get {return FontSize;} - set { - FontSize = value; - Render(); - } - } - - public Color MathColor = new Color(0,0,0,1); - [Export] - private Color _mathColor { - get {return MathColor;} - set { - MathColor = value; - Render(); - } - } - - public bool AntiAliasing = true; - [Export] - private bool _antiAliasing { - get {return AntiAliasing;} - set { - AntiAliasing = value; - Render(); - } - } - - public bool ShowError = true; - [Export] - private bool _showError { - get {return ShowError;} - set { - ShowError = value; - Render(); - } - } - - public void Render() { - var texture = new LaTeXture(); - texture.LatexExpression = this.LatexExpression; - texture.FontSize = this.FontSize; - texture.AntiAliasing = this.AntiAliasing; - texture.Fill = false; - texture.MathColor = this.MathColor; - texture.ShowError = this.ShowError; - texture.Render(); - - this.TextureNormal = texture; - - var texture2 = new LaTeXture(); - texture2.LatexExpression = this.LatexExpression; - texture2.FontSize = this.FontSize; - texture2.AntiAliasing = this.AntiAliasing; - texture2.Fill = true; - texture2.MathColor = this.MathColor; - texture2.ShowError = this.ShowError; - texture2.Render(); - - this.TextureHover = texture2; - - // A bit of a hack, we increase the top spacing in the LaTeX expression - // to give a 'pressed down' effect. - var texture3 = new LaTeXture(); - texture3.LatexExpression = @"\raisebox{41mu}{}" + this.LatexExpression; - texture3.FontSize = this.FontSize; - texture3.AntiAliasing = this.AntiAliasing; - texture3.Fill = true; - texture3.MathColor = this.MathColor; - texture3.ShowError = this.ShowError; - texture3.Render(); - - this.TexturePressed = texture3; - - var clickMask = new BitMap(); - clickMask.Create(new Vector2(texture.Width, texture.Height)); - clickMask.SetBitRect(new Rect2(0, 35, texture.Width, texture.Height - 70), true); - this.TextureClickMask = clickMask; - } - - public override void _Ready() { - Render(); - } -} diff --git a/addons/GodoTeX/icon.svg b/addons/GodoTeX/icon.svg deleted file mode 100644 index 4a43173..0000000 --- a/addons/GodoTeX/icon.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 -706.60651 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m128 619q-7 7-11 9-4 2-16 3-12 1-43 3h-33v46h529v-4q2-6 14-116 12-110 14-116v-4h-40v4q0 1-4 34-4 33-15 67-11 34-31 53-38 36-143 36h-15q-70 0-85-1-15-1-16-12-1-3-1-282l1-278q7-7 12-9 5-2 25-4 20-2 63-2h27v-46h-12q-24 3-166 3-131 0-146-3h-11v46h33q42 1 51 3 9 2 19 12z" fill="#8ca4f3" transform="matrix(.01834526 0 0 -.01834526 2.718073 -692.23766)"/></svg>
\ No newline at end of file diff --git a/addons/GodoTeX/icon.svg.import b/addons/GodoTeX/icon.svg.import deleted file mode 100644 index 4611ddd..0000000 --- a/addons/GodoTeX/icon.svg.import +++ /dev/null @@ -1,38 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path.s3tc="res://.import/icon.svg-23b8536dd78fd33b44f4332a84a25246.s3tc.stex" -path.etc2="res://.import/icon.svg-23b8536dd78fd33b44f4332a84a25246.etc2.stex" -path.etc="res://.import/icon.svg-23b8536dd78fd33b44f4332a84a25246.etc.stex" -metadata={ -"imported_formats": [ "s3tc", "etc2", "etc" ], -"vram_texture": true -} - -[deps] - -source_file="res://addons/GodoTeX/icon.svg" -dest_files=[ "res://.import/icon.svg-23b8536dd78fd33b44f4332a84a25246.s3tc.stex", "res://.import/icon.svg-23b8536dd78fd33b44f4332a84a25246.etc2.stex", "res://.import/icon.svg-23b8536dd78fd33b44f4332a84a25246.etc.stex" ] - -[params] - -compress/mode=2 -compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 -compress/normal_map=0 -flags/repeat=true -flags/filter=true -flags/mipmaps=true -flags/anisotropic=false -flags/srgb=1 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false -process/normal_map_invert_y=false -stream=false -size_limit=0 -detect_3d=false -svg/scale=1.0 diff --git a/addons/GodoTeX/iconButton.svg b/addons/GodoTeX/iconButton.svg deleted file mode 100644 index db0873b..0000000 --- a/addons/GodoTeX/iconButton.svg +++ /dev/null @@ -1 +0,0 @@ -<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><g fill="#8eef97"><path d="m5.8327617 9.7013925c-.7207587 0-1.3018428.5810885-1.3018428 1.3018425v1.298843h-1.7337907v1.736791h10.4057438v-1.736791h-1.733792v-1.298843c0-.720754-.581088-1.3018425-1.301842-1.3018425z" stroke-width=".867735"/><path d="m7.0957548 2.6994227q-.0758199-.0758199-.1191456-.0974827-.0433256-.0216628-.1733025-.0324943-.129977-.0108314-.4657508-.0324942h-.3574366v-.498245h5.7298167v.043326q.02166.064988.15164 1.2564438.129977 1.1914554.15164 1.2564439v.043326h-.433257v-.043326q0-.010831-.04333-.3682681-.04332-.3574369-.162467-.7257049-.119145-.368268-.335773-.5740649-.411594-.3899308-1.5488921-.3899308h-.1624712q-.7581989 0-.9206701.010831-.1624712.010831-.1733025.1299769-.010831.032494-.010831 3.0544583l.010831 3.0111331q.07582.07582.1299769.097482.054157.021662.2707853.043325.2166283.021662.682379.021662h.2924481v.4982475h-.1299769q-.259954-.032497-1.7980145-.032497-1.418915 0-1.5813861.032497h-.1191456v-.498245h.3574366q.4549193-.010834.552402-.032497.097483-.021662.2057969-.1299769z" stroke-width=".010831"/></g></svg>
\ No newline at end of file diff --git a/addons/GodoTeX/iconButton.svg.import b/addons/GodoTeX/iconButton.svg.import deleted file mode 100644 index 58dc5e5..0000000 --- a/addons/GodoTeX/iconButton.svg.import +++ /dev/null @@ -1,35 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/iconButton.svg-299f9c2f548f426910b50b78618b5517.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://addons/GodoTeX/iconButton.svg" -dest_files=[ "res://.import/iconButton.svg-299f9c2f548f426910b50b78618b5517.stex" ] - -[params] - -compress/mode=0 -compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 -compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false -process/normal_map_invert_y=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 diff --git a/addons/GodoTeX/iconRed.svg b/addons/GodoTeX/iconRed.svg deleted file mode 100644 index 6543c70..0000000 --- a/addons/GodoTeX/iconRed.svg +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg - height="16" - viewBox="0 -706.60651 16 16" - width="16" - version="1.1" - id="svg4" - sodipodi:docname="iconRed.svg" - inkscape:version="1.2 (dc2aedaf03, 2022-05-15)" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns="http://www.w3.org/2000/svg" - xmlns:svg="http://www.w3.org/2000/svg"> - <defs - id="defs8" /> - <sodipodi:namedview - id="namedview6" - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1.0" - inkscape:showpageshadow="2" - inkscape:pageopacity="0.0" - inkscape:pagecheckerboard="0" - inkscape:deskcolor="#d1d1d1" - showgrid="false" - inkscape:zoom="52.3125" - inkscape:cx="8.0191159" - inkscape:cy="8.0095579" - inkscape:window-width="1920" - inkscape:window-height="1017" - inkscape:window-x="-8" - inkscape:window-y="-8" - inkscape:window-maximized="1" - inkscape:current-layer="svg4" /> - <path - d="m128 619q-7 7-11 9-4 2-16 3-12 1-43 3h-33v46h529v-4q2-6 14-116 12-110 14-116v-4h-40v4q0 1-4 34-4 33-15 67-11 34-31 53-38 36-143 36h-15q-70 0-85-1-15-1-16-12-1-3-1-282l1-278q7-7 12-9 5-2 25-4 20-2 63-2h27v-46h-12q-24 3-166 3-131 0-146-3h-11v46h33q42 1 51 3 9 2 19 12z" - fill="#e0e0e0" - transform="matrix(.01834526 0 0 -.01834526 2.718073 -692.23766)" - id="path2" - style="fill:#fb7e7e;fill-opacity:1" /> -</svg> diff --git a/addons/GodoTeX/iconRed.svg.import b/addons/GodoTeX/iconRed.svg.import deleted file mode 100644 index 5388489..0000000 --- a/addons/GodoTeX/iconRed.svg.import +++ /dev/null @@ -1,35 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/iconRed.svg-c5d138126a0c1922a0b6358d3c63aec4.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://addons/GodoTeX/iconRed.svg" -dest_files=[ "res://.import/iconRed.svg-c5d138126a0c1922a0b6358d3c63aec4.stex" ] - -[params] - -compress/mode=0 -compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 -compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false -process/normal_map_invert_y=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 |