Browse files

Updated to use @Resources folder.

  • Loading branch information...
1 parent 39918e6 commit 84df185b2d304c331f9f45ee1d9ec59e278f1675 @smurfier committed May 21, 2012
View
19 CScript.lua → @Resources/CScript.lua
@@ -21,7 +21,7 @@ function Initialize()
Labels={'S','M','T','W','T','F','S'}
end
for a=1,7 do -- Set DayLabels text.
- Bangs('SetOption',Set.DPref..a,'Text',Labels[Set.SMon and a%#Labels+1 or a])
+ SKIN:Bang('!SetOption',Set.DPref..a,'Text',Labels[Set.SMon and a%#Labels+1 or a])
end
-- ========== Localization ==========
MLabels=Delim(SELF:GetOption('MonthLabels','')) -- Pull custom month names.
@@ -114,7 +114,7 @@ function Draw() --Sets all meter properties and calculates days.
if rotate(Time.wday-1)==a-1 and InMonth==1 then --If in current month, set Current Weekday style.
table.insert(Styles,'LblCurrSty')
end
- Bangs('SetOption',Set.DPref..a,'MeterStyle',table.concat(Styles,'|'))
+ SKIN:Bang('!SetOption',Set.DPref..a,'MeterStyle',table.concat(Styles,'|'))
end
for a=1,42 do --Calculate and set day meters.
local Par,Styles={a-StartDay, ''},{'TextStyle'} --Initialize variables.
@@ -140,7 +140,7 @@ function Draw() --Sets all meter properties and calculates days.
Text=LZero(Par[1]),
MeterStyle=table.concat(Styles,'|'),
ToolTipText=Par[2],
- }) do Bangs('SetOption',Set.MPref..a,k,v) end --Set meter properties.
+ }) do SKIN:Bang('!SetOption',Set.MPref..a,k,v) end --Set meter properties.
end
for k,v in pairs({ --Define skin variables.
ThisWeek=math.ceil((Time.day+StartDay)/7),
@@ -151,7 +151,7 @@ function Draw() --Sets all meter properties and calculates days.
MonthLabel=Vars(Set.LText,'MonthLabel'),
LastWkHidden=LastWeek and 1 or 0,
NextEvent=NextEvn(),
- }) do Bangs('SetVariable',k,v) end --Set skin variables.
+ }) do SKIN:Bang('!SetVariable',k,v) end --Set skin variables.
end -- Draw
function NextEvn() -- Returns a list of events
@@ -177,7 +177,7 @@ function Move(a) -- Move calendar through the months.
}
sw:case(tostring(a or 0))
InMonth=(Month==Time.month and Year==Time.year) and 1 or 0 --Check if in the current month.
- Bangs('SetVariable','NotCurrentMonth',1-InMonth) --Set Skin Variable NotCurrentMonth
+ SKIN:Bang('!SetVariable','NotCurrentMonth',1-InMonth) --Set Skin Variable NotCurrentMonth
end -- Move
--===== These Functions are used to make life easier =====
@@ -203,17 +203,16 @@ function rotate(a) -- Makes allowance for StartOnMonday.
return Set.SMon and (a-1+7)%7 or a
end -- rotate
-function Bangs(...) -- Send bangs with multiple arguments
- SKIN:Bang('!'..table.remove(arg,1)..' """'..table.concat(arg,'""" """')..'"""')
-end -- Bangs
-
function LZero(a) -- Used to make allowance for LeadingZeros
return Set.LZer and string.format('%02d',a) or a
end -- LZero
function Keys(a,b) -- Converts Key="Value" sets to a table
local tbl=b or {}
- string.gsub(a,'(%a+)=(%b"")',function(c,d) local strip=string.match(d,'"(.+)"') tbl[string.lower(c)]=tonumber(strip) or strip end)
+ string.gsub(a,'(%a+)=(%b"")',function(c,d)
+ local strip=string.match(d,'"(.+)"')
+ tbl[string.lower(c)]=tonumber(strip) or strip
+ end)
return tbl
end -- Keys
View
0 Holidays/Holidays.hol → @Resources/Holidays/Holidays.hol
File renamed without changes.
View
2 Settings.inc → @Resources/Settings.inc
@@ -16,7 +16,7 @@ Style=Default
;Holidays File names
;Note: For Holiday file names, multiple sources can be used by uisng the pipe delimiter (|).
-EventFile=Holidays\Holidays.hol
+EventFile=#@#Holidays\Holidays.hol
;Custom Text formatting for Month Labels. See Readme for details.
;LabelText=
View
6 Styles/Default/Styles.inc → @Resources/Styles/Default/Styles.inc
@@ -125,7 +125,7 @@ StringAlign=Left
Text="4"
Y=#Bumper.top#
X=((#C.w#*6+#Space.x#*6)+#Bumper.x#)
-LeftMouseUpAction=!Execute [!CommandMeasure "Lua" "Move(1)"][!Update]
+LeftMouseUpAction=[!CommandMeasure "Lua" "Move(1)"][!Update]
Group=Controls
Hidden=1
@@ -134,14 +134,14 @@ Meter=String
MeterStyle=TextStyle|ControlForward
Text="3"
X=#Bumper.x#
-LeftMouseUpAction=!Execute [!CommandMeasure "Lua" "Move(-1)"][!Update]
+LeftMouseUpAction=[!CommandMeasure "Lua" "Move(-1)"][!Update]
[ControlHome]
Meter=String
MeterStyle=TextStyle|ControlForward
Text="="
X=R
-LeftMouseUpAction=!Execute [!CommandMeasure "Lua" "Move()"][!Update]
+LeftMouseUpAction=[!CommandMeasure "Lua" "Move()"][!Update]
;Date Indicator
[TodayHL]
View
0 Styles/DefaultEvents/Variables.inc → @Resources/Styles/Default/Variables.inc
File renamed without changes.
View
0 Styles/Default2/Styles.inc → @Resources/Styles/Default2/Styles.inc
File renamed without changes.
View
0 Styles/Default2/Variables.inc → @Resources/Styles/Default2/Variables.inc
File renamed without changes.
View
0 Styles/DefaultEvents/Styles.inc → @Resources/Styles/DefaultEvents/Styles.inc
File renamed without changes.
View
0 Styles/Default/Variables.inc → ...ources/Styles/DefaultEvents/Variables.inc
File renamed without changes.
View
0 Styles/Enigma/Styles.inc → @Resources/Styles/Enigma/Styles.inc
File renamed without changes.
View
0 Styles/Enigma/Variables.inc → @Resources/Styles/Enigma/Variables.inc
File renamed without changes.
View
9 LuaCalendar.ini
@@ -1,6 +1,7 @@
[Rainmeter]
Author=smurfier
Update=1000
+LeftMouseUpAction=["notepad.exe" #@#Settings.inc]
[Metadata]
Name=LuaCalendar
@@ -10,9 +11,9 @@ Version=3.4
License=Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
[Variables]
-@include=Settings.inc
-@include2=Styles\#Style#\Variables.inc
-@include3=Styles\#Style#\Styles.inc
+@include=#@#Settings.inc
+@include2=#@#Styles\#Style#\Variables.inc
+@include3=#@#Styles\#Style#\Styles.inc
Month=0
Year=0
Day=0
@@ -23,7 +24,7 @@ LastWkHidden=0
[Lua]
Measure=Script
-ScriptFile=CScript.lua
+ScriptFile=#@#CScript.lua
[Background]
Meter=Image

0 comments on commit 84df185

Please sign in to comment.