Digital-Logic-Sim-CE icon indicating copy to clipboard operation
Digital-Logic-Sim-CE copied to clipboard

Merge #72, #59, #45, Refactoring and Theme System

Open VitoBarra opened this issue 2 years ago • 1 comments

Merged https://github.com/DigitalLogicSimCommunity/Digital-Logic-Sim-CE/pull/45. Made some alterations to to fix bugs, including making it work with zoom, making it work with small .bin files, and changing the IO to busses for ease of use. Merged https://github.com/DigitalLogicSimCommunity/Digital-Logic-Sim-CE/pull/59. Merged https://github.com/DigitalLogicSimCommunity/Digital-Logic-Sim-CE/pull/72. Fixed 2 minor bugs.

In addition I have done

  • Major refactoring of the project. (The important part of this PR :P)
  • Added a Theme system for customizable wire and signal colors.
  • Enhanced the signal property menu to allow for group size and bus value changes

~~Know Issue:~~

  • ~~Brocken Pin name display (requires further refactoring)~~
  • ~~Preview signal misplacement with scale change~~

Future feature neaded:

  • Ability to Save\load Selected theme Color (Theme System completion)
  • Ability to Save\load Group size
  • Ability to Save\load Signal WireType

To implement these features, the format of save files needs to be reworked. So, I thought it would be great if the save file of this version could be made cross-compatible with the original DLS. This version will create a folder in the project directory containing a "compatible" version of the save file (although it's not fully completed yet; there are errors in the indexing of some pins that need to be fixed, but I don't have the time to work on it right now).

also I haven't yet rewritten the load system to use the "new" file format, and this also needs to be done.

Added new keybindings:

  • Q and E: to cycle between default themes.
  • R and F: Change the group Size.
  • Save changes made in the GroupProperty menu using Enter and Space.
  • Discard changes made in the GroupProperty menu using Exit.
  • Use up arrow (+1) and down arrow (-1) to adjust integer input fields in the GroupProperty menu.

I'm opening this despite the lack of some feature to let the community know about this work. Unfortunately, I've run out of time to dedicate to this project for now. So if anyone is interested in adding the missing feature starting with this PR I would be grateful.

Hopefully If I can find some time I will continue to work on this from time to time

Credits haven't been updated

VitoBarra avatar May 02 '23 17:05 VitoBarra

When will this PR be accepted? it's got a lot of cool features

crispeeweevile avatar Jul 10 '23 19:07 crispeeweevile

This is so cool, why hasn't it been approved yet?

901238746 avatar Jun 16 '24 14:06 901238746

Man someone should approve this. Idk how to code but I dont think any of it is going to alt F4 the game

901238746 avatar Jun 16 '24 17:06 901238746

I'd love this pull request because Im making a 11x16(11-bit 16 addresses) For my ALU and later I might need to make it 16 by 16 so that it would work with a better version of my ALUs LU(Logic Unit) so it can do more operations and comparisions. I just need more space. I made this in the original and I would hate it if I had to make it again.

901238746 avatar Jun 16 '24 17:06 901238746

This should be good to go, some parts of the main menu are not very nice but they work

VitoBarra avatar Jun 28 '24 16:06 VitoBarra

Hey, I've been trying the PR, seems good in the Unity Editor, so far. However, when producing a release build, the input system just stops working with pins, so wires don't work nor the activation/deactivation of the pins signal.

I suspect it's an issue with the new Unity Input system. I can reproduce the issue in the Unity Editor when changing the Event System components to the new suggested Input System UI Input Module.

My next thing on the list is to build the main branch's version and see if the issue is present there too, so I can discard the source code’s fault. Otherwise, if the main branch does work correctly, maybe it would be necessary to git bisect and revert whatever the change caused the button's fault.

I don’t know if you are noticing the same on your end? It may be an issue with Unity in Linux.

AOx0 avatar Jul 08 '24 17:07 AOx0

It happens on my machine (Windows) as well. I will work on it, but after a first investigation, I found out that issues arise when the SebInput Module is used. This module depends on the new input system, so probably needs to be updated or not used, as in the case of the signal handler that works fine. I added a package (in the 3rdparty folder) that should be useful for debugging this problem.

VitoBarra avatar Jul 08 '24 23:07 VitoBarra

Thank you as always Vito!

Just one little nitpick, I don't know if this is intentional, but the changing of pin colors does not display the correct color to be placed. i.e. It displays red but when placed the pin is green.

I'm willing to merge as-is and fix later tho, so I'll be just waiting for your confirmation whether to commit the merge or not.

AOx0 avatar Jul 16 '24 20:07 AOx0

I'm not sure that I understand the concern, but it is intentional that selecting the color for signals (input/output chip pins) and cables requires separate actions. With this said the PR should be ready c:

VitoBarra avatar Jul 16 '24 23:07 VitoBarra

Thank you Vito :D

AOx0 avatar Jul 21 '24 00:07 AOx0