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

OC Circuit Programmer #11

Open
Victorious3 opened this issue Feb 9, 2015 · 30 comments
Open

OC Circuit Programmer #11

Victorious3 opened this issue Feb 9, 2015 · 30 comments
Labels

Comments

@Victorious3
Copy link
Owner

Just like the ComputerCraft program, but for OpenComputers.

And @skyem123 is going to do it.

@skyem123
Copy link
Collaborator

skyem123 commented Feb 9, 2015

I am working on it.

@skyem123
Copy link
Collaborator

Hrm, one big problem is the fact that ComputerCraft has APIs that OpenComputers doesn't.

@marysaka
Copy link
Contributor

You can write it then :p

@skyem123
Copy link
Collaborator

Yeah, that's what I'm planning to do.

  • Make GUI lib for graphical stuff
  • Make final program

@Victorious3
Copy link
Owner Author

At least you can get rid of my dirty hack overriding window's methods to implement a scissor test like that.

@skyem123
Copy link
Collaborator

Todo list for the GUI API

What needs to be done

  • Colour API
  • Character / String ouput
  • Simple line drawing
  • Make simple line drawing use smarter calculations when the "character" is more than one character unicode.sub(character:rep(math.ceil((x2 - x1) / unicode.len(character))), 1, (x2 + 1) - x1)
  • Simple line drawing with iterators
  • Working single click buttons
  • Basic controls (menus, buttons, etc), with relative positions (to size of screen), (from 0.0 to 1.0)
  • Title bar
  • Basic window functions
  • Right click support
  • Double click support
  • Drag support
  • Keyboard input
  • Buttons
  • Basic controls
  • Basic page system
  • Scrollable page
  • Menus
  • Simple dialogue box (nothing in it, just a title bar)
  • Dialogue box with controls

Don't need to do, and I'm too dumb to understand and implement

  • Diagonal line drawing
  • Diagonal line drawing with iterators
  • Diagonal line drawing with length and direction
  • Basic control and position system (basic layouts)

Don't need to do

  • Simple line drawing with length and direction (vertical / horizontal)
  • Simple rectangle drawing
  • Customizable line drawing using iterators

@skyem123
Copy link
Collaborator

Todo list for the program

  • Need GUI Lib
  • Autodetect correct peripheral if peripheral address argument not given
  • Title Bar with information and close button
  • Main menu (button on title bar)
  • Load circuit information and draw on "page"
  • Single click to get name + select
  • Right click to open menu for part (maybe also double click? single click + [main menu -> edit part]?)
  • Menu has current settings?
  • Use dialogue boxes with controls to edit parts
  • Finish todo list

@skyem123
Copy link
Collaborator

Should I make a gist to put my WIP of my programing?

@Victorious3
Copy link
Owner Author

You should and, btw, I hardcoded all the controls using a few simple mouse intersection tests. It is nothing you'd need a special library for. It isn't meant to be complete, as long as it works it is fine.

@Techokami
Copy link

Imho it would be nice to have a full API for other users to make GUI programs in OC, too, but that can be for after getting the IC program finished.

Sent from my Windows Phone


From: Vic Nightfallmailto:[email protected]
Sent: ‎2/‎26/‎2015 10:16 AM
To: Victorious3/Integrated-Circuitsmailto:[email protected]
Subject: Re: [Integrated-Circuits] OC Circuit Programmer (#11)

You should and, btw, I hardcoded all the controls using a few simple mouse intersection tests. It is nothing you'd need a special library for. It isn't meant to be complete, as long as it works it is fine.


Reply to this email directly or view it on GitHub:
#11 (comment)

@skyem123
Copy link
Collaborator

Yeah, I'm trying to make the GUI API as flexible as possible for that reason.

@skyem123
Copy link
Collaborator

Gah. I'm too dumb to understand diagonal lines, so I'm giving up (on diagonal lines).

@GopherAtl
Copy link

at the risk of self-promotion, there is my gui library, GML, over in OpenPrograms You could use that rather than start from scratch on the gui stuff. The repo wiki is pretty thorough, and there's sample programs in the gml/bin directory, as well as the CompViewer program Kenny made, which uses it

@skyem123
Copy link
Collaborator

Well, here is my progress so far: https://gist.github.com/skyem123/529593c86a36f1d38a83

@skyem123
Copy link
Collaborator

@GopherAtl, your GUI lib seems very large and complex, though I might be able to take some code from it. The one problem is licensing (sadly, I am kinda scared of this stuff), and so will you allow me to use your code in CC0-licensed code?
Edit: CC0 is https://creativecommons.org/about/cc0

@GopherAtl
Copy link

there's not a licence file, and I suppose there should be, but it's wtfpl in the truest sense, so do wtf you want XD

It definitely is rather large and complex, though, and may not be well-suited to this project. If you have hopes of being able to pluck out and use a few bits without using the whole thing, you might find that difficult.

@skyem123
Copy link
Collaborator

Heh, thank you! 😄

@skyem123
Copy link
Collaborator

Okay, I'm probably going to have to continue working on this...

@skyem123
Copy link
Collaborator

skyem123 commented May 7, 2015

Gah. I'm honestly not sure what to do with this...

@skyem123
Copy link
Collaborator

@Victorious3, do you still want me to do this?

@Victorious3
Copy link
Owner Author

Sure.

@skyem123
Copy link
Collaborator

Okay... @Victorious3, I have run out of motivation to do this, and you seem to know a lot more about programming (especially graphics) than me... can you please do this?

@Victorious3
Copy link
Owner Author

@skyem123
Copy link
Collaborator

Please... You can do this better and quicker than I can...

@Pyeroh
Copy link

Pyeroh commented Oct 24, 2015

Eyh @skyem123, don't give up. What do you need to do ? Programming is my job, and I'd be glad to give a hand. Just make a list of what you really need, and if it's not me, anyone would be able to give you bits of code to close this issue :D

@skyem123
Copy link
Collaborator

@Pyeroh, to be honest, @Victorious3 is considering dropping the feature that this relies on, so I don't want to work on something that would be useless...
and I also haven't really designed what I really wanted...

@Victorious3
Copy link
Owner Author

No, I'm not.
EDIT: One could technically write an "emulator" for the CC program. Makes sense since it means that you dont have to maintain two separate programs.

@skyem123
Copy link
Collaborator

@Victorious3, also you need to fix the CC program, it's rendering is slightly broken on the latest ComputerCraft...

@skyem123
Copy link
Collaborator

@Victorious3, if I write an minimal CC emulator, will you fix bugs in your CC program and make it less horrible?

@Victorious3
Copy link
Owner Author

@skyem123 Mkay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants