Skip to content

Commit

Permalink
Start menu update.
Browse files Browse the repository at this point in the history
  • Loading branch information
EnhancedJax committed Aug 26, 2021
1 parent ea3fec1 commit 102bf59
Show file tree
Hide file tree
Showing 5 changed files with 222 additions and 94 deletions.
2 changes: 1 addition & 1 deletion @Resources/Version.inc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[Variables]
Version=1.3
Version=1.4
20 changes: 20 additions & 0 deletions @Start/Logic.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
function check()
mVer = SKIN:GetMeasure('mVer')
CoreVer = tonumber(SKIN:GetVariable('Core.Ver', '00000'))
ParsedVer = tonumber(mVer:GetStringValue())
ParsedVerFull = mVer:GetStringValue()
SavePos = SKIN:GetVariable('@')..'Actions\\InstallData.ini'
SaveLocation = SKIN:GetVariable('@')..'Actions'
if ParsedVer == CoreVer then
print('Up2date - '..ParsedVer..'=='..CoreVer)
SKIN:Bang('!UpdateMeasure', 'JaxCoreYes')
elseif ParsedVer <= CoreVer then
print('Beta - '..ParsedVer..'<='..CoreVer)
SKIN:Bang('!UpdateMeasure', 'JaxCoreYes')
else
print('Update required - '..ParsedVer..'>='..CoreVer)
SKIN:Bang('!WriteKeyValue', 'Data', 'DownloadLink', 'https://github.com/EnhancedJax/-JaxCore/releases/download/v'..ParsedVerFull..'/JaxCore_v'..ParsedVerFull..'.rmskin', SavePos)
SKIN:Bang('!WriteKeyValue', 'Data', 'SaveLocation', SaveLocation, SavePos)
SKIN:Bang('!UpdateMeasure', 'JaxCoreNo')
end
end
294 changes: 201 additions & 93 deletions @Start/Main.ini
Original file line number Diff line number Diff line change
@@ -1,113 +1,221 @@
[Rainmeter]
Update=20
DefaultUpdateDivider=-1
SkinHeight=#HH#
SkinWidth=#WW#
OnRefreshAction=[!Delay 100][!EnableMeasureGroup NUOL]
Update=-1
Rightmouseupaction=[]
OnRefreshAction=[!ZPos 1][!Move (#SCREENAREAWIDTH#/2-#Sec.W#/2) (#SCREENAREAHEIGHT#/2-#Sec.H#/2)][!SetOption Dep3 MeterStyle "Dep.Shape:S | Dep.ShapeYes:S"][!UpdateMEter *][!Redraw]

@includeUpdater=#SKINSPATH##CoreUpdater\@Resources\PresenceCheck.inc
; ---------------------------------------------------------------------------- ;
; Export vars ;
; ---------------------------------------------------------------------------- ;

[mTween]
Measure=Script
ScriptFile=#@#LuaTween/Main.lua
TweenGroup=Tweenable
Tween0=Single | Variable | TweenNode1 | 0 | 100 | 1000
Tween1=Single | Variable | TweenNode2 | 0 | 100 | 500
Tween2=Single | Variable | TweenNode3 | 0 | 100 | 500
Optional0=Easing InOutSine
UpdateDivider=1
[ExportVariables]
Measure=Calc
OnUpdateAction=[!WriteKeyValue Variables RMPATH "#PROGRAMPATH#Rainmeter.exe" "#@#Actions\Hotkeys.ini"][!Delay 100][!EnableMeasureGroup NUOL]

[Variables]
TweenNode1=0
TweenNode2=0
TweenNode3=0
WW=700
HH=(128+5+5)
ImageW=128

[mL]
Measure=Calc
OnUpdateAction=[!Move (#SCREENAREAWIDTH#/2-#WW#/2) (#SCREENAREAHEIGHT#/2-#HH#/2)][!Zpos 2][!CommandMeasure mTween "Start(0)"][!Delay 1000][!CommandMeasure mTween "Start(1)"]
@includeVersion=#@#Version.inc
@includeJaxCoreChecker=#SKINSPATH#\#JaxCore\@Resources\Version.inc
Sec.W=800
Sec.H=500
Sec.P=40
Sec.L=350
Sec.R=10

Pri_Color=12,12,12
Sec_Color=28,28,28
Ter_Color=35,35,35
Accent_Color=255, 117, 81
Text_Color=242,240,255
SubText_Color=120,120,120

[String:S]
FontColor=#Text_Color#
Fontface=Roboto Light
AntiAlias=1
X=r
Y=10R
FontSize=10

[Dep.Shape:S]
X=-20r
Y=35r
Shape=Rectangle 0,0,(#SEc.W#-#Sec.L#-#Sec.P#*2),50,2.5 | StrokeWidth 0 | Extend This
Shape2=Rectangle 0,0,5,50,2.5 | StrokeWidth 0 | Fill Color #SubText_Color#
This=fill Color 0,0,0,1
MouseOverAction=[!SetOption #CURRENTSECTION# This "Fill Color #Ter_Color#"][!UpdateMeter #CURRENTSECTION#][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# This "Fill Color 0,0,0,1"][!UpdateMeter #CURRENTSECTION#][!Redraw]
[Dep.ShapeYes:S]
Shape2=Rectangle 0,0,5,50,2.5 | StrokeWidth 0 | Fill Color 0,255,50,100
This=Fill Color 0,255,50,50
MouseOverAction=[!SetOption #CURRENTSECTION# This "Fill Color 0,255,50,100"][!UpdateMeter #CURRENTSECTION#][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# This "Fill Color 0,255,50,50"][!UpdateMeter #CURRENTSECTION#][!Redraw]
[Dep.ShapeNo:S]
Shape2=Rectangle 0,0,5,50,2.5 | StrokeWidth 0 | Fill Color 255,0,0,100
This=Fill Color 255,0,0,50
MouseOverAction=[!SetOption #CURRENTSECTION# This "Fill Color 255,0,0,100"][!UpdateMeter #CURRENTSECTION#][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# This "Fill Color 255,0,0,50"][!UpdateMeter #CURRENTSECTION#][!Redraw]
[Dep.Text:S]
X=20r
Y=25r
W=(#SEc.W#-#Sec.L#-#Sec.P#*2-50)
clipString=2
StringAlign=LeftCenter
FontColor=#Text_Color#
Fontface=Roboto
AntiAlias=1
FontSize=12
InlinePattern=//.*
InlineSetting=Color | #SubText_Color#
InlinePattern2=//.*
InlineSetting2=Size | 10

; ---------------------------------------------------------------------------- ;
; Content ;
; ---------------------------------------------------------------------------- ;

; ------------------------------------ Gen ----------------------------------- ;

[B]
Meter=Shape
Shape=Path That | StrokeWidth 0 | Fill Color 25,25,25
That=0,(#HH#/2) | LineTo (#HH#/2),0 | LineTo (#WW#-#HH#/2),0 | LineTo (#WW#),(#HH#/2) | LineTo (#WW#-#HH#*0.5),#HH# | LineTo (#HH#/2),#HH# | ClosePath 1
Shape2=Path Those | StrokeWidth 0 | Fill Color 15,15,15
This=(((#TweenNode1#) * (#WW# - #HH#) / 100) + #HH#),(#HH#/2) | LineTo (#HH#/2),0 | LineTo (((#TweenNode1#) * (#WW# - #HH#) / 100) + #HH#*0.5),0 | LineTo (((#TweenNode1#) * (#WW# - #HH#) / 100) + #HH#),(#HH#/2) | LineTo (((#TweenNode1#) * (#WW# - #HH#) / 100) + #HH#*0.5),#HH# | LineTo (#HH#/2),#HH# | ClosePath 1
Shape3=Path This | StrokeWidth 0 | Fill Color 12,12,12
Those=(0),(#HH#/2) | LineTo (#HH#/2),0 | LineTo (((#TweenNode1#) * (#WW# - #HH#) / 100) + #HH#*0.5),0 | LineTo (((#TweenNode1#) * (#WW# - #HH#) / 100) + #HH#),(#HH#/2) | LineTo (((#TweenNode1#) * (#WW# - #HH#) / 100) + #HH#*0.5),#HH# | LineTo (#HH#/2),#HH# | ClosePath 1
; Shape2=Rectangle 0,0,#WW#,#HH# | StrokeWidth 0 | Fill Color 255,255,255,100
DynamicVariables=1
Group=Tweenable

Shape=Rectangle 0,0,#Sec.W#,#Sec.H#,#sec.R# | strokeWidth 0 | Fill Color #Pri_Color#
[BC]
Meter=Shape
Shape=Path That | StrokeWidth 0
That=0,(#HH#/2) | LineTo (#HH#/2),0 | LineTo (#WW#-#HH#/2),0 | LineTo (#WW#),(#HH#/2) | LineTo (#WW#-#HH#*0.5),#HH# | LineTo (#HH#/2),#HH# | ClosePath 1

[Arrow]
Meter=Shape
Shape=Path Arrow | StrokeWidth 4 | StrokeStartCap Triangle | StrokeEndCap Triangle | Extend This
Shape2=Path Arrow | StrokeWidth 10 | StrokeColor 0,0,0,1
DynamicVariables=1
Group=Tweenable
This=StrokeColor 255,255,255,(#TweenNode2#/100*150)
Arrow=(#WW#-20-20),(#HH#/2-20) | LineTo (#WW#-20),(#HH#/2) | LineTo (#WW#-#HH#*0.5-20+10),(#HH#-10)
MouseOverAction=[!SetOption Arrow This "StrokeColor 255,255,255,(255)"][!UpdateMeter Arrow][!Redraw]
MouseLeaveAction=[!SetOption Arrow This "StrokeColor 255,255,255,(#*TweenNode2*#/100*150)"][!UpdateMeter Arrow][!Redraw]
Leftmouseupaction=[!CommandMeasure mTween "Reverse(0)"][!CommandMeasure mTween "Reverse(1)"][!CommandMeasure mTween "Reverse(2)"][!Delay 1000][!UpdateMeasure mCheckforPresence][!DeactivateConfig #CURRENTCONFIG#]

[mCheckforPresence]
Measure=String
String=#*Updater*#
IfMatch=#Updater#
Disabled=1
Group=NUOl
IfMatchAction=["#@#Actions\AHK.exe" "#@#Actions\Installer.ahk"]
IfNotMatchAction=[!ActivateConfig "#CoreUpdater\Main"]
IfMatchMode=1

X=(#Sec.W#-#SEc.L#)
Shape=Rectangle 0,0,(#Sec.L#),#Sec.H#,#sec.R# | strokeWidth 0 | Fill LinearGradient This
This=0 | 0,0,0,150 ; 0.0 | 0,0,0,0 ; 1.0

[Logo]
Meter=Image
ImageName=Logo.png
X=((#WW#/2-#ImageW#/2)*(100-#TweenNode1#)/100+5)
Y=5
W=#ImageW#
H=#ImageW#
DynamicVariables=1
ImageAlpha=((100-#TweenNode3#)/100*255)
Group=Tweenable
X=#Sec.P#
Y=(#Sec.H#-#Sec.P#-40)
W=40
H=40

[Image]
Meter=Image
Container=BC
; X=(#Sec.L#-#Sec.H#*6/4)
; PreserveAspectRatio=0
H=#Sec.H#
; W=#Sec.L#
; PreserveAspectRatio=2
Leftmouseupaction=[!Refresh]
ImageName=Plainext.png

; --------------------------------- Left --------------------------------- ;

[MainText]
Meter=String
Text=JaxOriginals
StringAlign=LeftCenter
Fontface=Roboto
FontColor=255,255,255,(#TWeenNode3# > 0 ? ((100-#TweenNode3#)/100*255) : #TweenNode2#/100*255)
DynamicVariables=1
Group=Tweenable
DynamicVariables=1
AntiAlias=1
FontWeight=450
FontSize=20
X=10R
Y=(#HH#/2)
X=(#Sec.P#)
Y=#Sec.P#
Text=Plainext by Jax | #Version#
StringAlign=LEftTOp
FontFace=Roboto Bold
FontSize=25
InlinePattern=by.*
InlineSetting=Size | 10
InlinePattern2=by.*
InlineSetting2=Color | #SubText_Color#
InlinePattern3=by.*
InlineSetting3=Face | Roboto
MeterStyle=String:S

[ContText]
[Des]
Meter=String
Text=JaxOriginals
FontFace=Runic
StringAlign=LeftRight
Angle=(Rad(-35))
FontColor=255,255,255,(#TWeenNode3# > 0 ? ((100-#TweenNode3#)/100*13) : #TweenNode2#/100*13)
DynamicVariables=1
Group=Tweenable
Text=Here you can find the list of dependencies. Click on any one of them to install, make sure you are connected to the internet. Refresh this page by clicking on the right.
W=(#SEc.W#-#Sec.L#-#Sec.P#*2)
clipString=2
MeterStyle=String:S

; ------------------------------------ Dep ----------------------------------- ;

[Dep1]
Meter=Shape
X=r
Y=20R
MEterStyle=Dep.Shape:S
[DepText1]
Meter=String
Text=JaxCore3 // Checking...
MeterStyle=Dep.Text:S

; [Dep2]
; Meter=Shape
; MEterStyle=Dep.Shape:S
; Leftmouseupaction=["https://github.com/khanhas/MagickMeter#how-to-install"]
; [DepText2]
; Meter=String
; Text=ImageMagick // optional - required for parts of the skin, follow this guide for installation
; MeterStyle=Dep.Text:S

[Dep3]
Meter=Shape
MEterStyle=Dep.Shape:S
[DepText3]
Meter=String
Text=Your appreciation
MeterStyle=Dep.Text:S

; ------------------------------------ Bot ----------------------------------- ;

[ContinueButton]
Meter=Shape
X=(#Sec.P#+50)
Y=(#Sec.H#-#Sec.P#-40)
DynamicVariables=1
AntiAlias=1
FontWeight=800
FontSize=60
X=(#WW#-#HH#/2-300)
Y=(#HH#)
Container=BC
Shape=Rectangle 0,0,120,40,(#Sec.R#/3) | StrokeWidth 0 | Fill COlor 0,255,50,200
Leftmouseupaction=[!ActivateConfig "#JaxCore\Main" "Home.ini"][!DeactivateConfig]
Hidden=1
Group=Button
[ContinueText]
Meter=String
X=(60)r
y=(20)r
FontSize=(10)
Text=Continue
FontFace=Roboto
FontWeight=700
StringAlign=CenterCenter
MeterStyle=String:S
Hidden=1
Group=Button

; ---------------------------------------------------------------------------- ;
; Check for jax core ;
; ---------------------------------------------------------------------------- ;

[WebParser]
Measure=WebParser
URL=https://raw.githubusercontent.com/EnhancedJax/-JaxCore/main/%40Resources/Version.inc
RegExp==(.*)$
FinishAction=[!Delay 1000][!CommandMeasure LogicalScript "check()"]
OnConnectionErrorAction=[!SetOption Dep1 MeterStyle "Dep.Shape:S | Dep.ShapeNo:S"][!SetOption DepText1 Text "//Failed to connect to JaxCore github, if this is an issue please report to me"][!UpdateMEter *][!Redraw]
OnRegExpErrorAction=[!Log Developer:RegExpFalse]

[InternetStatus]
Measure=PLUGIN
Plugin=SysInfo
SysInfoType=INTERNET_CONNECTIVITY
IfCondition=InternetStatus = -1
ifTrueaction=[!SetOption Dep1 MeterStyle "Dep.Shape:S | Dep.ShapeNo:S"][!SetOption DepText1 Text "JaxCore // connection error, please check internet connection"][!UpdateMEter *][!Redraw]

[mVer]
Measure=WebParser
URL=[WebParser]
StringIndex=1

[LogicalScript]
Measure=Script
ScriptFile=Logic.lua

[JaxCoreYes]
Measure=String
Group=NUOL
Disabled=1
OnUpdateAction=[!SetOption Dep1 MeterStyle "Dep.Shape:S | Dep.ShapeYes:S"][!SetOption DepText1 Text "JaxCore3 // v#Core.Ver# installed"][!ShowMeterGroup Button][!UpdateMEter *][!Redraw]

[JaxCoreNo]
Measure=String
Group=NUOL
Disabled=1
OnUpdateAction=[!SetOption Dep1 MeterStyle "Dep.Shape:S | Dep.ShapeNo:S"][!SetOption DepText1 Text "JaxCore3 // click here to install"][!SetOption Dep1 Leftmouseupaction """["#@#Actions\AHKv1.exe" "#@#Actions\Installer.ahk"]"""][!UpdateMEter *][!Redraw]
Binary file added @Start/Plainext.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed @Start/Warning.png
Binary file not shown.

0 comments on commit 102bf59

Please sign in to comment.