Jump to content




[Question] Frame.


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

#1 Mackan90096

  • Signature Abuser
  • 518 posts
  • LocationIn my basement.

Posted 03 June 2013 - 04:46 AM

Hi! I'm bored so I'm derping around with stuff.

But I'm wondering if you can make a frame around the term for multiple sizes.

If so, how?

Thanks // Mackan90096

#2 GravityScore

  • Members
  • 796 posts
  • LocationLand of Meh

Posted 03 June 2013 - 05:43 AM

Not sure which part of the term you are talking about - you mean using Lua, or modifying CC directly, to change the yellow/gray border around the term?

In Lua, that's simple:
width = 2
term.setBackgroundColor(colors.red)
w, h = term.getSize()
for x = 1, width do term.setCursorPos(1, x) term.clearLine() end
for x = h - width + 1, h do term.setCursorPos(1, x) term.clearLine() end
for i = 1, width do
  for x = 1, h do term.setCursorPos(i, x) term.write(" ") end
  for x = 1, h do term.setCursorPos(w - i + 1, x) term.write(" ") end
end

If you mean the actual gray/yellow border, you can unzip CC in the mods folder, and go to mods/ComputerCraft/textures, and in each of those folders in there are the image files for the computer, the borders, etc... Under GUI is the borders around the term.

#3 Mackan90096

  • Signature Abuser
  • 518 posts
  • LocationIn my basement.

Posted 03 June 2013 - 05:44 AM

View PostGravityScore, on 03 June 2013 - 05:43 AM, said:

Not sure which part of the term you are talking about - you mean using Lua, or modifying CC directly, to change the yellow/gray border around the term?

In Lua, that's simple:
width = 2
term.setBackgroundColor(colors.red)
w, h = term.getSize()
for x = 1, width do term.setCursorPos(1, x) term.clearLine() end
for x = h - width + 1, h do term.setCursorPos(1, x) term.clearLine() end
for i = 1, width do
  for x = 1, h do term.setCursorPos(i, x) term.write(" ") end
  for x = 1, h do term.setCursorPos(w - i + 1, x) term.write(" ") end
end

If you mean the actual gray/yellow border, you can unzip CC in the mods folder, and go to mods/ComputerCraft/textures, and in each of those folders in there are the image files for the computer, the borders, etc... Under GUI is the borders around the term.

Thanks.

I mean in LUA too





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users