Imports System.Drawing
Imports System.Windows.Forms
Imports Wakaba

Module Module1

    Private mdteNow As Date
    Private w As Wakaba.Helper
    Private WithEvents t As Wakaba.GameTimer

    Sub Main()

        Try
            w = New Wakaba.Helper
            w.Initialize()

            w.SpriteCreate("背景", My.Resources.wall, Helper.TransparentColor.None)
            w.SpritePosition("背景", 1, 0, 0)
            w.SpriteShow("背景")

            w.SpriteCreate("文字列スプライト", 640, 480)
            w.SpritePosition("文字列スプライト", 0, 0, 0)
            w.SpriteShow("文字列スプライト")

            t = New Wakaba.GameTimer
            t.Interval = 1000
            t.TimerStart()

            Do
                w.SpriteRotation("文字列スプライト", CShort(mdteNow.Second * 6))
                w.SpriteFillColor("文字列スプライト", Color.FromArgb(0))
                w.SpriteText("文字列スプライト", mdteNow.ToLongTimeString, 80, 180, "MS ゴシック", 80, FontStyle.Bold, Brushes.Green)
                w.ScreenRefresh(True)
            Loop While Not w.WindowClosing

        Catch ex As Exception
            MessageBox.Show(ex.Message & ex.StackTrace)
        End Try

        t.Dispose()
        w.Dispose()

    End Sub

    Private Sub t_Tick() Handles t.Tick

        mdteNow = Date.Now

    End Sub

End Module