Jump to content


Dave-ee Jones

Member Since 19 Jan 2013
Offline Last Active Nov 17 2017 02:35 AM
-----

Posts I've Made

In Topic: help with basic "Else" Thanks!

17 November 2017 - 02:38 AM

This is a little off-topic but you can make it a bit easier for your code to detect what you've said by doing something like this:

if info:lower() == "fine, thanks!" then
  print("No problem.")
end

The ':lower()' makes the string in 'info' lowercase, so you can do all kinds of capitalisation combos in your string and it won't care. Just makes it a bit easier on you and your code. :)

In Topic: Quick preview of my current project

03 November 2017 - 02:42 AM

 KingofGamesYami, on 01 November 2017 - 04:58 PM, said:

I think a preview would be incredibly difficult, if not impossible, to do correctly, considering the monitors are much larger than the original screen.

Similarly, displaying output on two displays which are different resolutions is a non-trivial problem. I do plan to add support for "mirroring" but only for monitors with the same width and height.

I have thought about an indicator of which monitor it's on, and I think that would be a good idea. I think flashing a 1px boarder on the current window when switching would be effective, though I would need additional windows to accomplish this... it would be inefficient and probably increase latency.

My thoughts were that it could be combined with a peripheral such as the Moarperipheral's keyboard to create an interesting concept. In addition, touch-to-mouse-click support will be added eventually, which will ignore which program is "active" and resume the program running on the clicked monitor with the mouse event. This would allow mouse-only programs to be used effectively.

I don't think it would be impossible..Since the monitor is still using the same resolution as the host computer (in a sense, it's still using the same amount of pixels per character even though the screen is bigger) and I'm assuming you're using window objects, therefore you can have a scrollbar on the buffer to scroll up and down, loading the screen as a window buffer rather than a program (if you catch my drift).

However you wouldn't need this. If you're just using CraftOS' CLI it doesn't matter - you can display it on the host without many problems.

Another method could just be swapping between tabs on your host that just get redirected to the selected monitor as well, instead of having the monitors 'hosting' an instance. While this may seem to limit your monitor, you could trick the program into thinking your computer's monitor size is bigger than it is (actually being the monitor itself), then your computer can handle the rest with scrollbars and things. This method requires the host program to catch events and pass them to the program, instead of the program catching it's own events - otherwise you'll have issues if it's a mouse-clickable GUI..

If you don't want to do any of these and you want to indicate which monitor your using, you could do it colour based, having a screen border on your client and on the monitor (or just a coloured pixel in a corner)..Or even have a backend menu like DISH does.

If you ask me, any way you look at it you've still got yourself into an event-catching mess, haha.

In Topic: Just wanted to share this

02 November 2017 - 11:49 PM

Do we really want to make MC great again though? It is a contemptuous game that promotes 12 year old behaviour.. :P

In Topic: Menu giving "Attempting to index ? (A nil value)"

02 November 2017 - 12:32 AM

View PostGamersUnited556, on 01 November 2017 - 11:41 PM, said:

Davee-ee Jones, Where would I implement that?

I was giving examples of effectively exitting a loop. It looks like (based on your code) that is has already been implemented, though. Good luck! :)

In Topic: Function embedded into list

01 November 2017 - 10:36 PM

View PostKingofGamesYami, on 01 November 2017 - 06:48 PM, said:

I would count "add" and "interface" as arguments because that's what they are. There's no reason to restrict program structure like this.

Completely agree. This would make it so you only need the one function, which has the arguments ('add','interface','001','1') passed to it. Easy.
Shark Language does this, btw :P