From 77c120038cfbfe93297d484f97b03b5ae3263e4c Mon Sep 17 00:00:00 2001 From: Igor Timofeev Date: Wed, 13 Jan 2016 22:56:22 +0300 Subject: [PATCH] aefaef --- Applications/Highlight/Highlight.lua | 10 ++++++++-- lib/syntax.lua | 10 +++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Applications/Highlight/Highlight.lua b/Applications/Highlight/Highlight.lua index 0fb8ee29..bf8d139f 100644 --- a/Applications/Highlight/Highlight.lua +++ b/Applications/Highlight/Highlight.lua @@ -1,6 +1,12 @@ local syntax = require("syntax") ecs.prepareToExit() -local data = ecs.universalWindow("auto", "auto", 40, 0xeeeeee, true, {"EmptyLine"}, {"CenterText", 0x262626, "Enter path to file"}, {"EmptyLine"}, {"Input", 0x262626, 0x880000, "Highlight.app/Resources/TestFile.txt"}, {"EmptyLine"}, {"Button", {0x33db80, 0xffffff, "GO!"}}) +local data = ecs.universalWindow("auto", "auto", 40, 0xeeeeee, true, {"EmptyLine"}, {"CenterText", 0x262626, "Enter path to file"}, {"EmptyLine"}, {"Input", 0x262626, 0x880000, "MineOS/Applications/Highlight.app/Resources/TestFile.txt"}, {"EmptyLine"}, {"Button", {0x33db80, 0xffffff, "GO!"}}) local path = data[1] -syntax.highlightFileForDebug(path, midnight) + +local strings = syntax.convertFileToStrings(path) +local xSize, ySize = gpu.getResolution() +buffer.square(1, 1, xSize, ySize, ecs.colors.green, 0xFFFFFF, " ") +buffer.draw(true) +syntax.viewCode(2, 2, 70, 20, strings, 1, 1, true, {from = {x = 6, y = 2}, to = {x = 3, y = 8}}) + ecs.waitForTouchOrClick() diff --git a/lib/syntax.lua b/lib/syntax.lua index 8ec8aac2..803d76b7 100644 --- a/lib/syntax.lua +++ b/lib/syntax.lua @@ -268,13 +268,13 @@ end syntax.setColorScheme(syntax.colorSchemes.midnight) --Епты бля! -local strings = syntax.convertFileToStrings("MineOS/Applications/Highlight.app/Resources/TestFile.txt") +-- local strings = syntax.convertFileToStrings("MineOS/Applications/Highlight.app/Resources/TestFile.txt") -local xSize, ySize = gpu.getResolution() -buffer.square(1, 1, xSize, ySize, ecs.colors.green, 0xFFFFFF, " ") -buffer.draw(true) +-- local xSize, ySize = gpu.getResolution() +-- buffer.square(1, 1, xSize, ySize, ecs.colors.green, 0xFFFFFF, " ") +-- buffer.draw(true) -syntax.viewCode(2, 2, 70, 20, strings, 1, 1, true, {from = {x = 6, y = 2}, to = {x = 3, y = 8}}) +-- syntax.viewCode(2, 2, 70, 20, strings, 1, 1, true, {from = {x = 6, y = 2}, to = {x = 3, y = 8}}) ----------------------------------------------------------------------------------------------------------------