Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Alle Funktionen
- -- design_fillMon(letter, bColor)
- -- design_redrawMonitor(buttons, bColor, hColor, tColor, menuBar, invisible)
- -- design_dateiMenu(dateiOpen, tColor, hColor, bColor)
- -- design_bearbeitenMenu(bearbeitenOpen, tColor, hColor, bColor)
- -- design_helpMenu(buttons, bColor, hColor, tColor, menuBar)
- -- design_drawButtons(buttons)
- -- object_checkIfClicked(objectX, objectY, clickedX, clickedY)
- -- object_undoLastObject(buttons, hColor, tColor, bColor)
- -- prog_numberToColor(colorPos)
- -- prog_setButtonSettings(buttonFX, buttonSX)
- -- prog_changeSettings(buttons, hColor, tColor, bColor, clickedTColor, clickedBColor, menuBar)
- -- prog_closeMenus(buttons, bColor, hColor, tColor, menuBar, invisible)
- -- prog_getMidOButton(buttonFX, buttonFY, buttonSX, buttonSY, text)
- -- prog_setProgName()
- -- prog_saveProject(buttons, progName, backgroundC, textC)
- -- prog_loadProject()
- -- prog_compileObjects(buttons, progName)
- -- Tables
- colorTable = {
- colors.white,
- colors.orange,
- colors.magenta,
- colors.lightBlue,
- colors.yellow,
- colors.lime,
- colors.pink,
- colors.gray,
- colors.lightGray,
- colors.cyan,
- colors.purple,
- colors.blue,
- colors.brown,
- colors.green,
- colors.red,
- colors.black
- };
- -- Funktionen
- function design_fillMon(letter, bColor, menuBar)
- if menuBar then
- start = 2;
- else
- start = 1;
- end
- for row = start,19 do
- for column = 1,51 do
- term.setTextColor(colors.lightGray);
- term.setBackgroundColor(bColor);
- term.setCursorPos(column, row);
- term.write(letter);
- end
- end
- if not menuBar then
- term.setCursorPos(26,1)
- term.write("L")
- end
- end
- function design_redrawMonitor(buttons, bColor, hColor, tColor, menuBar, invisible)
- term.clear();
- local mainWindow = paintutils.loadImage(".mainWindow");
- paintutils.drawImage(mainWindow, 1, 1);
- design_fillMon("X", bColor, menuBar);
- if not invisible then
- design_drawButtons(buttons);
- end
- if menuBar then
- term.setCursorPos(1,1);
- term.setBackgroundColor(hColor);
- term.setTextColor(tColor);
- term.write(" ");
- term.setCursorPos(1,1);
- term.write("Datei Bearbeiten ^ ?");
- term.setBackgroundColor(colors.red);
- term.write("X");
- term.setBackgroundColor(bColor);
- end
- end
- function design_dateiMenu(dateiOpen, tColor, hColor, bColor, buttons, menuBar, invisible)
- if (not dateiOpen) then
- design_redrawMonitor(buttons, bColor, hColor, tColor, menuBar, invisible);
- term.setTextColor(tColor);
- term.setBackgroundColor(hColor);
- term.setCursorPos(1,2);
- term.write(" Neu ");
- term.setCursorPos(1,3);
- term.write(" Speichern ");
- term.setCursorPos(1,4);
- term.write(" Projekt speichern ");
- term.setCursorPos(1,5);
- term.write(" Projekt laden ");
- return true;
- else
- design_redrawMonitor(buttons, bColor, hColor, tColor, menuBar, invisible);
- return false;
- end
- end
- function design_bearbeitenMenu(bearbeitenOpen, tColor, hColor, bColor, buttons, menuBar, invisible)
- if (not bearbeitenOpen) then
- design_redrawMonitor(buttons, bColor, hColor, tColor, menuBar, invisible);
- term.setTextColor(tColor);
- term.setBackgroundColor(hColor);
- term.setCursorPos(7,2);
- term.write(" Rueckgaengig ");
- term.setCursorPos(7,3);
- term.write(" Einstellungen ");
- return true;
- else
- design_redrawMonitor(buttons, bColor, hColor, tColor, menuBar, invisible);
- return false;
- end
- end
- function design_helpMenu(buttons, bColor, hColor, tColor, menuBar, invisible)
- term.setBackgroundColor(colors.gray);
- term.setTextColor(colors.white);
- term.setCursorPos(11,4);
- term.write(" ");
- term.setBackgroundColor(colors.red);
- term.write("X");
- term.setBackgroundColor(colors.gray);
- term.setCursorPos(11,5);
- term.write(" Indem man 2x auf die ");
- term.setCursorPos(11,6);
- term.write(" Editierungszone klickt ");
- term.setCursorPos(11,7);
- term.write(" erstellt man einen Button. ");
- term.setCursorPos(11,8);
- term.write(" Unter Bearbeiten findet ");
- term.setCursorPos(11,9);
- term.write(" man ein Einstellungsmenue ");
- term.setCursorPos(11,10);
- term.write(" mit dem man die Farbe des ");
- term.setCursorPos(11,11);
- term.write(" spaeteren Programmes ");
- term.setCursorPos(11,12);
- term.write(" und dessen Textfarbe ");
- term.setCursorPos(11,13);
- term.write(" festlegen kann. ");
- term.setCursorPos(11,14);
- term.write(" L - Menu Bar aus/einklappen ");
- term.setCursorPos(11,15);
- term.write(" K - Buttons un/sichtbar ");
- term.setCursorPos(11,16);
- term.write(" ");
- local waitForExit = true;
- while (waitForExit) do
- event, side, x, y = os.pullEvent("mouse_click");
- if (x == 39 and y == 4) then
- design_redrawMonitor(buttons, bColor, hColor, tColor, menuBar, invisible);
- waitForExit = false;
- end
- end
- end
- function design_drawButtons(buttons)
- buttonAttributes = 8;
- curTableNumber = 1;
- if (#buttons == 0) then
- return;
- end
- for i = 1, (#buttons / buttonAttributes) do
- local buttonText = buttons[curTableNumber];
- local bColor = buttons[curTableNumber + 1];
- local tColor = buttons[curTableNumber + 2];
- local fXPos = buttons[curTableNumber + 3];
- local fYPos = buttons[curTableNumber + 4];
- local sXPos = buttons[curTableNumber + 5];
- local sYPos = buttons[curTableNumber + 6];
- local code = buttons[curTableNumber + 7];
- for yPos = fYPos, sYPos do
- for xPos = fXPos, sXPos do
- term.setBackgroundColor(bColor)
- term.setCursorPos(xPos, yPos);
- term.write(" ");
- end
- end
- x, y = prog_getMidOButton(fXPos, fYPos, sXPos, sYPos, buttonText);
- term.setTextColor(tColor);
- term.setCursorPos(x, y);
- term.write(buttonText);
- curTableNumber = curTableNumber + 8;
- end
- end
- function object_checkIfClicked(objectX, objectY, clickedX, clickedY)
- local objectX_a = objectX[1];
- local objectX_b = objectX[2];
- local objectY_a = objectY[1];
- local objectY_b = objectY[2];
- if (clickedX >= objectX_a and clickedX <= objectX_b) then
- if (clickedY >= objectY_a and clickedY <= objectY_b) then
- return true;
- else
- return false;
- end
- else
- return false;
- end
- end
- function object_undoLastObject(buttons, hColor, tColor, bColor, menuBar, invisible)
- tableLength = #buttons;
- for i = 1,8 do
- table.remove(buttons, #buttons);
- end
- design_redrawMonitor(buttons, bColor, hColor, tColor, menuBar, invisible);
- end
- function prog_numberToColor(colorPos)
- return colorTable[colorPos];
- end
- function prog_setButtonSettings(buttonFX, buttonSX)
- backgroundC = colors.yellow;
- textC = colors.black;
- text = "";
- textSelected = false;
- settings = true;
- saved = false;
- maxTextChars = buttonSX - buttonFX + 1;
- term.setTextColor(colors.white);
- term.setBackgroundColor(colors.black);
- term.setCursorPos(1,1);
- w, h = term.getSize();
- for i = 5,15 do
- for j = 5, w - 4 do
- term.setBackgroundColor(colorTable[8]);
- term.setCursorPos(j, i);
- term.write(" ");
- end
- end
- term.setBackgroundColor(colors.lightGray);
- term.setCursorPos(15,5);
- term.write(" Button Einstellungen ");
- term.setBackgroundColor(colors.gray);
- term.setCursorPos(33,9);
- term.write("Hintergrund");
- term.setCursorPos(33,12);
- term.write("Text Farbe");
- term.setCursorPos(14,8);
- term.write("Text");
- term.setCursorPos(8,9);
- term.write("maximal "..maxTextChars.." Zeichen");
- term.setBackgroundColor(colors.lightGray);
- term.setCursorPos(7,10);
- term.write(" ");
- term.setCursorPos(7,13);
- term.write(" OK ");
- term.setBackgroundColor(colors.gray);
- term.setCursorPos(47, 5);
- term.setBackgroundColor(colors.red);
- term.write("X");
- term.setBackgroundColor(colors.gray);
- for i = 1, #colorTable do
- term.setBackgroundColor(colorTable[i]);
- term.setCursorPos(i + 30, 10);
- term.write(" ");
- term.setBackgroundColor(colorTable[i]);
- term.setCursorPos(i + 30, 13);
- term.write(" ");
- end
- while settings do
- for i,v in pairs(colorTable) do
- if backgroundC == v then
- term.setBackgroundColor(colors.gray);
- term.setTextColor(colors.yellow);
- term.setCursorPos(i + 30, 11);
- term.write("^");
- end
- if textC == v then
- term.setBackgroundColor(colors.gray);
- term.setTextColor(colors.yellow);
- term.setCursorPos(i + 30, 14);
- term.write("^");
- end
- end
- if (textSelected) then
- term.setCursorPos(7 + string.len(text), 10);
- term.setCursorBlink(true);
- else
- term.setCursorBlink(false);
- end
- event, side, x, y = os.pullEvent()
- if event == "mouse_click" then
- if x > 30 and x <= 46 and y == 10 then
- term.setBackgroundColor(colors.gray);
- term.setCursorPos(31,11);
- term.write(" ");
- term.setCursorPos(31,14);
- term.write(" ");
- backgroundC = colorTable[x - 30];
- textSelected = false;
- elseif x > 30 and x <= 46 and y == 13 then
- term.setBackgroundColor(colors.gray);
- term.setCursorPos(31,11);
- term.write(" ");
- term.setCursorPos(31,14);
- term.write(" ");
- textC = colorTable[x - 30];
- textSelected = false;
- elseif x >= 7 and x <= 26 and y == 10 then
- textSelected = true;
- elseif x >= 7 and x <= 11 and y == 13 then
- settings = false;
- saved = true;
- elseif x == 47 and y == 5 then
- settings = false;
- else
- textSelected = false;
- end
- elseif event == "char" and textSelected then
- if string.len(text) < maxTextChars then
- text = text..side;
- term.setBackgroundColor(colors.lightGray);
- term.setCursorPos(7,10);
- term.write(" ");
- term.setCursorPos(7,10);
- term.write(text);
- term.setCursorPos(7,11);
- term.setBackgroundColor(colors.gray);
- term.write(" ");
- else
- term.setCursorPos(7,11);
- term.setTextColor(colors.red);
- term.write("!Textlaenge erreicht");
- end
- elseif event == "key" and textSelected then
- if side == 14 then
- text = string.sub(text, 1, string.len(text) - 1);
- term.setBackgroundColor(colors.lightGray);
- term.setCursorPos(7,10);
- term.write(" ");
- term.setCursorPos(7,10);
- term.write(text);
- term.setCursorPos(7,11);
- term.setBackgroundColor(colors.gray);
- term.write(" ");
- end
- end
- end
- return text,backgroundC,textC,saved;
- end
- function prog_changeSettings(buttons, hColor, tColor, bColor, clickedTColor, clickedBColor, menuBar, invisible)
- local chooseTColorX = {17,32};
- local chooseTColorY = {12,12};
- local chooseBColorX = {17,32};
- local chooseBColorY = {9,9};
- local exitX = {33,33};
- local exitY = {7,7};
- term.setBackgroundColor(colors.gray);
- term.setTextColor(colors.white);
- term.setCursorPos(16,7);
- term.write(" ");
- term.setBackgroundColor(colors.red);
- term.write("X");
- term.setBackgroundColor(colors.gray);
- term.setCursorPos(16,8);
- term.write(" Hintergrund: ");
- term.setCursorPos(16,9)
- term.write(" ");
- term.setCursorPos(17,9);
- for i = 1,16 do
- term.setBackgroundColor(colorTable[i]);
- term.write(" ");
- end
- term.setBackgroundColor(colors.gray);
- term.setCursorPos(16,10);
- term.write(" ");
- term.setCursorPos(16,11);
- term.write(" Text: ");
- term.setCursorPos(16,12)
- term.write(" ");
- term.setCursorPos(17,12);
- for i = 1,16 do
- term.setBackgroundColor(colorTable[i]);
- term.write(" ");
- end
- term.setBackgroundColor(colors.gray);
- term.setCursorPos(16,13);
- term.write(" ");
- for k, v in pairs(colorTable) do
- if (v == clickedTColor) then
- term.setTextColor(colors.yellow);
- term.setCursorPos(16 + k, 13);
- term.write("^");
- end
- if (v == clickedBColor) then
- term.setTextColor(colors.yellow);
- term.setCursorPos(16 + k, 10);
- term.write("^");
- end
- end
- local waitForExit = true;
- while (waitForExit) do
- event, side, x, y = os.pullEvent("mouse_click");
- if (object_checkIfClicked(chooseTColorX, chooseTColorY, x, y)) then
- clickedTColor = colorTable[x - 16];
- for k, v in pairs(colorTable) do
- if (v == clickedTColor) then
- term.setCursorPos(17,13);
- term.write(" ");
- term.setTextColor(colors.yellow);
- term.setCursorPos(16 + k, 13);
- term.write("^");
- end
- if (v == clickedBColor) then
- term.setCursorPos(17,10);
- term.write(" ");
- term.setTextColor(colors.yellow);
- term.setCursorPos(16 + k, 10);
- term.write("^");
- end
- end
- elseif (object_checkIfClicked(chooseBColorX, chooseBColorY, x, y)) then
- clickedBColor = colorTable[x - 16];
- for k, v in pairs(colorTable) do
- if (v == clickedTColor) then
- term.setCursorPos(17,13);
- term.write(" ");
- term.setTextColor(colors.yellow);
- term.setCursorPos(16 + k, 13);
- term.write("^");
- end
- if (v == clickedBColor) then
- term.setCursorPos(17,10);
- term.write(" ");
- term.setTextColor(colors.yellow);
- term.setCursorPos(16 + k, 10);
- term.write("^");
- end
- end
- elseif (object_checkIfClicked(exitX, exitY, x, y)) then
- waitForExit = false;
- end
- end
- design_redrawMonitor(buttons, bColor, hColor, tColor, menuBar, invisible);
- return clickedTColor, clickedBColor;
- end
- function prog_closeMenus(buttons, bColor, hColor, tColor, menuBar, invisible)
- design_fillMon("X", bColor, menuBar);
- if not invisible then
- design_drawButtons(buttons);
- end
- if menuBar then
- term.setCursorPos(1,1);
- term.setBackgroundColor(hColor);
- term.setTextColor(tColor);
- term.write(" ");
- term.setCursorPos(1,1);
- term.write("Datei Bearbeiten ^ ?");
- term.setBackgroundColor(colors.red);
- term.write("X");
- term.setBackgroundColor(bColor);
- end
- return false, false;
- end
- function prog_getMidOButton(buttonFX, buttonFY, buttonSX, buttonSY, text)
- local buttonSizeX = buttonSX - buttonFX;
- local buttonSizeY = buttonSY - buttonFY;
- if (buttonSizeY % 2) then
- buttonSizeY = buttonSizeY - 1;
- end
- local y = buttonFY + math.ceil(buttonSizeY / 2);
- local x = buttonFX + math.ceil((buttonSizeX / 2) - (text:len() / 2));
- return x, y;
- end
- function prog_setProgName()
- term.setBackgroundColor(colors.gray);
- term.setTextColor(colors.white);
- term.setCursorPos(14,7);
- term.write(" ");
- term.setCursorPos(14,8);
- term.write(" ");
- term.setCursorPos(14,9);
- term.write(" Programmname: ");
- term.setCursorPos(14,10);
- term.write(" ");
- term.setCursorPos(14,11);
- term.write(" ");
- term.setCursorPos(14,12);
- term.write(" ");
- term.setCursorPos(15,10);
- progName = read();
- if (text == "") then
- prog_setProgName();
- end
- return progName;
- end
- function prog_saveProject(buttons, progName, backgroundC, textC)
- saved = false;
- term.setBackgroundColor(colors.gray);
- term.setTextColor(colors.white);
- term.setCursorPos(14,7);
- term.write(" ");
- term.setCursorPos(14,8);
- term.write(" ");
- term.setCursorPos(14,9);
- term.write(" Programmname: ");
- term.setCursorPos(14,10);
- term.write(" ");
- term.setCursorPos(14,11);
- term.write(" ");
- term.setCursorPos(14,12);
- term.write(" ");
- term.setCursorPos(15,10);
- projectName = read();
- if (projectName ~= "") then
- projectTable = {};
- table.insert(projectTable, 1, progName);
- table.insert(projectTable, 2, backgroundC);
- table.insert(projectTable, 3, textC);
- table.insert(projectTable, 4, buttons);
- file = fs.open(projectName, "w");
- file.write(textutils.serialise(projectTable));
- file.close();
- saved = true;
- end
- return saved;
- end
- function prog_loadProject()
- progs = fs.list("/");
- visibleProgs = {};
- choosedProject = "";
- visibleS = 1;
- scrollBarY = 7;
- scrollBarX = 15;
- scrollBarMaxLen = 20;
- loading = true;
- for i = scrollBarY - 1, scrollBarY + 5 do
- for j = scrollBarX - 1, scrollBarX + scrollBarMaxLen do
- term.setBackgroundColor(colors.gray);
- term.setCursorPos(j,i);
- term.write(" ");
- end
- end
- term.setCursorPos(scrollBarX, scrollBarY - 1);
- term.write("Laden:");
- term.setBackgroundColor(colors.red);
- term.setCursorPos(scrollBarX + scrollBarMaxLen, scrollBarY - 1);
- term.write("X");
- while loading do
- for i,v in pairs(progs) do
- visibleProgs = {};
- for i = visibleS, visibleS + 4 do
- curProg = progs[i];
- if string.len(curProg) > scrollBarMaxLen then
- curProg = string.sub(curProg, 1, scrollBarMaxLen);
- end
- table.insert(visibleProgs, curProg);
- end
- for i = scrollBarY, scrollBarY + 4 do
- for j = 0, scrollBarMaxLen - 1 do
- term.setCursorPos(scrollBarX + j, i);
- term.write(" ");
- end
- end
- term.setBackgroundColor(colors.lightGray);
- term.setCursorPos(scrollBarX - 1, scrollBarY - 1);
- term.write("");
- term.setTextColor(colors.gray)
- term.setCursorPos(scrollBarX,scrollBarY);
- term.write(visibleProgs[1]);
- term.setCursorPos(scrollBarX,scrollBarY + 1);
- term.write(visibleProgs[2]);
- term.setCursorPos(scrollBarX,scrollBarY + 2);
- term.write(visibleProgs[3]);
- term.setCursorPos(scrollBarX,scrollBarY + 3);
- term.write(visibleProgs[4]);
- term.setCursorPos(scrollBarX,scrollBarY + 4);
- term.write(visibleProgs[5]);
- end
- event, side, x, y = os.pullEvent()
- if event == "mouse_click" then
- if x >= scrollBarX and x <= 50 and y >= scrollBarY and y <= scrollBarY + 4 then
- -- Clicked program: progs[(y - scrollBarY) + visibleS]
- -- Ausgewähltes Programm: progs[(y - scrollBarY) + visibleS]
- term.setTextColor(colors.white);
- term.setCursorPos(1,15);
- term.write(" ");
- term.setCursorPos(1,15);
- term.write(progs[(y - scrollBarY) + visibleS]);
- loading = false;
- choosedProject = progs[(y - scrollBarY) + visibleS];
- elseif x == scrollBarX + scrollBarMaxLen and y == scrollBarY - 1 then
- loading = false;
- end
- elseif event == "mouse_scroll" then
- if side == -1 then
- if visibleS > 1 then
- visibleS = visibleS - 1;
- end
- elseif side == 1 then
- if visibleS < (#progs - 4) then
- visibleS = visibleS + 1;
- end
- end
- end
- end
- return choosedProject;
- end
- function prog_tableReverse(tableName)
- newTable = {};
- currentIndex = #tableName;
- counter = 1;
- for i = 1, #tableName / 8 do
- table.insert(newTable, counter, tableName[currentIndex - 7]);
- table.insert(newTable, counter + 1, tableName[currentIndex - 6]);
- table.insert(newTable, counter + 2, tableName[currentIndex - 5]);
- table.insert(newTable, counter + 3, tableName[currentIndex - 4]);
- table.insert(newTable, counter + 4, tableName[currentIndex - 3]);
- table.insert(newTable, counter + 5, tableName[currentIndex - 2]);
- table.insert(newTable, counter + 6, tableName[currentIndex - 1]);
- table.insert(newTable, counter + 7, tableName[currentIndex]);
- counter = counter + 8;
- currentIndex = currentIndex - 8;
- end
- return newTable;
- end
- function prog_compileObjects(buttons, progName, backgroundC, textC)
- buttonAttributes = 8;
- curTableNumber = 1;
- if (#buttons == 0) then
- return;
- end
- file = fs.open(progName, "w");
- file.writeLine("-- Variablen");
- file.writeLine("");
- file.writeLine("background = " .. backgroundC .. ";");
- file.writeLine("textcolor = " .. textC .. ";");
- file.writeLine("")
- file.writeLine("-- Design");
- file.writeLine("");
- file.writeLine("term.setBackgroundColor(background);");
- file.writeLine("term.setTextColor(textcolor);");
- file.writeLine("term.clear();");
- file.writeLine("term.setCursorPos(1,1);");
- file.writeLine("");
- for i = 1, (#buttons / buttonAttributes) do
- local buttonText = buttons[curTableNumber];
- local bColor = buttons[curTableNumber + 1];
- local tColor = buttons[curTableNumber + 2];
- local fXPos = buttons[curTableNumber + 3];
- local fYPos = buttons[curTableNumber + 4];
- local sXPos = buttons[curTableNumber + 5];
- local sYPos = buttons[curTableNumber + 6];
- local code = buttons[curTableNumber + 7];
- x, y = prog_getMidOButton(fXPos, fYPos, sXPos, sYPos, buttonText);
- file.writeLine("for yPos = " .. fYPos .. ", " .. sYPos .. " do");
- file.writeLine("");
- file.writeLine(" for xPos = " .. fXPos .. ", " .. sXPos .. " do");
- file.writeLine("");
- file.writeLine(" term.setBackgroundColor(" .. bColor .. ");");
- file.writeLine(" term.setCursorPos(xPos, yPos);");
- file.writeLine(" term.write(\" \");");
- file.writeLine("");
- file.writeLine(" end");
- file.writeLine("");
- file.writeLine("end");
- file.writeLine("");
- file.writeLine("term.setTextColor(" .. tColor .. ");");
- file.writeLine("term.setCursorPos(" .. x .. ", " .. y .. ");");
- file.writeLine("term.write(\"" .. buttonText .. "\");");
- file.writeLine("")
- curTableNumber = curTableNumber + 8;
- end
- buttons = prog_tableReverse(buttons)
- file.writeLine("-- Programmtechnisch");
- file.writeLine("");
- file.writeLine("term.setCursorPos(1,1);");
- file.writeLine("term.setBackgroundColor(colors.black);");
- file.writeLine("term.setTextColor(colors.white);");
- file.writeLine("");
- file.writeLine("while true do");
- file.writeLine("");
- file.writeLine("event, side, x, y = os.pullEvent(\"mouse_click\");");
- file.writeLine("")
- curTableNumber = 1;
- curButton = 1;
- for i = 1, (#buttons / buttonAttributes) do
- local buttonText = buttons[curTableNumber];
- local bColor = buttons[curTableNumber + 1];
- local tColor = buttons[curTableNumber + 2];
- local fXPos = buttons[curTableNumber + 3];
- local fYPos = buttons[curTableNumber + 4];
- local sXPos = buttons[curTableNumber + 5];
- local sYPos = buttons[curTableNumber + 6];
- local code = buttons[curTableNumber + 7];
- if (curButton == 1) then
- file.writeLine("if (x >= " .. fXPos .. " and x <= " .. sXPos .. " and y >= " .. fYPos .. " and y <= " .. sYPos .. ") then");
- file.writeLine("");
- else
- file.writeLine("elseif (x >= " .. fXPos .. " and x <= " .. sXPos .. " and y >= " .. fYPos .. " and y <= " .. sYPos .. ") then");
- file.writeLine("");
- end
- file.writeLine("-- Programmcode von X: \{".. fXPos ..",".. sXPos .."\} Y: \{".. fYPos ..",".. sYPos .."\} Text: ".. buttonText);
- file.writeLine("");
- file.writeLine(code);
- file.writeLine("");
- curTableNumber = curTableNumber + 8;
- curButton = curButton + 1;
- end
- file.writeLine("end");
- file.writeLine("");
- file.writeLine("end");
- file.writeLine("");
- file.writeLine("-- File created by ButtonCreator-V2.2");
- file.close();
- end
- -- Scripted by Streetboy_xD
- -- Please keep this text in the program.
Advertisement
Add Comment
Please, Sign In to add comment