I modified it a tad, extracted the icons from the ".icl" file (I was trying at first to port it to Keysharp, which doesn't yet support grabbing icons from .icl files, but I'm not there yet ). Along the way I ended up with this code, which runs under v2.0-beta.7 (and in fact under Keysharp, although it doesn't yet do what it's supposed to there).
Code: Select all
MyGui := Gui("-DPIScale +E0x02080000", "Candy Progress")
MyGui.OnEvent("Close", CloseMe)
MyGui.OnEvent("Escape", CloseMe)
MyGui.BackColor := "FFCC00"
CandyText := MyGui.Add("Text" ,"x20 y24 w436 h20 Center BackgroundTrans")
CandyText.SetFont("cFFFFFF s14")
Icon1 := MyGui.Add("Picture", "x20 y20 w18 h36 BackgroundTrans", "Icon1.ico")
Icon2 := MyGui.Add("Picture","x38 y20 w400 h36 BackgroundTrans", "Icon2.ico" )
Icon3 := MyGui.Add("Picture", "x438 y20 w18 h36 BackgroundTrans", "Icon3.ico")
CandyProgress := MyGui.Add("Progress", "x20 y20 w436 h36")
MyGui.Show("w480")
value := 0
While True {
if (value >= 33) and (value <= 66) {
CandyProgress.Opt("+cPurple")
}
else if (value >= 66) {
CandyProgress.Opt("+cAqua")
}
else {
CandyProgress.Opt("+cBlack")
}
CandyProgress.Value := value
CandyText.Text := value . "%"
value := value + 1
if (value > 100)
{
Sleep(1000)
value := 0
}
Sleep(100)
}
CloseMe(*) {
ExitApp()
}
Sorry, the animated GIF is not the greatest.
The icons are in the .zip file.