Screenshot:
If you want to save current settings to file use 'Save' button.
Download(MediaFire)(Too big for pastebin)
near 65% of tpt.drawpixel = main window
10% of tpt.drawpixel =buttons(in 2 states)
10% of tpt.drawpixel =cheackbox
10% of tpt.drawpixel =Addes color to tpt menu icons
3%=need to update it.
1.5%=functions like: remove clne,reset temp,etc
0.5%=Save button (Saving curently selected checkbox to file and read it file on tpt startup)
(all functions of this on screenshot)
jacob1:
This script is literally over 3MB of tpt.drawpixel, almost 100000 lines of them. It's pretty obviously CGI (just generating tpt.drawpixels instead of tpt pixels ...).
I'm not sure why it has to be so large or what it does, but I don't really want to run this. I also can't approve the one you submitted to the script server because I can't look through 100000 lines of tpt.drawpixel to make sure it doesn't do anything suspicious.Here is the script with all tpt drawline instances removed via regex:
The script to me looks harmless. The only file IO in it reads and writes to a file called luamod.ini. No instances of os.execute, lua socket or http from searches I ran on it.
ssccsscc:
near 65% of tpt.drawpixel = main window
10% of tpt.drawpixel =buttons(in 2 states)
10% of tpt.drawpixel =cheackbox
10% of tpt.drawpixel =Addes color to tpt menu icons
3%=need to update it.
1.5%=functions like: remove clne,reset temp,etc
0.5%=Save button (Saving curently selected checkbox to file and read it file on tpt startup)(all functions of this on screenshot)
First of all, start by drawing lines. Don't do it pixel by pixel. A few lines can take away the task of drawing hundreds of pixels. Better yet, use fillrect, and draw filled rectangles. Suddenly you only have maybe 300 lines total. That's like a 99.9% reduction in size.
It's something like tpt.fillrect. Check the lua api in our wiki. For the fading so it looks nice, use tpt.drawline and most likely you will never need to draw an individual pixel in the whole thing.
I will also add, it looks great, and you did some nice work.
caranintast:
Good grief...
I don't know much about TPT's Lua implimentation, but shouldn't it be possible to replace most of those "tpt.drawpixel"s with a couple of loops?
Yes it would be possible. TPT's Lua supports all the standard Lua functions as far as I'm aware. Also, I have done loops in TPT too.