Skip to content

Commit d0fef52

Browse files
committed
examples: update
1 parent 87d1561 commit d0fef52

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

examples/wowjump/config.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ type Config struct {
2525
editCharWaitTime *wingui.Edit `json:"-"`
2626
btnCheckChangeChar *wingui.Button `json:"-"`
2727
btnCheckLogoutFlash *wingui.Button `json:"-"`
28-
flashHwnd win.HWND `json:"-"`
28+
flashHwnd win.HWND `json:"-"`
2929
}
3030

3131
var config = &Config{
@@ -52,7 +52,7 @@ func init() {
5252
log.Println("解析配置文件成功", string(file))
5353
}
5454

55-
//Save save config to file.
55+
// Save save config to file.
5656
func (c *Config) Save() {
5757
config.EnterTime, _ = strconv.Atoi(c.editEnterTime.Text())
5858
config.NormalTime, _ = strconv.Atoi(c.editNormaltime.Text())
@@ -66,7 +66,7 @@ func (c *Config) Save() {
6666
ioutil.WriteFile(configDir+"/wowjump/wowjump_config.txt", file, 0777)
6767
}
6868

69-
//InitVal put config val to edit.
69+
// InitVal put config val to edit.
7070
func (c *Config) InitVal() {
7171
c.editEnterTime.SetText(strconv.Itoa(c.EnterTime))
7272
c.editNormaltime.SetText(strconv.Itoa(c.NormalTime))
@@ -84,7 +84,7 @@ func (c *Config) InitVal() {
8484
c.btnCheckLogoutFlash.SetCheck(state)
8585
}
8686

87-
//EditEnable enable edits.
87+
// EditEnable enable edits.
8888
func (c *Config) EditEnable(enable bool) {
8989
c.editEnterTime.SetEnabled(enable)
9090
c.editNormaltime.SetEnabled(enable)

examples/wowjump/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ func init() {
4242
var btn *wingui.Button
4343

4444
// optional genereate resource IDs
45+
//
4546
//go:generate go run github.com/whtiehack/wingui/tools/genids -filename ui/resource.h -packagename main
4647
func main() {
4748
var err error

examples/wowjump/utils.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ func (s *Statistics) Stat(path string, title string) {
157157
val, _ := url.ParseQuery(s.params.Encode())
158158
val.Set("rnd", strconv.Itoa(int(rand.Int31())))
159159
val.Set("sn", strconv.Itoa(int(time.Now().Unix()%65535)))
160-
if s.lt != 0 && int(time.Now().Unix())-s.lt > 2592E3 {
160+
if s.lt != 0 && int(time.Now().Unix())-s.lt > 2592e3 {
161161
s.lt = int(time.Now().Unix())
162162
}
163163
if s.lt != 0 {
@@ -189,7 +189,7 @@ func (s *Statistics) Stat(path string, title string) {
189189
val.Set("et", "0")
190190
val.Set("ct", "!!")
191191

192-
if int(time.Now().Unix())-s.lt > 2592E3 {
192+
if int(time.Now().Unix())-s.lt > 2592e3 {
193193
s.lt = int(time.Now().Unix())
194194
}
195195
val.Set("lt", strconv.Itoa(s.lt))

0 commit comments

Comments
 (0)