attempt fix clipping and fix onscreen text

This commit is contained in:
RandomityGuy 2022-12-23 22:11:08 +05:30
parent 146cecdfdc
commit 203d66ccfe
2 changed files with 5 additions and 7 deletions

View file

@ -415,8 +415,6 @@ class MarbleWorld extends Scheduler {
this.blastAmount = 0;
this.outOfBoundsTime = null;
this.finishTime = null;
this.helpTextTimeState = Math.NEGATIVE_INFINITY;
this.alertTextTimeState = Math.NEGATIVE_INFINITY;
if (this.alarmSound != null) {
this.alarmSound.stop();
this.alarmSound = null;
@ -1385,15 +1383,15 @@ class MarbleWorld extends Scheduler {
function updateTexts() {
var helpTextTime = this.helpTextTimeState;
var alertTextTime = this.alertTextTimeState;
var helpTextCompletion = Math.pow(Util.clamp((this.timeState.currentAttemptTime - helpTextTime - 3), 0, 1), 2);
var alertTextCompletion = Math.pow(Util.clamp((this.timeState.currentAttemptTime - alertTextTime - 3), 0, 1), 2);
var helpTextCompletion = Math.pow(Util.clamp((this.timeState.timeSinceLoad - helpTextTime - 3), 0, 1), 2);
var alertTextCompletion = Math.pow(Util.clamp((this.timeState.timeSinceLoad - alertTextTime - 3), 0, 1), 2);
this.playGui.setHelpTextOpacity(1 - helpTextCompletion);
this.playGui.setAlertTextOpacity(1 - alertTextCompletion);
}
public function displayAlert(text:String) {
this.playGui.setAlertText(text);
this.alertTextTimeState = this.timeState.currentAttemptTime;
this.alertTextTimeState = this.timeState.timeSinceLoad;
}
public function displayHelp(text:String) {
@ -1437,7 +1435,7 @@ class MarbleWorld extends Scheduler {
pos = text.indexOf("<func:", start);
}
this.playGui.setHelpText(text);
this.helpTextTimeState = this.timeState.currentAttemptTime;
this.helpTextTimeState = this.timeState.timeSinceLoad;
}
public function pickUpGem(gem:Gem) {

View file

@ -102,7 +102,7 @@ class GuiTextListCtrl extends GuiControl {
this.flow.maxHeight = cast htr.extent.y;
this.flow.multiline = true;
this.flow.layout = Stack;
this.flow.overflow = FlowOverflow.Limit;
this.flow.overflow = FlowOverflow.Hidden;
if (scene2d.contains(this.flow))
scene2d.removeChild(this.flow);