A New Design for the Top Bar?
Posted: May 19th, '18, 21:53
I don't know seems to organize things in categories of similarity, any thoughts?
Code for ProjectEditor.gp:
Code for ProjectEditor.gp:
Code: Select all
method addTopBarParts ProjectEditor {
scale = (global 'scale')
page = (global 'page')
space = (15 * scale)
title = (newText '' 'Arial Bold' (14 * scale))
addPart morph (morph title)
connectorLabel = (newText 'Show arrows:' 'Arial' (11 * scale))
connectorToggle = (toggleButton
(action 'toggleConnectors' page) (action 'isShowingConnectors' page)
(scale * 20) (scale * 13) (scale * 5) (max 1 (scale / 2)) false)
addPart morph (morph connectorLabel)
addPart morph (morph connectorToggle)
stealthSlider = (slider 'horizontal' (* scale 50) (action 'setBlocksStealthLevel' this) nil -50 110 (global 'stealthLevel'))
addPart morph (morph stealthSlider)
leftItems = (list)
add leftItems (textButton this 'New' 'newProject')
add leftItems (textButton this 'Open' 'openProjectMenu')
add leftItems (textButton this 'Save' 'saveProject')
rightItems = (list)
if (not (isOneOf (platform) 'Browser' 'iOS')) {
add rightItems (textButton this 'Export as App' 'exportProjectAsApp')
add rightItems (textButton this 'Export to Web' 'exportProjectToWeb')
}
add rightItems space
add rightItems (textButton this 'Go' (action 'broadcastGo' page))
add rightItems (textButton this 'Stop' (action 'stopAll' page))
add rightItems (textButton this 'Present' 'enterPresentation')
leftItemsRow2 = (list)
rightItemsRow2 = (list)
add rightItemsRow2 connectorLabel
add rightItemsRow2 connectorToggle
add rightItemsRow2 (clickLabel this 'Blocks' 'slideToBlocks')
add rightItemsRow2 stealthSlider
add rightItemsRow2 (clickLabel this 'Text' 'slideToText')
add rightItemsRow2 space
add rightItemsRow2 (addFPSReadout this)
}