[GB.FORM]
* BUG: MessageView: Successive messages work correctly now. git-svn-id: svn://localhost/gambas/trunk@7616 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
4580e2380a
commit
7a2a1bdace
1 changed files with 29 additions and 22 deletions
|
@ -53,10 +53,36 @@ Private Sub UpdateButton()
|
|||
|
||||
End
|
||||
|
||||
Public Sub Open(Text As String, Optional Icon As Picture)
|
||||
Private Sub DoOpen()
|
||||
|
||||
Dim fTime As Float
|
||||
|
||||
UpdateButton
|
||||
Me.H = 1
|
||||
Me.Show
|
||||
|
||||
$H = Max($hIcon.H + Desktop.Scale * 2, Me.Font.RichTextHeight($sText, Me.Parent.ClientW - Desktop.Scale * 4 - $hIcon.W) + Desktop.Scale * 4)
|
||||
|
||||
If $bAnimate Then
|
||||
|
||||
fTime = Timer
|
||||
|
||||
While Me.H < $H
|
||||
Me.H = $H * Min(1, (Timer - fTime) * 8)
|
||||
Wait
|
||||
Wend
|
||||
|
||||
Endif
|
||||
|
||||
Me.H = $H
|
||||
|
||||
Raise Open
|
||||
|
||||
End
|
||||
|
||||
|
||||
Public Sub Open(Text As String, Optional Icon As Picture)
|
||||
|
||||
If $sText = Text Then Return
|
||||
|
||||
If Me.Visible Then
|
||||
|
@ -75,26 +101,7 @@ Public Sub Open(Text As String, Optional Icon As Picture)
|
|||
If Error Then $hIcon = Picture["img/32/warning.png"]
|
||||
Endif
|
||||
|
||||
UpdateButton
|
||||
Me.H = 1
|
||||
Me.Show
|
||||
|
||||
$H = Max($hIcon.H + Desktop.Scale * 2, Me.Font.RichTextHeight(Text, Me.Parent.ClientW - Desktop.Scale * 4 - $hIcon.W) + Desktop.Scale * 4)
|
||||
|
||||
If $bAnimate Then
|
||||
|
||||
fTime = Timer
|
||||
|
||||
While Me.H < $H
|
||||
Me.H = $H * Min(1, (Timer - fTime) * 8)
|
||||
Wait
|
||||
Wend
|
||||
|
||||
Endif
|
||||
|
||||
Me.H = $H
|
||||
|
||||
Raise Open
|
||||
DoOpen
|
||||
|
||||
End
|
||||
|
||||
|
@ -123,7 +130,7 @@ Public Sub Close()
|
|||
$hIcon = $aIcon[0]
|
||||
$aText.Remove(0)
|
||||
$aIcon.Remove(0)
|
||||
Open($sText, $hIcon)
|
||||
DoOpen
|
||||
Else
|
||||
$sText = ""
|
||||
$hIcon = Null
|
||||
|
|
Loading…
Reference in a new issue