progress bar prototype
This commit is contained in:
1 parent
fe463cbf3f
commit
90828da7e2
9 files changed
+101
-4
No files matched your search
@@ -0,0 +1,16 @@
|
||||
const PROGRESS_WIDTH = 1144
|
||||
const PROGRESS_HEIGHT = 6
|
||||
const SEEK_HANDLE_WIDTH = 16
|
||||
const SEEK_HANDLE_HEIGHT = 16
|
||||
|
||||
function Init()
|
||||
m.progressBar = m.top.findNode("ProgressBar")
|
||||
m.seekHandle = m.top.findNode("SeekHandle")
|
||||
OnProgressChange()
|
||||
end function
|
||||
|
||||
function OnProgressChange()
|
||||
position = PROGRESS_WIDTH * m.top.progress
|
||||
m.progressBar.width = position
|
||||
m.seekHandle.translation = [position - SEEK_HANDLE_WIDTH / 2, (PROGRESS_HEIGHT - SEEK_HANDLE_HEIGHT) / 2]
|
||||
end function
|
||||
Reference in new issue
Block a user