浏览代码

test BlockDelay effect

cuu 6 年之前
父节点
当前提交
01237d9f65
共有 4 个文件被更改,包括 5 次插入4 次删除
  1. 二进制
      main
  2. 1 2
      main.go
  3. 2 2
      sysgo/UI/main_screen.go
  4. 2 0
      sysgo/UI/page.go

二进制
main


+ 1 - 2
main.go

@@ -56,10 +56,9 @@ func run() int {
 		}
 		if ev.Type == event.USEREVENT {
 			
-			fmt.Println(ev.Data["Msg"])
+			fmt.Println("UserEvent: ",ev.Data["Msg"])
 		}
 		if ev.Type == event.KEYDOWN {
-			fmt.Println(ev)
 			if ev.Data["Key"] == "Q" {
 				main_screen.OnExitCb()
 				return 0

+ 2 - 2
sysgo/UI/main_screen.go

@@ -387,10 +387,10 @@ func (self *MainScreen) RunEXE( cmdpath string) {
 	self.DrawRun()
 	self.SwapAndShow()
 
-	time.Delay(1000)
+	
+	time.BlockDelay(1000)
 
 	cmdpath = strings.Trim(cmdpath," ")
-
 	cmdpath = CmdClean(cmdpath)
 	
 	event.Post(event.RUNEVT,cmdpath)

+ 2 - 0
sysgo/UI/page.go

@@ -381,9 +381,11 @@ func (self *Page) AdjustSAutoLeftAlign() { //  ## adjust coordinator and append
 			it.SetParent(self)
 			it.SetIndex(i)
 			it.Adjust(start_x+i*self.PageIconMargin + i*IconWidth, start_y, IconWidth-6, IconHeight-6, 0)
+			
 			old_surf := it.GetImgSurf()
 			it_w,it_h := it.Size()
 			it.SetImgSurf( transform.SmoothScale( old_surf, it_w,it_h))			
+      
 		}
 	}