This repository has been archived by the owner on Sep 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
345 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
4.99783031E8 | ||
1.86449353E9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
Inherit = 'View' | ||
IsSleepMode = false | ||
|
||
OnDraw = function(self, x, y) | ||
for _y, row in ipairs(Drawing.Buffer) do | ||
for _x, pixel in ipairs(row) do | ||
Drawing.WriteToBuffer(_x, _y, pixel[1], Drawing.FilterColour(pixel[2], Drawing.Filters.Greyscale), Drawing.FilterColour(pixel[3], Drawing.Filters.Greyscale)) | ||
end | ||
end | ||
end | ||
|
||
TryUnlock = function(self, password) | ||
local secureTextBox = self:GetObject('SecureTextBox') | ||
secureTextBox.Text = '' | ||
if password ~= '' and Settings:CheckPassword(password) then | ||
Log.i('Password correct, unlocking.') | ||
self.Visible = false | ||
self.Bedrock:SetActiveObject() | ||
self:OnUnlock(self.IsSleepMode) | ||
else | ||
Log.i('Password incorrect.') | ||
local label = self:GetObject('Label') | ||
local secureStartX = secureTextBox.X | ||
local labelStartX = label.X | ||
local maxDelta = 4 | ||
local steps = { | ||
-2, | ||
-4, | ||
-2, | ||
0, | ||
2, | ||
4, | ||
2, | ||
0, | ||
-1, | ||
-2, | ||
-1, | ||
0, | ||
1, | ||
2, | ||
1, | ||
0 | ||
} | ||
if Settings:GetValues()['UseAnimations'] then | ||
self.Bedrock:SetActiveObject() | ||
local i = 1 | ||
self.Bedrock:StartRepeatingTimer(function(newTimer) | ||
secureTextBox.X = secureStartX + steps[i] | ||
label.X = labelStartX + steps[i] | ||
i = i + 1 | ||
if i > #steps then | ||
self.Bedrock:StopTimer(newTimer) | ||
self.Bedrock:SetActiveObject(secureTextBox) | ||
end | ||
end, 0.05) | ||
end | ||
end | ||
end | ||
|
||
Lock = function(self) | ||
if Settings:GetValues()['Password'] == nil then | ||
Log.i('No password, unlocking.') | ||
self.Visible = false | ||
if self.OnUnlock then | ||
self:OnUnlock(self.IsSleepMode) | ||
end | ||
return | ||
end | ||
self.Visible = true | ||
|
||
local secureTextBox = self:GetObject('SecureTextBox') | ||
secureTextBox.OnChange = function(_self, event, keychar) | ||
if keychar == keys.enter then | ||
self:TryUnlock(secureTextBox.Text) | ||
end | ||
end | ||
self.Bedrock:SetActiveObject(secureTextBox) | ||
|
||
self:GetObject('ExitButton').OnClick = function(_self, event, side, x, y) | ||
if self.IsSleepMode then | ||
else | ||
Shutdown(true) | ||
end | ||
end | ||
end | ||
|
||
OnClick = function(self, event, side, x, y) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
["Children"]={ | ||
[1]={ | ||
["Y"]=1, | ||
["X"]=1, | ||
["Name"]="Toolbar", | ||
["Type"]="View", | ||
["InheritView"]="toolbar" | ||
}, | ||
[2]={ | ||
["Y"]=5, | ||
["X"]=3, | ||
["Width"]="100%,-6", | ||
["Name"]="Label", | ||
["Type"]="Label", | ||
["Text"]="All done! OneOS is now all setup and ready for you to use. Click 'Restart' to get going!\n\nIf the restart button does not work then hold Ctrl + R or break and replace your computer." | ||
}, | ||
[3]={ | ||
["Y"]="100%,-1", | ||
["X"]="100%,-9", | ||
["Name"]="RestartButton", | ||
["Type"]="Button", | ||
["Text"]="Restart", | ||
["BackgroundColour"]=256 | ||
}, | ||
[4]={ | ||
["Y"]="100%,-1", | ||
["X"]="3", | ||
["Name"]="BackButton", | ||
["Type"]="Button", | ||
["Text"]="Back", | ||
["BackgroundColour"]=256 | ||
}, | ||
}, | ||
["BackgroundColour"]=1, | ||
["ToolBarColour"] = 128, | ||
["ToolBarTextColour"] = 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.