Jump to content




Help resizing program to use monitor?


  • You cannot reply to this topic
2 replies to this topic

#1 jonny190

  • Members
  • 9 posts

Posted 30 December 2014 - 12:27 AM

Not sure if i need a new thread but i have http://pastebin.com/GTssSbsi that gives me the ability to view quantities of items etc just wonering if anyone can help me resize it to a 4x4 monitor?

#2 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 30 December 2014 - 12:52 AM

Split to new topic.

#3 metron80

  • Members
  • 55 posts
  • LocationSolitude, Skyrim

Posted 03 January 2015 - 04:53 PM

You need to be continuously checking if the terminal resizes using os.PullEvent(). Example:
while true do
  os.pullEvent("term_resize")
  local w, h = term.getSize()
  print('Term Size: '..w..', '..h)
  --you should redraw your user interface here to ensure it fills the entire screen and is not clipped
end
If it resizes, you have to adjust you GUI to fit the new screen.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users