Topics
Software Experimentation
|
|
mioCentral
| | MioCentral is our first try to create a gadget container.


The gadget container is a small object floating on the desktop.
When the user clicks on it, he can browse through the various gadgets.
This version do not embed any gadget, but you should try it to check the visual effects.
This application should be easily updated to provide shortcuts to web pages, gadgets, applications, etc.
|
Try miocentral.exe
| | You can download and try the application. This application is a prototype and some features may not work as expected on your computer.
|
| |
| File | miocentral.exe |
| Size | 613 Kb |
| Platform | Windows 98, ME, NT4, 2000, XP, Vista |
|
|
|  |
Download Source Code
| | The full source code is provided as a Mio Archive File. With MioFactory, you can open this archive file, edit the source code and test the result.
|
| |
| File | miocentral.mioa |
| Size | 135 Kb |
| Format | MioFactory Archive File |
|
|
| |
MioScript Source Code| | MioScript is a scripting language aimed to create any kind of applications. A free version of MioFactory is available to compile MioScript applications. |
// Load central settings
Function.Central:Load(&c@Array)
Disk.File.Load.Array(Central.Path("central.mem"), &c@Array)
Function.End
// Fill an array with folder settings
Function.Central:Folder:Load(&c@Array, &c@Name)
Disk.File.Load.Array(Central.Path(&c@Name".mem"), &c@Array)
Function.End
// Ressources graphiques
Function.Initialize:Graphics()
&iWork = Draw.Mem.Create()
draw.&iWork.Width = 260+&headwidth
Draw.&iWork.Height = &iconcount*&iconheight+&headheight
//Window.Main.shape.rect = 0,0,&headwidth,screen.height()
window.main.pos.now(screen.width()-130,140,0,0)
draw.&iWork.load(Path.rsc("IconBack.bmp"),200+&headwidth,0)
draw.&iWork.load(Path.rsc("Number.bmp"),290,&iconheight)
// Bottom
draw.&iWork.load(Path.rsc("Bottom.bmp"),200+&iconleft,&headheight+&iconcount*&iconheight)
Function.End
// Central Icons and head
Function.Initialize:Central:Icons()
for(&ptr,0,&iconcount)
draw.&iWork.CopyFrom.&iWork(200+&headwidth,0,&iconwidth,&iconheight,200+&iconleft,&headheight+&ptr*&iconheight)
&Item[] = &Central[&ptr]
draw.&iWork.load(Central.Path("icon_"&Item[3]),206+&iconleft,&headheight+&ptr*&iconheight+6)
If(&Item[0] = FOLDER) // Folder
Draw.&iWork.load(Central.Path("head_"&Item[2]),300, (&Ptr+1) * &HeadHeight)
If.End
for.next()
// Main head
draw.&iWork.load(Path.rsc("Head.bmp"),300,0)
draw.Main.CopyFrom.&iWork = 300,0,&headwidth,&headheight,0,0
Function.end
// Load all folder icons
Function.Initialize:FolderIcons
&iFolder = Draw.Mem.Create()
&iFolderIcons = Draw.Mem.Create()
// Browse all items
For(&ptr, 0, &iconcount)
&Item[] = &Central[&ptr]
If(&Item[0] = FOLDER)
Central.Folder.Load(Folder, &Item[1])
if(Var.Array.Count(Folder)*42 > Draw.&iFolderIcons.Height())
Draw.&iFolderIcons.Height = Var.Array.Count(Folder)*42
If.End
For(&elem, 0, Var.Array.Count(Folder))
&Item[] = &Folder[&elem]
If(Disk.File.Exists(Central.Path(&Item[3])))
Draw.&iFolderIcons.Load = Central.Path(&Item[3]), &ptr*42, &elem*42
If.Else
Draw.&iFolderIcons.Load = Path.Rsc("Null.bmp"), &ptr*42, &elem*42
If.End
For.Next
If.End
For.Next
Function.End
// Video
Function.Initialize:Video()
&srcvideoleft = 300+&headwidth
&srcvideotop = 0
draw.&iWork.load(Path.rsc("Video.jpg"),&srcvideoleft,&srcvideotop)
&videoleft=30
&videotop=19
&videocount=24
&videoindex=0
&Videoanim = 20
Function.End
// Folders icons
// Called when a folder is opened
Function.Initialize:Folder()
Draw.&iFolder.Rect = 0, 0, &XCount * 49 + 3, &YCount * &IconHeight + 2, 0
// Draw icons
For(&ptr, 0, &FolderCount)
Draw.&iFolder.Rect(5 + &cX * 49,&cY * &IconHeight,44, 44, Num.RGB(255,255,255))
Draw.&iFolder.CopyFrom.&iFolderIcons(&CurrentFolder*42,&ptr * 42, 42, 42,6 + &cX * 49, 1+ &cY * &IconHeight,Null, Null)
// Next icon, check if column changes
Var.Inc(cY)
If(&cY = &YCount)
Var.Dec(cX)
&cY = 0
If.End
For.Next
Function.End
|
function.Paint:Central:Icons()
If(Mouse.Main.IsOverWindow() = True || &DoCentralPaint > 0 || &CurrentFolder > -1)
draw.Main.CopyFrom.&iWork(200+&iconleft, &headheight+&bottomheight+(&iconcount*&iconheight)-&height,&iconwidth, &bottomheight+&iconcount*&iconheight*(&size/10)/100,&iconleft, &headheight)
Var.Dec(DoCentralPaint)
If.end
function.end
function.Paint:Central:Selection()
// Flash on icons
if(&Flash>0 && &Index >= 0)
Draw.Main.Rect(6 + &IconLeft, 6 + &Index * &IconHeight + &HeadHeight,42, 42,Num.RGB(255, 255, 255),Null, Var.Dec(Flash, 20, 0)/4)
if.end
// If a folder is open
if(&CurrentFolder > -1)
for(&fcp, 0, &IconCount)
if(&fcp <> &CurrentFolder)
Draw.Main.Rect(5 + &IconLeft, 5 + &fcp * &IconHeight + &HeadHeight,44, 45,Num.RGB(0,0,0),Null, 50)
if.end
for.next
if.end
// Selection
if(&Index <> -1)
if(&SubSel <> 6 + &Index * &IconHeight + &HeadHeight)
if(&SubSel < 6 + &Index * &IconHeight + &HeadHeight)
Var.Inc(SubSel, 7, 6 + &Index * &IconHeight + &HeadHeight)
if.else
Var.Dec(SubSel, 7, 6 + &Index * &IconHeight + &HeadHeight)
if.end
if(&SubSel = 6 + &Index * &IconHeight + &HeadHeight)
Play(CongaLow)
if.end
if.end
Draw.Main.Rect(&IconLeft, &SubSel,54, 42,Num.RGB(&Flash/4+130, &Flash/4+150, &Flash/4+150),Null, 30)
Draw.Main.Rect(6 + &IconLeft, 6 + &Index * &IconHeight + &HeadHeight,42, 42,Num.RGB(255, 255, 255),Null, 30)
If.end
function.end
function.Paint:Central:FX()
// Anim when opening and closing
If(&OpenLevel <> 0 && &OpenLevel <> 1000)
for(&ptr,0,4,1)
draw.Main.Ellipse(48+num.sin(400-(&size*400/1000)-&ptr*10,30),32+num.cos(400-(&size*400/1000)-&ptr*10,30),&ptr+3,&ptr+3,num.rgb(255,255,255),Null,20+num.sin(&size*360/1000-90,20))
for.next()
If.end
// Flashing numbers (when mouse is over object only)
if(&OpenLevel = 1000 && Mouse.Main.IsOverWindow() = True)
Var.Inc(Nums, 5, 360, 0)
For(&ptr, 1, 4)
Draw.Main.CopyFrom.&iWork(290,&iconheight, 5, 45,&IconLeft + &IconWidth - 5, Num.Cos(&Nums + &ptr*90, (&height-&HeadHeight)/2) + &HeadHeight + (&Height-&HeadHeight)/2+5,Null, Null,Num.Cos(&Nums * &ptr, 50)+50, True)
For.Next
If.End
function.end
function.Paint:Central:Video()
// Video
var.inc(videoindex,10,&videocount*20,0)
draw.Main.CopyFrom.&iWork(&srcvideoleft, &srcvideotop+(&videoindex/20)*30,40, 30,&videoleft,&videotop, Null,Null,num.sin(var.inc(videoanim,1,360,0),20)+20,False)
function.end
function.Paint:Head()
if(&CurrentFolder = -1 && &RefreshFolder = False)
if(&OpenLevel <> 1000 && &OpenLevel <> 0)
draw.Main.copyfrom.&iWork(300,0,&headwidth,&headheight,0,0,Null,Null,20, False)
if.end
Paint.Central.Video()
if.else
draw.Main.copyfrom.&iWork(300,(&CurrentFolder+1)*&headheight,&headwidth,&headheight,0,0,Null,Null,?(&RefreshFolder = True, 100, 20), False)
&RefreshFolder = false
if.end
function.end
|
// TextEx.DrawLetter(x, y, Char)
// -> Draw a letter and returns the width
// TextEx must be initialised before this function is called TextEx.Initialize
// TextEx.Initialize
// -> Initialize textex. Initialisation is automatic when TextEx.DrawText is called
// Text Attributes
function.Text:Ex:Size(&GFSizeX, &GFSizeY)
function.end
function.Text:Ex:Bold(&GFBold)
function.end
function.Text:Ex:Spacing(&GFSpacing)
function.end
function.Text:Ex:Color(&GFColor)
function.end
// Return the width of a text string
function.Text:Ex:Width(&te@Text)
If(Var.Exists(GFont) = False)
Text.Ex.Initialize
If.End
&te@Text = Str.Upper(&te@Text)
&te@Width = 0
For(&te@tPtr, 0, Str.Len(&te@Text))
&@Index = Num.Char(Str.Sub(&te@Text, &te@tPtr, 1))
&@GCurrent[] = &GFont[&@Index]
&te@Width = &te@Width + &@GCurrent*&GFSizeX/10 + &GFSpacing
For.Next
return(&te@Width)
function.end
// Draw a text
function.Text:Ex:Draw(&tx@ID, &@X, &@Y, &@Text)
if(Var.Exists(GFont) = False)
Text.Ex.Initialize
if.end
&@Text = Str.Upper(&@Text)
for(&@tPtr, 0, Str.Len(&@Text))
&@X = &@X + Text.Ex.Draw.Letter(&tx@ID, &@X, &@Y, Str.Sub(&@Text, &@tPtr))
for.next
return(&@X)
function.end
// Draw a letter and return the width for the drawen letter
function.Text:Ex:Draw:Letter(&tx@ID, &@X, &@Y, &@Letter)
&@LetterIndex = num.char(&@Letter)
var.array.clear(GCurrent)
&GCurrent[] = &GFont[&@LetterIndex]
if(Var.Array.Count(GCurrent)>1)
for(&@Ptr, 1, Var.Array.Count(GCurrent), 4)
draw.&tx@ID.Line((&GCurrent[&@Ptr] * &GFSizeX)/10 + &@X, (&GCurrent[&@Ptr+1] * &GFSizeY)/10 + &@Y,(&GCurrent[&@Ptr+2] * &GFSizeX)/10 + &@X, (&GCurrent[&@Ptr+3] * &GFSizeY)/10 + &@Y, &GFBold, &GFColor)
for.next
If.End
return(&GCurrent[0] * &GFSizeX /10 + &GFSpacing)
function.end
function.Text:Ex:Initialize
if(Var.Exists(GFSizeX) = False)
&GFSizeX = 50
&GFSizeY = 70
If.End
If(Var.Exists(GFColor) = False)
&GFColor = Num.RGB(255,255,255)
If.End
&GFont[65] = "5^^3^^1^^1^^5^^3^^1^^5^^5^^2^^4^^4^^4"
&GFont[66] = "5^^1^^5^^1^^1^^1^^1^^4^^1^^4^^1^^5^^2^^5^^2^^4^^3^^4^^3^^1^^3^^4^^3^^5^^4^^5^^4^^4^^5^^4^^5^^1^^5"
&GFont[67] = "5^^5^^2^^4^^1^^4^^1^^2^^1^^2^^1^^1^^2^^1^^2^^1^^4^^1^^4^^2^^5^^2^^5^^4^^5^^4^^5^^5^^4"
&GFont[68] = "5^^1^^5^^1^^1^^1^^1^^4^^1^^4^^1^^5^^2^^5^^2^^5^^4^^5^^4^^4^^5^^4^^5^^1^^5"
&GFont[69] = "4^^4^^1^^1^^1^^1^^1^^1^^5^^1^^5^^4^^5^^1^^3^^3^^3"
&GFont[70] = "4^^4^^1^^1^^1^^1^^1^^1^^5^^1^^3^^3^^3"
&GFont[71] = "5^^5^^2^^4^^1^^4^^1^^2^^1^^2^^1^^1^^2^^1^^2^^1^^4^^1^^4^^2^^5^^2^^5^^4^^5^^4^^5^^5^^4^^5^^4^^5^^3^^5^^3^^3^^3"
&GFont[72] = "5^^1^^1^^1^^5^^5^^1^^5^^5^^1^^3^^5^^3"
&GFont[73] = "2^^2^^1^^2^^5"
&GFont[74] = "5^^5^^1^^5^^4^^5^^4^^4^^5^^4^^5^^2^^5^^2^^5^^1^^4"
&GFont[75] = "5^^1^^1^^1^^5^^1^^3^^4^^1^^1^^3^^5^^5"
&GFont[76] = "4^^1^^1^^1^^5^^1^^5^^4^^5"
&GFont[77] = "5^^1^^5^^1^^1^^1^^1^^3^^4^^3^^4^^5^^1^^5^^1^^5^^5"
&GFont[78] = "4^^1^^5^^1^^1^^1^^1^^4^^5^^4^^5^^4^^1"
&GFont[79] = "5^^5^^2^^4^^1^^4^^1^^2^^1^^2^^1^^1^^2^^1^^2^^1^^4^^1^^4^^2^^5^^2^^5^^4^^5^^4^^5^^5^^4^^5^^4^^5^^3^^5^^3^^5^^2"
&GFont[80] = "5^^1^^3^^4^^3^^4^^3^^5^^2^^5^^2^^4^^1^^4^^1^^1^^1^^1^^1^^1^^5"
&GFont[81] = "5^^5^^2^^4^^1^^4^^1^^2^^1^^2^^1^^1^^2^^1^^2^^1^^4^^1^^4^^2^^5^^2^^5^^5^^5^^4^^5^^5^^4^^5^^4^^5^^3^^5^^3^^5^^2"
&GFont[82] = "5^^1^^3^^4^^3^^4^^3^^5^^2^^5^^2^^4^^1^^4^^1^^1^^1^^1^^1^^1^^5^^3^^3^^5^^5"
&GFont[83] = "5^^5^^2^^4^^1^^4^^1^^2^^1^^2^^1^^1^^2^^1^^2^^2^^3^^2^^3^^4^^3^^4^^3^^5^^4^^5^^4^^4^^5^^4^^5^^2^^5^^2^^5^^1^^4"
&GFont[84] = "5^^1^^1^^5^^1^^3^^1^^3^^5"
&GFont[85] = "4^^1^^1^^1^^4^^1^^4^^2^^5^^2^^5^^3^^5^^3^^5^^4^^4^^4^^4^^4^^1"
&GFont[86] = "5^^1^^1^^3^^5^^3^^5^^5^^1"
&GFont[87] = "5^^1^^1^^2^^5^^2^^5^^3^^1^^3^^1^^4^^5^^4^^5^^5^^1"
&GFont[88] = "4^^1^^1^^4^^5^^4^^1^^1^^5"
&GFont[89] = "4^^1^^1^^3^^3^^4^^1^^2^^5"
&GFont[90] = "5^^1^^1^^4^^1^^4^^1^^1^^5^^1^^5^^4^^5"
&GFont[39] = "2^^1^^1^^1^^3" // '
&GFont[44] = "2^^2^^5^^1^^6" // ,
&GFont[46] = "2^^1^^5^^2^^5" // .
&GFont[32] = "5" // Space
function.end
|
// Ouvre un dossier
Function.Folder:Open()
&FolderIndex = -1
&CentralLeft = &IconLeft + Window.Main.Left()
&CentralTop = &HeadHeight + Window.Main.Top()
&CurrentFolder = &Index // Remember the opened icon
&CenPos = -1
If(&oFolder = Null)
&oFolder = Window.Create(False)
Window.&oFolder.Group.Set = Folder
If.Else
Window.&oFolder.Visible = False
If.End
Window.&oFolder.AutoClose = False, False
Var.Array.Clear(Folder)
Central.Folder.Load(Folder, &Selection[1])
&FolderCount = Var.Array.Count(Folder)
Draw.&oFolder.Rect = 0, 0, Window.&oFolder.Width(), Window.&oFolder.Height()
Folder.Refresh()
Initialize.Folder()
Folder.Pos(True)
Window.&oFolder.Visible = True
window.main.bringToFront()
DoEvent.Folder:Anim
Function.End
// Set the shape
Function.Folder:Pos(&Init)
&fWidth = 49 * &xCount + ?(&CenPos=&XCount, 2, 5)
If(&xCount>1)
Var.Inc(fWidth, &IconWidth)
If.End
&fHeight = &IconHeight * &yCount+5
&fLeft = &CentralLeft - (&CenPos*49)-1
&fTop = &CentralTop + &IconHeight * &CurrentFolder - &IconHeight
If(&fHeight + &fTop > &CentralTop + &Height)
&fTop = &fTop - &IconHeight
If.End
If(&fTop < &CentralTop)
&fTop = &CentralTop
If.End
If(&xCount = 1 && &fLeft < 0)
&fLeft = &CentralLeft + &IconWidth
If.End
if(&CenPos = 0)
Var.Inc(fLeft)
If.End
&FolderDeltaY = &fTop - &CentralTop
If(&Init)
window.&oFolder.Shape.Rect = 0,0, &fWidth, &fHeight
window.&oFolder.Pos.Now = &fLeft, &fTop
If.Else
window.&oFolder.Pos = &fLeft, &fTop, &fWidth, &fHeight
If.End
Function.End
// Define folder visual structure
Function.Folder:Refresh()
&YCount = 3 // Always 3
// Number of icons on the incomplete column (if 0 then does not exists)
&Delta = num.compute(((&FolderCount*10)/3 - (&FolderCount/3)*10)/3)
&xCount = &FolderCount/3
If(&Delta>0)
Var.Inc(xCount)
If.End
// Current values
&cX = &XCount-1
&cY = 0
// Position of the division
If(&XCount>1)
&CenPos = &XCount / 2
&CenAdd = &IconWidth
&Overlap = &IconWidth
If(&XCount-&CenPos > &CenPos)
Var.Inc(CenPos)
If.End
&BestCenPos = &CenPos
&Continue = True
While(&Continue)
&Continue = False
&SizeRight = (&XCount - &CenPos) * 49
&SizeLeft = &CenPos * 49
If(&CentralLeft - &SizeLeft < 0)
Var.Dec(CenPos)
&Continue = True
If.End
If(&CentralLeft + &IconWidth + &SizeRight > Screen.Width())
Var.inc(CenPos)
If(&CenPos = &XCount)
&CenAdd = 0
&Overlap = 0
&Continue = False
If.Else
&Continue = True
If.End
If.End
While.End
If.Else
&BestCenPos = &XCount
&CenPos = &XCount
&CenAdd = 0
&Overlap = 0
If.End
If(&Overlap = 0)
If(&CentralLeft < &IconWidth+30)
&fLeft = &CentralLeft - (&CenPos*49)-1
If.End
If.End
Function.End
Function.Folder:Paint()
// Paint all...
Draw.&oFolder.Rect = 0,0, &XCount * 49 + &IconWidth + 5, &IconHeight*&YCount+5, 0
Draw.&oFolder.CopyFrom.&iFolder = 0, 0, &CenPos * 49 + 3, &IconHeight*&YCount, 0,5
Draw.&oFolder.CopyFrom.&iFolder(&CenPos*49, 0,(&XCount - &CenPos) * 49 + 5, &IconHeight*&YCount, &CenPos*49 + &IconWidth, 5)
Function.End
Function.Folder:FollowCentral
If(&oFolder <> Null)
&CentralLeft = &IconLeft + Window.Main.Left()
&CentralTop = &HeadHeight + Window.Main.Top()
Folder.Pos(False)
If(window.&oFolder.Left() < 0 || window.&oFolder.Left() + window.&oFolder.Width() > Screen.Width() || &BestCenPos <> &CenPos)
&OldCenPos = &CenPos
Folder.Refresh()
Folder.Pos(False)
If.End
If.End
Function.End
Function.Folder:Close
&RefreshFolder = True
&DoCentralPaint = 3
&CurrentFolder = -1
window.&oFolder.Visible = False
window.&oFolder.Close()
&oFolder = Null
Function.End
|
// Mouse move
Event.Mouse:Move:Folder
If(&oFolder <> Null)
&fiLast = &FolderIndex
&FolderIndex = Folder.GetXYIndex(Mouse.&oFolder.X(), Mouse.&oFolder.Y())
If(Var.Array.Count(Folder) <= &FolderIndex)
&FolderIndex = -1
If.End
If.End
Event.End
Event.Mouse:Exit:Folder
&FolderIndex = -1
Event.End
// Mouse click : User choose an application to start
Event.Mouse:click:Folder
If(&FolderIndex > -1)
&SelFolder[] = &Folder[&FolderIndex]
If(&SelFolder[0] = App)
Play(Click)
// HERE ACTION
// System.Execute = &SelFolder[4]
Folder.Close()
If.End
If.End
Event.End
// Animate folder
Event.Folder:Anim
If(&oFolder <> Null)
Folder.Paint()
// Draw the selection
If(&FolderIndex > -1)
&px = ?(&cx >= &CenPos, &cx * 49 + &IconWidth, &cx * 49)
&py = &cy * 49
Draw.&oFolder.Rect = &px+6, &py+6, 42, 42, Num.RGB(255,255,255), Null, 50
If.End
Draw.&oFolder.Paint
DoEvent.Folder:Anim(20)
If.End
Event.End
// Get current selection
// cx and cy contains the h and v index of the icon
Function.Folder:GetXYIndex(&mx, &my)
&cy = ?(&my > &YCount * &IconHeight, &YCount, &my / &IconHeight)
&cx = ?(&mx > &CenPos*49, (&mx-&IconWidth) / 49, &mx/49)
Return((&xCount - &cx - 1) * 3 + &cy)
Function.End |
event.load()
extern.close("{APP_NAME}") // Only one instance allowed
app.init("{APP_ID}", "{APP_NAME}", "{APP_VERSION}", "{APP_BUILD}", "{CREATE_LOG}")
&oFolder = Null
&CurrentFolder = -1 // No folder is opened
&Flash = 0
&headwidth=102
&headheight=70
&iconheight=49
&iconwidth=54
&iconleft=24
&bottomheight=19
&SubSel = &headheight
&opentarget = 0
&openlevel = 20
&Index = -1
&Selection[] = ""
window.main.autoClose(False, True)
// Load central icons
Central.Load(Central)
&iconcount = Var.Array.Count(Central)
Initialize.Graphics()
Initialize.Central.Icons()
Initialize.Video()
// Shape
draw.main.rect(0, &headheight,&headwidth,screen.height(),draw.&iWork.getpixel(300,0))
draw.main.rect(&iconleft,&headheight,&iconwidth,screen.height(),6000)
window.main.shape.from.Main(0,0,&headwidth,screen.height())
window.main.height(&headheight)
Initialize.FolderIcons()
Play(CongaIntro)
doevent.display()
anim.main.sensibility(30)
anim.main.direction(90)
anim.main.speed(25)
anim.main.friction(30)
event.end
Function.Central:Path(&p@)
return(path.rsc(&p@))
Function.End
event.mouse:click()
If(&Index = - 1)
If(&CurrentFolder = -1)
&opentarget = ?(&opentarget = 1000,0,1000)
If.Else
Folder.Close()
If.End
If.Else
If(&Flash = 0 || &WaitForFlash = False)
&Selection[] = &Central[&Index]
If(&Selection[0] = APP) // Start Application
&Flash = 400
&WaitForFlash = True
System.Execute = &Selection[4]
Play(Conga)
&tt[] = &Central[&Index]
If.End
If(&Selection[0] = FOLDER)
&WaitForFlash = False
If(&CurrentFolder = &Index)
Folder.Close()
If.Else
Folder.Open()
If.End
Play(Conga)
If.End
If.End
If.End
event.end()
event.display()
doEvent.display(50)
Paint.Central.Icons()
Paint.Central.Selection()
// Open or close
&speed= ?(&opentarget = 1000,(60-(&openlevel/20))*20/&iconcount*2,((&openlevel/20)+10)*20/&iconcount*2)
if(&openlevel < &opentarget)
var.inc(openlevel,&speed,1000)
if.end
if(&openlevel > &opentarget)
var.dec(openlevel,&speed,0)
if.end
// VSize
&height=(&iconcount*&iconheight+&bottomheight)*(&openlevel/10)/100
// Mouse over the object
If(Mouse.Main.Y() > &HeadHeight && Mouse.Main.IsOverWindow()=true)
Mouse.Main.Cursor = Hotspot
&y = Mouse.Main.Y() - &HeadHeight
&NewIndex = ?(&y / &IconHeight < &IconCount, &y / &IconHeight, -1)
If(&NewIndex <> &Index && &NewIndex<>-1)
&Index = &NewIndex
&Selection[] = &Central[&Index]
If.End
If.Else
If(&Index > -1)
Mouse.Main.Cursor = Normal
&DoCentralPaint = 1
&Index = -1
If.End
If.End
imagebar.draw(&openlevel, &Index)
event.end()
function.imagebar:draw(&Size, &Index)
Paint.Head()
Paint.Central.Icons()
Paint.Central.Selection()
Paint.Central.FX()
WIndow.Main.height = &height+&headheight
draw.main.paint()
function.end()
Event.Move
Folder.FollowCentral
Event.End
Event.Anim:Move
Folder.FollowCentral
Event.End
Event.LostFocus
If(&CurrentFolder <> -1 && &oFolder<>Null)
Folder.Close()
If.End
Event.End
Function.Play(&Sound)
Sound.Play = Path.Rsc(&Sound".wav")
Function.End
|
In the same topic
|
|