Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ability to display 32 bit integer #171

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Added ability to display 32 bit integer #171

wants to merge 6 commits into from

Conversation

alnyan
Copy link

@alnyan alnyan commented Nov 25, 2015

Added both signed and unsigned ints.
Top bus = 16 upper bits
Right bus = 16 lower bits
May be kinda buggy, but everything works fine for me.
(Related to issue #170 )

Edit: I can reformat/refactor some code if needed.
2015-11-25_11 52 41

@Victorious3
Copy link
Owner

Also, what's about the bottom bus? Is it just there for decoration? I want it to be obvious, and for that you'd probably need an indicator inside the GUI and not render the third bus

@alnyan
Copy link
Author

alnyan commented Nov 25, 2015

I may rework some code so I'll add support for up to 48-bit integers:
then bottom bus will be lower 16 bits, right bus - middle 16 bits, etc.
I didn't change GUI in my pull request. Just added ability to show 32-bit numbers.

@alnyan
Copy link
Author

alnyan commented Nov 25, 2015

Okay, now correcting mistakes you've mentioned.

@Victorious3
Copy link
Owner

Looks good so far, but I'd prefer if you could configure it inside the GUI somehow...

What about this: You combine short and int (+48 bit?) into one category and then allow to freely configure the sides. If you only select one its going to be short, two is int and three is your 48bit integer. I'd probably do this with three mode switches that work similar to the CAD, around my render of the segment. Adding to this, you'd also have to change getConnectionTypeAtSide accordingly.

I'm going to pull it anyways, this is just if you want to do it yourself.

@alnyan
Copy link
Author

alnyan commented Nov 27, 2015

Alright, but I'm very bad at GUI coding. I'll try, though.

@skyem123
Copy link
Collaborator

skyem123 commented Jan 6, 2016

How is progress on this going, @Awesome2K?

@alnyan
Copy link
Author

alnyan commented Jan 6, 2016

Well, no luck with GUI. My text just doesn't get rendered. Still trying...
I've added something like half-long (48bit) integer, top bus - first 16 bits, left bus - middle 16 bits and bottom bus - last 16 bits.

@Victorious3
Copy link
Owner

@Awesome2K If you have any questions on it I'd be glad to answer them, just join IRC (server: irc.esper.net, channel: #sapphire)

public static final int MODE_INT_UNSIGNED = 5;
public static final int MODE_FLOAT = 6;
public static final int MODE_BINARY_STRING = 7;
public static final int MODE_MANUAL = 8;

Copy link
Owner

Choose a reason for hiding this comment

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

You can't just change these, it would break backwards compatibility. You need to add int to the end as 7/8

@Victorious3
Copy link
Owner

I'd still prefer a solution where you can change the input sides via the GUI, but I'm going to pull it like this if you don't want to do that.

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.

3 participants