mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-06-07 21:59:49 -05:00
Move dpad icons
Add dvar for using controller dpad icon positions Always show dpad arrows Never show dpad circle background
This commit is contained in:
parent
f765596e79
commit
99d85c9f68
@ -29,6 +29,7 @@
|
|||||||
* Zone name displayed on bottom left of screen - `hud_zone_name`
|
* Zone name displayed on bottom left of screen - `hud_zone_name`
|
||||||
* Added proper game mode and map name to scoreboard
|
* Added proper game mode and map name to scoreboard
|
||||||
* Added icons on scoreboard when player is downed, bled out, in Who's Who mode, or in afterlife
|
* Added icons on scoreboard when player is downed, bled out, in Who's Who mode, or in afterlife
|
||||||
|
* Moved keyboard and mouse dpad icons to their positions from Origins on all maps
|
||||||
* Increased waypoint offset from top of screen
|
* Increased waypoint offset from top of screen
|
||||||
* Changed player waypoint location to be center of player instead of top of player
|
* Changed player waypoint location to be center of player instead of top of player
|
||||||
* Increased distance between revive waypoint arrow and icon
|
* Increased distance between revive waypoint arrow and icon
|
||||||
|
@ -1,3 +1,15 @@
|
|||||||
|
if UIExpression.DvarString(nil, "ui_gametype_obj") == "" then
|
||||||
|
Engine.SetDvar("ui_gametype_obj", "")
|
||||||
|
end
|
||||||
|
|
||||||
|
if UIExpression.DvarString(nil, "ui_gametype_pro") == "" then
|
||||||
|
Engine.SetDvar("ui_gametype_pro", 0)
|
||||||
|
end
|
||||||
|
|
||||||
|
if UIExpression.DvarString(nil, "ui_round_number") == "" then
|
||||||
|
Engine.SetDvar("ui_round_number", 0)
|
||||||
|
end
|
||||||
|
|
||||||
local SCOREBOARD_BACKGROUND_OPACITY = 0.7
|
local SCOREBOARD_BACKGROUND_OPACITY = 0.7
|
||||||
local SCOREBOARD_COLUMN_BACKGROUND_OPACITY = 0.2
|
local SCOREBOARD_COLUMN_BACKGROUND_OPACITY = 0.2
|
||||||
local f0_local6 = 337
|
local f0_local6 = 337
|
||||||
@ -31,18 +43,6 @@ local f0_local41 = f0_local40
|
|||||||
local SCOREBOARD_MAX_ROWS = CoD.MPZM(23, 18)
|
local SCOREBOARD_MAX_ROWS = CoD.MPZM(23, 18)
|
||||||
local IsDLCMap2, IsDLCMap4, IsClassic = nil, nil, nil
|
local IsDLCMap2, IsDLCMap4, IsClassic = nil, nil, nil
|
||||||
|
|
||||||
if UIExpression.DvarString(nil, "ui_gametype_obj") == "" then
|
|
||||||
Engine.SetDvar("ui_gametype_obj", "")
|
|
||||||
end
|
|
||||||
|
|
||||||
if UIExpression.DvarString(nil, "ui_gametype_pro") == "" then
|
|
||||||
Engine.SetDvar("ui_gametype_pro", 0)
|
|
||||||
end
|
|
||||||
|
|
||||||
if UIExpression.DvarString(nil, "ui_round_number") == "" then
|
|
||||||
Engine.SetDvar("ui_round_number", 0)
|
|
||||||
end
|
|
||||||
|
|
||||||
CoD.ScoreboardRow = InheritFrom(LUI.UIElement)
|
CoD.ScoreboardRow = InheritFrom(LUI.UIElement)
|
||||||
|
|
||||||
local ScoreboardWidgetSetOwnerFunc = function (ScoreboardWidget, LocalClientIndex)
|
local ScoreboardWidgetSetOwnerFunc = function (ScoreboardWidget, LocalClientIndex)
|
||||||
|
@ -252,11 +252,8 @@ CoD.AmmoAreaZombie.UpdateActionSlots = function (f2_arg0, f2_arg1)
|
|||||||
f2_local10:setText(f2_local12.ammo)
|
f2_local10:setText(f2_local12.ammo)
|
||||||
Widget:addElement(f2_local10)
|
Widget:addElement(f2_local10)
|
||||||
end
|
end
|
||||||
if CoD.isPC then
|
if CoD.isPC and UIExpression.DvarBool(nil, "hud_dpad_controller") == 0 then
|
||||||
local f2_local10 = 0
|
local f2_local10 = 200
|
||||||
if CoD.Zombie.IsDLCMap(CoD.Zombie.DLC4Maps) then
|
|
||||||
f2_local10 = 200
|
|
||||||
end
|
|
||||||
local f2_local11 = nil
|
local f2_local11 = nil
|
||||||
if f2_local4 == 1 then
|
if f2_local4 == 1 then
|
||||||
f2_local11 = {
|
f2_local11 = {
|
||||||
@ -318,7 +315,7 @@ CoD.AmmoAreaZombie.UpdateActionSlots = function (f2_arg0, f2_arg1)
|
|||||||
Widget.keyPrompt:setAlignment(LUI.Alignment.Right)
|
Widget.keyPrompt:setAlignment(LUI.Alignment.Right)
|
||||||
Widget:registerAnimationState("KeyPrompt", f2_local11)
|
Widget:registerAnimationState("KeyPrompt", f2_local11)
|
||||||
Widget:addElement(Widget.keyPrompt)
|
Widget:addElement(Widget.keyPrompt)
|
||||||
if CoD.useController and Engine.LastInput_Gamepad() then
|
if CoD.useController and Engine.LastInput_Gamepad() or UIExpression.DvarBool(nil, "hud_dpad_controller") == 1 then
|
||||||
CoD.AmmoAreaZombie.ActionSlotInputSourceChanged(Widget, {
|
CoD.AmmoAreaZombie.ActionSlotInputSourceChanged(Widget, {
|
||||||
source = 0
|
source = 0
|
||||||
})
|
})
|
||||||
@ -620,7 +617,7 @@ end
|
|||||||
|
|
||||||
CoD.AmmoAreaZombie.ActionSlotInputSourceChanged = function (f15_arg0, f15_arg1)
|
CoD.AmmoAreaZombie.ActionSlotInputSourceChanged = function (f15_arg0, f15_arg1)
|
||||||
if CoD.isPC then
|
if CoD.isPC then
|
||||||
if CoD.useController and f15_arg1.source == 0 then
|
if CoD.useController and f15_arg1.source == 0 or UIExpression.DvarBool(nil, "hud_dpad_controller") == 1 then
|
||||||
f15_arg0:animateToState("default")
|
f15_arg0:animateToState("default")
|
||||||
if f15_arg0.keyPrompt ~= nil then
|
if f15_arg0.keyPrompt ~= nil then
|
||||||
f15_arg0.keyPrompt:setAlpha(0)
|
f15_arg0.keyPrompt:setAlpha(0)
|
||||||
@ -637,20 +634,11 @@ end
|
|||||||
|
|
||||||
CoD.AmmoAreaZombie.InputSourceChanged = function (f16_arg0, f16_arg1)
|
CoD.AmmoAreaZombie.InputSourceChanged = function (f16_arg0, f16_arg1)
|
||||||
if CoD.isPC then
|
if CoD.isPC then
|
||||||
if CoD.useController and f16_arg1.source == 0 then
|
if f16_arg0.carouselArrows ~= nil then
|
||||||
if f16_arg0.carouselArrows ~= nil then
|
f16_arg0.carouselArrows:setAlpha(1)
|
||||||
f16_arg0.carouselArrows:setAlpha(1)
|
end
|
||||||
end
|
if f16_arg0.circleBackground ~= nil then
|
||||||
if f16_arg0.circleBackground ~= nil then
|
f16_arg0.circleBackground:setAlpha(0)
|
||||||
f16_arg0.circleBackground:setAlpha(1)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
if f16_arg0.carouselArrows ~= nil then
|
|
||||||
f16_arg0.carouselArrows:setAlpha(0)
|
|
||||||
end
|
|
||||||
if f16_arg0.circleBackground ~= nil then
|
|
||||||
f16_arg0.circleBackground:setAlpha(0)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
if f16_arg0.actionSlots ~= nil then
|
if f16_arg0.actionSlots ~= nil then
|
||||||
for f16_local3, f16_local4 in pairs(f16_arg0.actionSlots) do
|
for f16_local3, f16_local4 in pairs(f16_arg0.actionSlots) do
|
||||||
|
@ -250,7 +250,7 @@ LUI.createMenu.DPadArea = function (f1_arg0)
|
|||||||
Widget:registerEventHandler("hud_update_team_change", CoD.DPadArea.UpdateTeamChange)
|
Widget:registerEventHandler("hud_update_team_change", CoD.DPadArea.UpdateTeamChange)
|
||||||
if CoD.isPC then
|
if CoD.isPC then
|
||||||
Widget:registerEventHandler("input_source_changed", CoD.DPadArea.InputSourceChanged)
|
Widget:registerEventHandler("input_source_changed", CoD.DPadArea.InputSourceChanged)
|
||||||
if CoD.useController and Engine.LastInput_Gamepad() then
|
if CoD.useController and Engine.LastInput_Gamepad() or UIExpression.DvarBool(nil, "hud_dpad_controller") == 1 then
|
||||||
CoD.DPadArea.InputSourceChanged(Widget, {
|
CoD.DPadArea.InputSourceChanged(Widget, {
|
||||||
source = 0
|
source = 0
|
||||||
})
|
})
|
||||||
@ -369,7 +369,8 @@ CoD.DPadArea.UpdateActionSlots = function (f2_arg0, f2_arg1)
|
|||||||
f2_local8:setText(f2_local9.ammo)
|
f2_local8:setText(f2_local9.ammo)
|
||||||
Widget:addElement(f2_local8)
|
Widget:addElement(f2_local8)
|
||||||
end
|
end
|
||||||
if CoD.isPC then
|
if CoD.isPC and UIExpression.DvarBool(nil, "hud_dpad_controller") == 0 then
|
||||||
|
local f2_local10 = 200
|
||||||
local f2_local8 = nil
|
local f2_local8 = nil
|
||||||
if f2_local4 == 1 then
|
if f2_local4 == 1 then
|
||||||
f2_local8 = {
|
f2_local8 = {
|
||||||
@ -379,8 +380,8 @@ CoD.DPadArea.UpdateActionSlots = function (f2_arg0, f2_arg1)
|
|||||||
right = 0,
|
right = 0,
|
||||||
topAnchor = false,
|
topAnchor = false,
|
||||||
bottomAnchor = false,
|
bottomAnchor = false,
|
||||||
top = -f2_local11 / 2 - f2_local4 * f2_local11,
|
top = -f2_local11 / 2 - f2_local4 * f2_local11 - f2_local10,
|
||||||
bottom = f2_local11 / 2 - f2_local4 * f2_local11,
|
bottom = f2_local11 / 2 - f2_local4 * f2_local11 - f2_local10,
|
||||||
alignment = LUI.Alignment.Right
|
alignment = LUI.Alignment.Right
|
||||||
}
|
}
|
||||||
elseif f2_local4 == 3 then
|
elseif f2_local4 == 3 then
|
||||||
@ -391,8 +392,8 @@ CoD.DPadArea.UpdateActionSlots = function (f2_arg0, f2_arg1)
|
|||||||
right = 0,
|
right = 0,
|
||||||
topAnchor = false,
|
topAnchor = false,
|
||||||
bottomAnchor = false,
|
bottomAnchor = false,
|
||||||
top = -f2_local11 / 2 - f2_local4 * f2_local11,
|
top = -f2_local11 / 2 - f2_local4 * f2_local11 - f2_local10,
|
||||||
bottom = f2_local11 / 2 - f2_local4 * f2_local11,
|
bottom = f2_local11 / 2 - f2_local4 * f2_local11 - f2_local10,
|
||||||
alignment = LUI.Alignment.Right
|
alignment = LUI.Alignment.Right
|
||||||
}
|
}
|
||||||
elseif f2_local4 == 2 then
|
elseif f2_local4 == 2 then
|
||||||
@ -403,8 +404,8 @@ CoD.DPadArea.UpdateActionSlots = function (f2_arg0, f2_arg1)
|
|||||||
right = 0,
|
right = 0,
|
||||||
topAnchor = false,
|
topAnchor = false,
|
||||||
bottomAnchor = true,
|
bottomAnchor = true,
|
||||||
top = -f2_local11 / 2 - f2_local4 * f2_local11,
|
top = -f2_local11 / 2 - f2_local4 * f2_local11 - f2_local10,
|
||||||
bottom = f2_local11 / 2 - f2_local4 * f2_local11,
|
bottom = f2_local11 / 2 - f2_local4 * f2_local11 - f2_local10,
|
||||||
alignment = LUI.Alignment.Right
|
alignment = LUI.Alignment.Right
|
||||||
}
|
}
|
||||||
elseif f2_local4 == 4 then
|
elseif f2_local4 == 4 then
|
||||||
@ -415,8 +416,8 @@ CoD.DPadArea.UpdateActionSlots = function (f2_arg0, f2_arg1)
|
|||||||
right = 0,
|
right = 0,
|
||||||
topAnchor = false,
|
topAnchor = false,
|
||||||
bottomAnchor = true,
|
bottomAnchor = true,
|
||||||
top = -f2_local11 / 2 - f2_local4 * f2_local11,
|
top = -f2_local11 / 2 - f2_local4 * f2_local11 - f2_local10,
|
||||||
bottom = f2_local11 / 2 - f2_local4 * f2_local11,
|
bottom = f2_local11 / 2 - f2_local4 * f2_local11 - f2_local10,
|
||||||
alignment = LUI.Alignment.Right
|
alignment = LUI.Alignment.Right
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
@ -431,7 +432,7 @@ CoD.DPadArea.UpdateActionSlots = function (f2_arg0, f2_arg1)
|
|||||||
Widget.keyPrompt:setAlignment(LUI.Alignment.Right)
|
Widget.keyPrompt:setAlignment(LUI.Alignment.Right)
|
||||||
Widget:registerAnimationState("KeyPrompt", f2_local8)
|
Widget:registerAnimationState("KeyPrompt", f2_local8)
|
||||||
Widget:addElement(Widget.keyPrompt)
|
Widget:addElement(Widget.keyPrompt)
|
||||||
if CoD.useController and Engine.LastInput_Gamepad() then
|
if CoD.useController and Engine.LastInput_Gamepad() or UIExpression.DvarBool(nil, "hud_dpad_controller") == 1 then
|
||||||
CoD.DPadArea.ActionSlotInputSourceChanged(Widget, {
|
CoD.DPadArea.ActionSlotInputSourceChanged(Widget, {
|
||||||
source = 0
|
source = 0
|
||||||
})
|
})
|
||||||
@ -526,7 +527,7 @@ end
|
|||||||
|
|
||||||
CoD.DPadArea.ActionSlotInputSourceChanged = function (f8_arg0, f8_arg1)
|
CoD.DPadArea.ActionSlotInputSourceChanged = function (f8_arg0, f8_arg1)
|
||||||
if CoD.isPC then
|
if CoD.isPC then
|
||||||
if CoD.useController and f8_arg1.source == 0 then
|
if CoD.useController and f8_arg1.source == 0 or UIExpression.DvarBool(nil, "hud_dpad_controller") == 1 then
|
||||||
f8_arg0:animateToState("default")
|
f8_arg0:animateToState("default")
|
||||||
if f8_arg0.keyPrompt ~= nil then
|
if f8_arg0.keyPrompt ~= nil then
|
||||||
f8_arg0.keyPrompt:setAlpha(0)
|
f8_arg0.keyPrompt:setAlpha(0)
|
||||||
@ -543,20 +544,11 @@ end
|
|||||||
|
|
||||||
CoD.DPadArea.InputSourceChanged = function (f9_arg0, f9_arg1)
|
CoD.DPadArea.InputSourceChanged = function (f9_arg0, f9_arg1)
|
||||||
if CoD.isPC then
|
if CoD.isPC then
|
||||||
if CoD.useController and f9_arg1.source == 0 then
|
if f9_arg0.carouselArrows ~= nil then
|
||||||
if f9_arg0.carouselArrows ~= nil then
|
f9_arg0.carouselArrows:setAlpha(1)
|
||||||
f9_arg0.carouselArrows:setAlpha(1)
|
end
|
||||||
end
|
if f9_arg0.circleBackground ~= nil then
|
||||||
if f9_arg0.circleBackground ~= nil then
|
f9_arg0.circleBackground:setAlpha(0)
|
||||||
f9_arg0.circleBackground:setAlpha(1)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
if f9_arg0.carouselArrows ~= nil then
|
|
||||||
f9_arg0.carouselArrows:setAlpha(0)
|
|
||||||
end
|
|
||||||
if f9_arg0.circleBackground ~= nil then
|
|
||||||
f9_arg0.circleBackground:setAlpha(0)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
if f9_arg0.actionSlots ~= nil then
|
if f9_arg0.actionSlots ~= nil then
|
||||||
for f9_local3, f9_local4 in pairs(f9_arg0.actionSlots) do
|
for f9_local3, f9_local4 in pairs(f9_arg0.actionSlots) do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user