Bug fixed re starting a task manager

This commit is contained in:
Luis Fernando Molina committed 2020-03-29 12:23:44 +02:00
1 parent 51fcc0446a
commit ceea65e633
3 files changed
+29 -12

No files matched your search

+8
View File
@@ -7,6 +7,7 @@ function newCircularMenu () {
isDeployed: undefined,
internalClick: internalClick,
physics: physics,
invisiblePhysics: invisiblePhysics,
drawBackground: drawBackground,
drawForeground: drawForeground,
getContainer: getContainer,
@@ -171,6 +172,13 @@ function newCircularMenu () {
}
}
function invisiblePhysics () {
for (let i = 0; i < menuItems.length; i++) {
let menuItem = menuItems[i]
menuItem.invisiblePhysics()
}
}
function physics () {
for (let i = 0; i < menuItems.length; i++) {
let menuItem = menuItems[i]
+20 -11
View File
@@ -41,6 +41,7 @@ function newCircularMenuItem () {
isEnabled: true,
internalClick: internalClick,
physics: physics,
invisiblePhysics: invisiblePhysics,
drawBackground: drawBackground,
drawForeground: drawForeground,
getContainer: getContainer,
@@ -133,6 +134,24 @@ function newCircularMenuItem () {
}
}
function invisiblePhysics () {
temporaryStatusPhysics()
}
function temporaryStatusPhysics () {
/* Temporary Status impacts on the label to use and the background of that label */
if (temporaryStatusCounter > 0) {
temporaryStatusCounter--
}
if (temporaryStatusCounter === 0) {
temporaryStatus = STATUS_NO_ACTION_TAKEN_YET
labelToPrint = thisObject.label
backgroundColorToUse = defaultBackgroudColor
thisObject.nextAction = thisObject.action
}
}
function physics () {
if (thisObject.dontShowAtFullscreen === true && AT_FULL_SCREEN_MODE === true) { return }
@@ -173,17 +192,7 @@ function newCircularMenuItem () {
thisObject.container.frame.position.x = thisObject.container.frame.radius * radiusGrowthFactor / 7 * Math.cos(toRadians(thisObject.angle)) - thisObject.currentRadius * 1.5
thisObject.container.frame.position.y = thisObject.container.frame.radius * radiusGrowthFactor / 7 * Math.sin(toRadians(thisObject.angle)) - thisObject.container.frame.height / 2
/* Temporary Status impacts on the label to use and the background of that label */
if (temporaryStatusCounter > 0) {
temporaryStatusCounter--
}
if (temporaryStatusCounter === 0) {
temporaryStatus = STATUS_NO_ACTION_TAKEN_YET
labelToPrint = thisObject.label
backgroundColorToUse = defaultBackgroudColor
thisObject.nextAction = thisObject.action
}
temporaryStatusPhysics()
/* Here we will check if we need to monitor a property that influences the status of the Menu Item. */
if (thisObject.disableIfPropertyIsDefined === true) {
+1 -1
View File
@@ -263,6 +263,7 @@ function newUiObject () {
}
function invisiblePhysics () {
thisObject.menu.invisiblePhysics()
childrenRunningPhysics()
}
@@ -1723,4 +1724,3 @@ function newUiObject () {
}
}
}