ScrollView တြင္ image ၁၀ ပံု ထည့္ျပျခင္း
အခု project မွာေတာ့ scrollView တခုထဲမွာ image ၁၀ ပံု ထည့္ျပဖို႔ ေရးပါမယ္။ Image ေတြကို အလ်ား၊ အနံ အခ်ိဳ း 4:3 နဲ႔ ညီတူ ေဖာ္ျပမွာ ျဖစ္လို႔၊ ကန္႔လန္႔ပံု ၁၀ ပံုကို 4:3 အခ်ိဳ းနဲ႔ ျပင္ဆင္ထားပါ။ ၿပီးရင္ BMP မွာ AddFiles နဲ႔ ထည့္ပါ။ (img1.png, img2.png, ..., img10.png)
Views Panel
==========
AddScrollView("scr",0,0,100%x,100%y,"")
GetPanel("scr","pnlScr")
AddPanel("pnl1",0,0,100%x,75%x,"pnlScr")
BitmapInit(DirAssets,"img1.png")
SetBackgroundImage("pnl1")
AddPanel("pnl2",0,75%x,100%x,75%x,"pnlScr")
BitmapInit(DirAssets,"img2.png")
SetBackgroundImage("pnl2")
AddPanel("pnl3",0,150%x,100%x,75%x,"pnlScr")
BitmapInit(DirAssets,"img3.png")
SetBackgroundImage("pnl3")
AddPanel("pnl4",0,225%x,100%x,75%x,"pnlScr")
BitmapInit(DirAssets,"img4.png")
SetBackgroundImage("pnl4")
AddPanel("pnl5",0,300%x,100%x,75%x,"pnlScr")
BitmapInit(DirAssets,"img5.png")
SetBackgroundImage("pnl5")
AddPanel("pnl6",0,375%x,100%x,75%x,"pnlScr")
BitmapInit(DirAssets,"img6.png")
SetBackgroundImage("pnl6")
AddPanel("pnl7",0,450%x,100%x,75%x,"pnlScr")
BitmapInit(DirAssets,"img7.png")
SetBackgroundImage("pnl7")
AddPanel("pnl8",0,525%x,100%x,75%x,"pnlScr")
BitmapInit(DirAssets,"img8.png")
SetBackgroundImage("pnl8")
AddPanel("pnl9",0,600%x,100%x,75%x,"pnlScr")
BitmapInit(DirAssets,"img9.png")
SetBackgroundImage("pnl9")
AddPanel("pnl10",0,675%x,100%x,75%x,"pnlScr")
BitmapInit(DirAssets,"img10.png")
SetBackgroundImage("pnl10")
SetHeight("pnlScr",750%x)
================
No codes for Events Panel
================
ပံု တခုနဲ႔ တခုၾကားမွာ 5%x gap ထည့္ၾကည့္ပါ။
No comments:
Post a Comment