Posted 30 May 2014 - 06:45 PM
I have a two tables[x][y] with one having a character in each spot representing the text data of the screen, and another table with {textColor, backColor} of each spot on the screen, now I want to create scrollX and scrollY to scroll the screen, these functions can accept arguements with a negative and positive values, if 0 then it won't scroll if a negative value will scroll backwards, if a positive value will scroll forwards, and I'm going to make this for scrolling horizontally for the X value and vertically for the Y value. I could do this with if values to check if it's a positive, a negative or a neutral value, but I came here to find out if anyone knows a more efficient way to solve this issue for scrolling, perhaps using a for loop or something.
I don't need to trim the table with values that go over the boundaries for example if I scroll a table to go below 1 so the placeholder -2 could contain a value, I don't mind because I have a table trimming function so I can sort of like table:sub(1, 51).
Regards
Augustas
I don't need to trim the table with values that go over the boundaries for example if I scroll a table to go below 1 so the placeholder -2 could contain a value, I don't mind because I have a table trimming function so I can sort of like table:sub(1, 51).
Regards
Augustas
Edited on 30 May 2014 - 06:04 PM