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

Window Feature? #4

Open
lewisakura opened this issue Nov 22, 2014 · 8 comments
Open

Window Feature? #4

lewisakura opened this issue Nov 22, 2014 · 8 comments
Milestone

Comments

@lewisakura
Copy link

What I mean by this is like pop up windows that you can move around, minimize, maximize and put it back into a small window again like Windows 7.

@dirthsj
Copy link
Contributor

dirthsj commented Nov 23, 2014

Just FYI, this is going to require a lot of work. Also: Bedrock does most of this automagically, if you care to use it...

List of difficult things needed to do this:

  • somehow force programs to rescale, probably impossible if it's not hard-coded into them
  • minimizing means we need a task bar to minimize them to.
  • redraw screen previously occupied
  • track mouse_drag events

List of easier things

  • buttons for doing this
  • containing the program (basically, make a window object and redirect to it while the program is running)

List of supporting things

  • running programs in parallel with desktop environment
  • provide a seperate terminate feature (normal terminate would crash entire OS)

@lewisakura
Copy link
Author

the terminate will be marked as a red X using the ice window api being made. it will close the parallel window which should end the program, else, use an error, like error( "", 0 ) and that should terminate the program.

@dirthsj
Copy link
Contributor

dirthsj commented Nov 29, 2014

I was going to just remove the program from the list of running programs, deleting all references to that program. It's much easier than trying to insert an error into the program.

(On the topic of errors: Should we have a BSOD? Otherwise the program is just going to disappear, with no error message)

@byte-chan
Copy link
Member

copy the LMNet OS BSOD :P
its awsum
and in src/lmnet/init.lua
function bsodError

@lewisakura
Copy link
Author

why not something like windows 7 BSOD? Like it could go:
(blue background)
FrostOS has crashed and has been shutdown. The program that was running was: (find a way of getting the program name without shell.getRunningProgram because that will return BSOD) and was probably the cause of the crash. Do NOT reboot your computer unless said so. Dumping crash report to disk... X% (Then it will create a file called BSOD.dmp and you can edit it for more information on the crash and append a number on it. Like it will do BSOD1.dmp and so on until 20 and then it will delete BSOD20.dmp)

@lewisakura
Copy link
Author

BSOD DUMP (EDIT THIS TO FIX):

if fs.exists("BSOD1.dmp") then
 fs.move("BSOD1.dmp", "BSOD2.dmp")
elseif (etc.)
end

@dirthsj
Copy link
Contributor

dirthsj commented Nov 30, 2014

This'll shift all files up one number, unlike yours which won't work if BSOD2.dmp already exists.

local nMaxDump = 0
local dumps = fs.list( "dumps" )
for _, dump in ipairs( dumps ) do
  local n = tonumber( dump:gmatch( "BSOD(%d+).dmp" ) ) --extract the number
  if n > nMaxDump then
    nMaxDump = n
  end
end
-- Delete 20th file
if fs.exists( "dumps/BSOD20.dmp" ) then
 fs.delete( "dumps/BSOD20.dmp" )
end
for i = nMaxDump, 1, -1 do
  fs.move( "BSOD" .. i .. ".dmp",  "BSOD" .. ( i + 1 ) .. ".dmp" )
end
--tada!  "BSOD1.dmp" is now free!

@dirthsj
Copy link
Contributor

dirthsj commented Nov 30, 2014

function shiftAll()
  local nMax, tDumps = 0, fs.list( "reports" )
  for k, v in pairs( tDumps ) do
    local n = v:match( "BSOD(%d+).dmp" )
    if n > nMax then
      n = nMax
    end
  end
  for i = nMax, 1, -1 do
   fs.move( "BSOD" .. i .. ".dmp", "BSOD" .. (i + 1) .. ".dmp" )
  end
end

@lewisakura lewisakura added this to the 1.0 milestone Jan 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants