-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lowercased all files and updated file includes
- Loading branch information
Showing
25 changed files
with
486 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
include( "parser/HMLParser.lua" ) | ||
include( "parser/hmlparser.lua" ) | ||
|
||
H2Editor = {} | ||
|
||
|
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,53 @@ | ||
include( "parser/hmlparser.lua" ) | ||
|
||
H2Editor = {} | ||
|
||
function H2Editor:new( newFile ) | ||
|
||
if( newFile == nil ) then return nil end | ||
|
||
local obj = {} | ||
setmetatable( obj, {__index = H2Editor} ) | ||
obj.file = newFile | ||
|
||
|
||
self.panel = vgui.Create( "Expression2EditorFrame" ) | ||
self.panel:Setup( "<HML /> Editor", "HUD2") | ||
self.panel:Center() | ||
self.panel:SetV( true ) | ||
self.panel:MakePopup() | ||
self.panel.chip = chip | ||
self.panel.tool = self | ||
self.panel:SetCode("<hml>\n\n<!-- Code here! -->\n\n</hml>") | ||
|
||
return obj | ||
end | ||
|
||
|
||
function H2Editor:open( newFile ) | ||
self.file = newFile | ||
|
||
GAMEMODE:AddNotify('<HML /> Opening editor...', NOTIFY_GENERIC, 7); | ||
|
||
--Customize various stuff-- | ||
function self.panel:SaveFile(Line, close) | ||
self:ExtractName() | ||
if(close and self.chip) then | ||
if(tool.HUD_Validate(HUD_EditorPanel:GetCode())) then return end | ||
--tool.HUD_SyncAndUpload() | ||
self:Close() | ||
return end | ||
if(!Line or Line == self.Location .. "/" .. ".txt") then | ||
Derma_StringRequest( "Save to New File", "", "filename", | ||
function( strTextOut ) | ||
self:SaveFile( self.Location .. "/" .. string.Replace(strTextOut," ","_") .. ".txt", close ) | ||
end ) | ||
return end | ||
file.Write(Line , self:GetCode()) | ||
if(!self.chip) then self:ChosenFile(Line) end | ||
if(close) then self:Close() end | ||
|
||
GAMEMODE:AddNotify('<HML /> Saved!', NOTIFY_GENERIC, 7); | ||
end | ||
|
||
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
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
104 changes: 104 additions & 0 deletions
104
lua/entities/gmod_wire_hud_indicator_2/parser/constants.lua
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,104 @@ | ||
-- constants.lua | ||
-- | ||
-- Constants for the parser to replace in HML. | ||
-- Place any additional replacements here. | ||
-- | ||
-- Table keys should be in UPPERCASE always, otherwise they wont be replaced | ||
-- when the parser sees the argument. | ||
-- | ||
-- NOTE: Parser only currently replaces constants in arguments. | ||
-- | ||
-- Moggie100. | ||
|
||
|
||
function HMLConstants() | ||
constants = {} | ||
constants["BLACK"] = { type="vector_3d", x=000, y=000, z=000 } | ||
constants["BLACK25"] = { type="vector_4d", x=000, y=000, z=000, w=64 } | ||
constants["BLACK50"] = { type="vector_4d", x=000, y=000, z=000, w=128 } | ||
constants["BLACK75"] = { type="vector_4d", x=000, y=000, z=000, w=192 } | ||
|
||
constants["SILVER"] = { type="vector_3d", x=192, y=192, z=192 } | ||
constants["SILVER25"] = { type="vector_4d", x=192, y=192, z=192, w=64 } | ||
constants["SILVER50"] = { type="vector_4d", x=192, y=192, z=192, w=128 } | ||
constants["SILVER75"] = { type="vector_4d", x=192, y=192, z=192, w=192 } | ||
|
||
constants["GRAY"] = { type="vector_3d", x=128, y=128, z=128 } | ||
constants["GRAY25"] = { type="vector_4d", x=128, y=128, z=128, w=64 } | ||
constants["GRAY50"] = { type="vector_4d", x=128, y=128, z=128, w=128 } | ||
constants["GRAY75"] = { type="vector_4d", x=128, y=128, z=128, w=192 } | ||
|
||
constants["WHITE"] = { type="vector_3d", x=255, y=255, z=255 } | ||
constants["WHITE25"] = { type="vector_4d", x=255, y=255, z=255, w=64 } | ||
constants["WHITE50"] = { type="vector_4d", x=255, y=255, z=255, w=128 } | ||
constants["WHITE75"] = { type="vector_4d", x=255, y=255, z=255, w=192 } | ||
|
||
constants["MAROON"] = { type="vector_3d", x=128, y=000, z=000 } | ||
constants["MAROON25"] = { type="vector_4d", x=128, y=000, z=000, w=64 } | ||
constants["MAROON50"] = { type="vector_4d", x=128, y=000, z=000, w=128 } | ||
constants["MAROON75"] = { type="vector_4d", x=128, y=000, z=000, w=192 } | ||
|
||
constants["RED"] = { type="vector_3d", x=255, y=000, z=000 } | ||
constants["RED25"] = { type="vector_4d", x=255, y=000, z=000, w=64 } | ||
constants["RED50"] = { type="vector_4d", x=255, y=000, z=000, w=128 } | ||
constants["RED75"] = { type="vector_4d", x=255, y=000, z=000, w=192 } | ||
|
||
constants["PURPLE"] = { type="vector_3d", x=128, y=000, z=128 } | ||
constants["PURPLE25"] = { type="vector_4d", x=128, y=000, z=128, w=64 } | ||
constants["PURPLE50"] = { type="vector_4d", x=128, y=000, z=128, w=128 } | ||
constants["PURPLE75"] = { type="vector_4d", x=128, y=000, z=128, w=192 } | ||
|
||
constants["FUCHSIA"] = { type="vector_3d", x=255, y=000, z=255 } | ||
constants["FUCHSIA25"] = { type="vector_4d", x=255, y=000, z=255, w=64 } | ||
constants["FUCHSIA50"] = { type="vector_4d", x=255, y=000, z=255, w=128 } | ||
constants["FUCHSIA75"] = { type="vector_4d", x=255, y=000, z=255, w=192 } | ||
|
||
constants["GREEN"] = { type="vector_3d", x=000, y=128, z=000 } | ||
constants["GREEN25"] = { type="vector_4d", x=000, y=128, z=000, w=64 } | ||
constants["GREEN50"] = { type="vector_4d", x=000, y=128, z=000, w=128 } | ||
constants["GREEN75"] = { type="vector_4d", x=000, y=128, z=000, w=192 } | ||
|
||
constants["LIME"] = { type="vector_3d", x=000, y=255, z=000 } | ||
constants["LIME25"] = { type="vector_4d", x=000, y=255, z=000, w=64 } | ||
constants["LIME50"] = { type="vector_4d", x=000, y=255, z=000, w=128 } | ||
constants["LIME75"] = { type="vector_4d", x=000, y=255, z=000, w=192 } | ||
|
||
constants["OLIVE"] = { type="vector_3d", x=128, y=128, z=000 } | ||
constants["OLIVE25"] = { type="vector_4d", x=128, y=128, z=000, w=64 } | ||
constants["OLIVE50"] = { type="vector_4d", x=128, y=128, z=000, w=128 } | ||
constants["OLIVE75"] = { type="vector_4d", x=128, y=128, z=000, w=192 } | ||
|
||
constants["YELLOW"] = { type="vector_3d", x=255, y=255, z=000 } | ||
constants["YELLOW25"] = { type="vector_4d", x=255, y=255, z=000, w=64 } | ||
constants["YELLOW50"] = { type="vector_4d", x=255, y=255, z=000, w=128 } | ||
constants["YELLOW75"] = { type="vector_4d", x=255, y=255, z=000, w=192 } | ||
|
||
constants["NAVY"] = { type="vector_3d", x=000, y=000, z=128 } | ||
constants["NAVY25"] = { type="vector_4d", x=000, y=000, z=128, w=64 } | ||
constants["NAVY50"] = { type="vector_4d", x=000, y=000, z=128, w=128 } | ||
constants["NAVY75"] = { type="vector_4d", x=000, y=000, z=128, w=192 } | ||
|
||
constants["BLUE"] = { type="vector_3d", x=000, y=000, z=255 } | ||
constants["BLUE25"] = { type="vector_4d", x=000, y=000, z=255, w=64 } | ||
constants["BLUE50"] = { type="vector_4d", x=000, y=000, z=255, w=128 } | ||
constants["BLUE75"] = { type="vector_4d", x=000, y=000, z=255, w=192 } | ||
|
||
constants["TEAL"] = { type="vector_3d", x=000, y=128, z=128 } | ||
constants["TEAL25"] = { type="vector_4d", x=000, y=128, z=128, w=64 } | ||
constants["TEAL50"] = { type="vector_4d", x=000, y=128, z=128, w=128 } | ||
constants["TEAL75"] = { type="vector_4d", x=000, y=128, z=128, w=192 } | ||
|
||
constants["AQUA"] = { type="vector_3d", x=000, y=255, z=255 } | ||
constants["AQUA25"] = { type="vector_4d", x=000, y=255, z=255, w=64 } | ||
constants["AQUA50"] = { type="vector_4d", x=000, y=255, z=255, w=128 } | ||
constants["AQUA75"] = { type="vector_4d", x=000, y=255, z=255, w=192 } | ||
|
||
|
||
constants["DERMA"] = { type="vector_4d", x=050, y=050, z=075, w=100 } | ||
constants["DERMA25"] = { type="vector_4d", x=050, y=050, z=075, w=64 } | ||
constants["DERMA50"] = { type="vector_4d", x=050, y=050, z=075, w=128 } | ||
constants["DERMA75"] = { type="vector_4d", x=050, y=050, z=075, w=192 } | ||
constants["DERMA100"] = { type="vector_4d", x=050, y=050, z=075, w=255 } | ||
|
||
return constants | ||
end |
Oops, something went wrong.