Skip to content

✨ Editor improvements and feature additions#3526

Open
Strand8319 wants to merge 6 commits intowiremod:masterfrom
Strand8319:dev-fpga
Open

✨ Editor improvements and feature additions#3526
Strand8319 wants to merge 6 commits intowiremod:masterfrom
Strand8319:dev-fpga

Conversation

@Strand8319
Copy link

  • Updated editor rendering and visuals
  • Added connection waypoints
  • Added Undo/Redo functionality
  • Fixed Wire gate sorting behavior

@llysdal
Copy link
Member

llysdal commented Feb 16, 2026

image is it possible to restrain the minimap blue rectangle to the minimap area?

@llysdal
Copy link
Member

llysdal commented Feb 16, 2026

hover.txt
On this file it seems that the minimap doesn't render anything

@Strand8319
Copy link
Author

image is it possible to restrain the minimap blue rectangle to the minimap area?

Yes, I’ll fix it when I’m free

@Strand8319
Copy link
Author

hover.txt On this file it seems that the minimap doesn't render anything

Try copying all the nodes to a new tab

@llysdal
Copy link
Member

llysdal commented Feb 16, 2026

Also, FPGA has the "inside view" feature (toggle it on in top right settings -> FPGA -> allow inside view) It would be nice if this also rendered with the new bezier curves (The rendering of that can be found in entities/gmod_wire_fpga/cl_init.lua on line 143, DrawInsideView function)

@llysdal
Copy link
Member

llysdal commented Feb 16, 2026

Try copying all the nodes to a new tab

That does fix it, is it just an issue with older save files then?

@llysdal
Copy link
Member

llysdal commented Feb 16, 2026

The undo and redo works very nicely btw, I struggled with implementing that for a long time q: good job!

@Strand8319
Copy link
Author

Try copying all the nodes to a new tab

That does fix it, is it just an issue with older save files then?

Some files seems to not render on minimap, happened to me once with a new file, but I couldn't find the issue and replicate it later

@Strand8319
Copy link
Author

Also, FPGA has the "inside view" feature (toggle it on in top right settings -> FPGA -> allow inside view) It would be nice if this also rendered with the new bezier curves (The rendering of that can be found in entities/gmod_wire_fpga/cl_init.lua on line 143, DrawInsideView function)

Will add it today (hopefully)

@llysdal
Copy link
Member

llysdal commented Feb 16, 2026

It seems you cannot multiselect gates and waypoints and move them at the same time, you either move the gates or the waypoints. (Selecting the gates that the waypoints are inbetween does move the waypoints)

But it would be better if it does the expected thing and moves both gates and waypoints :)

@Strand8319
Copy link
Author

Strand8319 commented Feb 16, 2026

It seems you cannot multiselect gates and waypoints and move them at the same time, you either move the gates or the waypoints. (Selecting the gates that the waypoints are inbetween does move the waypoints)

But it would be better if it does the expected thing and moves both gates and waypoints :)

Thought it would be nice to keep waypoints on original position if you didn't select the second gate. But I'll change that

Original CubicBezier or QuadraticBezier creates a vector
It's not very good to Gmod when you create 20 vectors per frame

@llysdal
Copy link
Member

llysdal commented Feb 16, 2026

Original CubicBezier or QuadraticBezier creates a vector It's not very good to Gmod when you create 20 vectors per frame

I trust you've tested performance, then its fine :)

@llysdal
Copy link
Member

llysdal commented Feb 16, 2026

Also, the linter issues should preferrably be fixed, it seems it's mainly complaining about trailing whitespace

@llysdal
Copy link
Member

llysdal commented Feb 16, 2026

image slight request - really getting down to really minor things now qx In the editor the waypoints look like this, yet in the inside view it looks like this image I think you might be rendering waypoints with a different position offset or something..? it should be a straight line in my mind

@Strand8319
Copy link
Author

image slight request - really getting down to really minor things now qx In the editor the waypoints look like this, yet in the inside view it looks like this image I think you might be rendering waypoints with a different position offset or something..? it should be a straight line in my mind

Looks like I probably missed something somewhere, most likely in synthesizeData. I’ll check it when I’m free
(while I was checking this it wasn't so bad, guess full hd isn't enough)

@llysdal
Copy link
Member

llysdal commented Feb 16, 2026

On the minimap, we probably shouldn't render text as small boxes, how about not rendering text at all, but rendering labels? Heres a good file to test with
4-bit_cpu.txt

as you can see, text is rendered as boxes
image

Could we render labels in the minimap? (labels being the big text), or is it too annoying with regards to fonts and such?

surface.DrawOutlinedRect(x, y, size, size)

-- Calculate bounds of all nodes
if not self.Nodes[1] then return end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There might not be a node with id 1, and if there isn't then the minimap isnt rendered

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When i remove if not self.Nodes[1] then return end´, all my files render their minimap - why is it there?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When i remove if not self.Nodes[1] then return end´, all my files render their minimap - why is it there?

Checking if nodes exist the code will continue running, mb I'll use # or delete it completely

@Strand8319
Copy link
Author

On the minimap, we probably shouldn't render text as small boxes, how about not rendering text at all, but rendering labels? Heres a good file to test with 4-bit_cpu.txt

as you can see, text is rendered as boxes image

Could we render labels in the minimap? (labels being the big text), or is it too annoying with regards to fonts and such?

We could render labels. I'll play with fonts until I find best for it
Text gonna be removed from minimap

@llysdal
Copy link
Member

llysdal commented Feb 16, 2026

image This might not be needed, but when you multiclick drag gates with many inputs/outputs it draws the connections as straight lines until theyre connected to another gate - up to you whether this should also be bezier curves or just stay as straight lines q:

@Strand8319
Copy link
Author

image This might not be needed, but when you multiclick drag gates with many inputs/outputs it draws the connections as straight lines until theyre connected to another gate - up to you whether this should also be bezier curves or just stay as straight lines q:

like that?
изображение

@llysdal
Copy link
Member

llysdal commented Feb 16, 2026

like that?

yes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants