login-app: give some precision to student after login
This commit is contained in:
parent
8ab758ac9a
commit
1d8146d8ad
1 changed files with 17 additions and 6 deletions
|
|
@ -14,7 +14,7 @@ func CreateRebootDialog(title, login string) *RebootDialog {
|
|||
dlg := new(RebootDialog)
|
||||
|
||||
sWidth, sHeight := ui.ScreenSize()
|
||||
wWidth, wHeight := 50, 10
|
||||
wWidth, wHeight := 48, 10
|
||||
dlg.View = ui.AddWindow(sWidth/2-wWidth/2, sHeight/2-wHeight/2, wWidth, wHeight, title)
|
||||
ui.WindowManager().BeginUpdate()
|
||||
defer ui.WindowManager().EndUpdate()
|
||||
|
|
@ -28,15 +28,26 @@ func CreateRebootDialog(title, login string) *RebootDialog {
|
|||
textfrm.SetPaddings(1, 1)
|
||||
textfrm.SetPack(ui.Vertical)
|
||||
textfrm.SetGaps(2, 1)
|
||||
ui.CreateLabel(textfrm, ui.AutoSize, ui.AutoSize, "You are now successfully logged in as:", ui.Fixed)
|
||||
ui.CreateLabel(textfrm, ui.AutoSize, ui.AutoSize, login, ui.Fixed)
|
||||
|
||||
ui.CreateLabel(textfrm, ui.AutoSize, ui.AutoSize, "Your computer will automatically", ui.Fixed)
|
||||
ui.CreateLabel(textfrm, ui.AutoSize, ui.AutoSize, "reboot in a few seconds...", ui.Fixed)
|
||||
lbl1 := ui.CreateLabel(textfrm, ui.AutoSize, ui.AutoSize, " You are now successfully logged in as:", ui.Fixed)
|
||||
lbl1.SetTextColor(ui.ColorWhiteBold)
|
||||
|
||||
progress := ui.CreateProgressBar(textfrm, ui.AutoSize, ui.AutoSize, 1)
|
||||
for i := 0; i <= wWidth/2-len(login)/2; i += 1 {
|
||||
login = " " + login
|
||||
}
|
||||
lbl2 := ui.CreateLabel(textfrm, ui.AutoSize, ui.AutoSize, login, 1)
|
||||
lbl2.SetTextColor(ui.ColorGreenBold)
|
||||
|
||||
lbl3 := ui.CreateLabel(textfrm, 40, 2, " Your computer will automatically\n reboot in a few seconds...", ui.Fixed)
|
||||
lbl3.SetMultiline(true)
|
||||
|
||||
progress := ui.CreateProgressBar(textfrm, ui.AutoSize, ui.AutoSize, ui.Fixed)
|
||||
progress.SetLimits(0, 100)
|
||||
|
||||
lbl4 := ui.CreateLabel(textfrm, 40, 4, "\nThe challenge begins right after the reboot. Good luck!", ui.Fixed)
|
||||
lbl4.SetTextColor(ui.ColorWhiteBold)
|
||||
lbl4.SetMultiline(true)
|
||||
|
||||
go func() {
|
||||
for i := 0; i < 100; i += 1 {
|
||||
progress.SetValue(i)
|
||||
|
|
|
|||
Reference in a new issue