mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-06-07 21:59:49 -05:00
HUD: fix LUI left and right anchors
This commit is contained in:
parent
f0ebf4b3fe
commit
2af0555495
@ -8,13 +8,13 @@ LUI.createMenu.ReimaginedArea = function(LocalClientIndex)
|
|||||||
local y = 3
|
local y = 3
|
||||||
|
|
||||||
local enemyCounterWidget = LUI.UIElement.new()
|
local enemyCounterWidget = LUI.UIElement.new()
|
||||||
enemyCounterWidget:setLeftRight(true, false, x, x)
|
enemyCounterWidget:setLeftRight(true, true, x, x)
|
||||||
enemyCounterWidget:setTopBottom(true, false, y, y)
|
enemyCounterWidget:setTopBottom(true, false, y, y)
|
||||||
enemyCounterWidget:setAlpha(0)
|
enemyCounterWidget:setAlpha(0)
|
||||||
safeArea:addElement(enemyCounterWidget)
|
safeArea:addElement(enemyCounterWidget)
|
||||||
|
|
||||||
local enemyCounterText = LUI.UIText.new()
|
local enemyCounterText = LUI.UIText.new()
|
||||||
enemyCounterText:setLeftRight(true, false, 0, 1000)
|
enemyCounterText:setLeftRight(true, true, 0, 0)
|
||||||
enemyCounterText:setTopBottom(true, false, 0, CoD.textSize.Default)
|
enemyCounterText:setTopBottom(true, false, 0, CoD.textSize.Default)
|
||||||
enemyCounterText:setFont(CoD.fonts.Big)
|
enemyCounterText:setFont(CoD.fonts.Big)
|
||||||
enemyCounterText:setAlignment(LUI.Alignment.Left)
|
enemyCounterText:setAlignment(LUI.Alignment.Left)
|
||||||
@ -43,13 +43,13 @@ LUI.createMenu.ReimaginedArea = function(LocalClientIndex)
|
|||||||
local y = 18
|
local y = 18
|
||||||
|
|
||||||
local timerWidget = LUI.UIElement.new()
|
local timerWidget = LUI.UIElement.new()
|
||||||
timerWidget:setLeftRight(false, true, x, x)
|
timerWidget:setLeftRight(true, true, x, x)
|
||||||
timerWidget:setTopBottom(true, false, y, y)
|
timerWidget:setTopBottom(true, false, y, y)
|
||||||
timerWidget:setAlpha(0)
|
timerWidget:setAlpha(0)
|
||||||
safeArea:addElement(timerWidget)
|
safeArea:addElement(timerWidget)
|
||||||
|
|
||||||
local totalTimerText = LUI.UIText.new()
|
local totalTimerText = LUI.UIText.new()
|
||||||
totalTimerText:setLeftRight(true, false, -1000, 0)
|
totalTimerText:setLeftRight(true, true, 0, 0)
|
||||||
totalTimerText:setTopBottom(true, false, 0, CoD.textSize.Default)
|
totalTimerText:setTopBottom(true, false, 0, CoD.textSize.Default)
|
||||||
totalTimerText:setFont(CoD.fonts.Big)
|
totalTimerText:setFont(CoD.fonts.Big)
|
||||||
totalTimerText:setAlignment(LUI.Alignment.Right)
|
totalTimerText:setAlignment(LUI.Alignment.Right)
|
||||||
@ -57,7 +57,7 @@ LUI.createMenu.ReimaginedArea = function(LocalClientIndex)
|
|||||||
timerWidget.totalTimerText = totalTimerText
|
timerWidget.totalTimerText = totalTimerText
|
||||||
|
|
||||||
local roundTimerText = LUI.UIText.new()
|
local roundTimerText = LUI.UIText.new()
|
||||||
roundTimerText:setLeftRight(true, false, -1000, 0)
|
roundTimerText:setLeftRight(true, true, 0, 0)
|
||||||
roundTimerText:setTopBottom(true, false, 0 + 23, CoD.textSize.Default + 23)
|
roundTimerText:setTopBottom(true, false, 0 + 23, CoD.textSize.Default + 23)
|
||||||
roundTimerText:setFont(CoD.fonts.Big)
|
roundTimerText:setFont(CoD.fonts.Big)
|
||||||
roundTimerText:setAlignment(LUI.Alignment.Right)
|
roundTimerText:setAlignment(LUI.Alignment.Right)
|
||||||
@ -65,7 +65,7 @@ LUI.createMenu.ReimaginedArea = function(LocalClientIndex)
|
|||||||
timerWidget.roundTimerText = roundTimerText
|
timerWidget.roundTimerText = roundTimerText
|
||||||
|
|
||||||
local roundTotalTimerText = LUI.UIText.new()
|
local roundTotalTimerText = LUI.UIText.new()
|
||||||
roundTotalTimerText:setLeftRight(true, false, -1000, 0)
|
roundTotalTimerText:setLeftRight(true, true, 0, 0)
|
||||||
roundTotalTimerText:setTopBottom(true, false, 0 + 46, CoD.textSize.Default + 46)
|
roundTotalTimerText:setTopBottom(true, false, 0 + 46, CoD.textSize.Default + 46)
|
||||||
roundTotalTimerText:setFont(CoD.fonts.Big)
|
roundTotalTimerText:setFont(CoD.fonts.Big)
|
||||||
roundTotalTimerText:setAlignment(LUI.Alignment.Right)
|
roundTotalTimerText:setAlignment(LUI.Alignment.Right)
|
||||||
@ -107,7 +107,7 @@ LUI.createMenu.ReimaginedArea = function(LocalClientIndex)
|
|||||||
local bgDiff = 2
|
local bgDiff = 2
|
||||||
|
|
||||||
local healthBarWidget = LUI.UIElement.new()
|
local healthBarWidget = LUI.UIElement.new()
|
||||||
healthBarWidget:setLeftRight(true, false, x, x)
|
healthBarWidget:setLeftRight(true, true, x, x)
|
||||||
healthBarWidget:setTopBottom(false, true, y, y)
|
healthBarWidget:setTopBottom(false, true, y, y)
|
||||||
healthBarWidget:setAlpha(0)
|
healthBarWidget:setAlpha(0)
|
||||||
healthBarWidget.width = width
|
healthBarWidget.width = width
|
||||||
@ -142,7 +142,7 @@ LUI.createMenu.ReimaginedArea = function(LocalClientIndex)
|
|||||||
healthBarWidget.shieldBar = shieldBar
|
healthBarWidget.shieldBar = shieldBar
|
||||||
|
|
||||||
local healthText = LUI.UIText.new()
|
local healthText = LUI.UIText.new()
|
||||||
healthText:setLeftRight(true, false, width + bgDiff * 2, 0)
|
healthText:setLeftRight(true, true, width + bgDiff * 2, 0)
|
||||||
healthText:setTopBottom(true, false, 0 - bgDiff, height + bgDiff)
|
healthText:setTopBottom(true, false, 0 - bgDiff, height + bgDiff)
|
||||||
healthText:setFont(CoD.fonts.Big)
|
healthText:setFont(CoD.fonts.Big)
|
||||||
healthText:setAlignment(LUI.Alignment.Left)
|
healthText:setAlignment(LUI.Alignment.Left)
|
||||||
@ -172,13 +172,13 @@ LUI.createMenu.ReimaginedArea = function(LocalClientIndex)
|
|||||||
local y = -167
|
local y = -167
|
||||||
|
|
||||||
local zoneNameWidget = LUI.UIElement.new()
|
local zoneNameWidget = LUI.UIElement.new()
|
||||||
zoneNameWidget:setLeftRight(true, false, x, x)
|
zoneNameWidget:setLeftRight(true, true, x, x)
|
||||||
zoneNameWidget:setTopBottom(false, true, y, y)
|
zoneNameWidget:setTopBottom(false, true, y, y)
|
||||||
zoneNameWidget:setAlpha(0)
|
zoneNameWidget:setAlpha(0)
|
||||||
safeArea:addElement(zoneNameWidget)
|
safeArea:addElement(zoneNameWidget)
|
||||||
|
|
||||||
local zoneNameText = LUI.UIText.new()
|
local zoneNameText = LUI.UIText.new()
|
||||||
zoneNameText:setLeftRight(true, false, 0, 1000)
|
zoneNameText:setLeftRight(true, true, 0, 0)
|
||||||
zoneNameText:setTopBottom(true, false, -CoD.textSize.Default, 0)
|
zoneNameText:setTopBottom(true, false, -CoD.textSize.Default, 0)
|
||||||
zoneNameText:setFont(CoD.fonts.Big)
|
zoneNameText:setFont(CoD.fonts.Big)
|
||||||
zoneNameText:setAlignment(LUI.Alignment.Left)
|
zoneNameText:setAlignment(LUI.Alignment.Left)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user