Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions addons/finger/UI/layouts/Map/ACE_Finger_MapPointer.layout
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FrameWidgetClass : "{DD15734EB89D74E2}UI/layouts/Map/MapMarkerBase.layout" {
components {
SCR_MapMarkerWidgetComponent "{5D5280F6FAEE865B}" {
Enabled 0
}
ACE_Finger_MapPointerWidgetComponent "{69C808C9C9B8EB66}" {
}
}
}
17 changes: 17 additions & 0 deletions addons/finger/UI/layouts/Map/ACE_Finger_MapPointer.layout.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
MetaFileClass {
Name "{F031C659D2F1C14B}UI/layouts/Map/ACE_Finger_MapPointer.layout"
Configurations {
LayoutResourceClass PC {
}
LayoutResourceClass XBOX_ONE : PC {
}
LayoutResourceClass XBOX_SERIES : PC {
}
LayoutResourceClass PS4 : PC {
}
LayoutResourceClass PS5 : PC {
}
LayoutResourceClass HEADLESS : PC {
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ modded class SCR_EditorPingInfoDisplay : SCR_InfoDisplay
super.OnStartDraw(owner);

m_pACE_Finger_EditorComponent = ACE_Finger_EditorComponent.Cast(ACE_Finger_EditorComponent.GetInstance(ACE_Finger_EditorComponent, true));
if (!m_pACE_Finger_EditorComponent) return;
if (!m_pACE_Finger_EditorComponent)
return;

m_pACE_Finger_EditorComponent.GetOnPingEntityRegister().Insert(OnPingEntityRegister);
m_pACE_Finger_EditorComponent.GetOnPingEntityUnregister().Insert(OnPingEntityUnregister);
Expand All @@ -62,7 +63,8 @@ modded class SCR_EditorPingInfoDisplay : SCR_InfoDisplay
{
super.OnStopDraw(owner);

if (!m_pACE_Finger_EditorComponent) return;
if (!m_pACE_Finger_EditorComponent)
return;

m_pACE_Finger_EditorComponent.GetOnPingEntityRegister().Remove(OnPingEntityRegister);
m_pACE_Finger_EditorComponent.GetOnPingEntityUnregister().Remove(OnPingEntityUnregister);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ modded class SCR_BaseGameMode : BaseGameMode
{
super.OnPlayerRegistered(playerId);

if (!Replication.IsServer())
return;

SCR_PlayerController playerController = SCR_PlayerController.Cast(GetGame().GetPlayerManager().GetPlayerController(playerId));
if (!playerController)
return;
Expand Down Expand Up @@ -37,6 +40,9 @@ modded class SCR_BaseGameMode : BaseGameMode
{
super.OnPlayerDisconnected(playerId, cause, timeout);

if (!Replication.IsServer())
return;

ACE_Finger_MapPointer ptr;
if (m_aACE_Finger_Pointers.Take(playerId, ptr))
SCR_EntityHelper.DeleteEntityAndChildren(ptr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class ACE_Finger_MapUIPointerContainer : SCR_MapUIBaseComponent
protected string m_sIconsContainer;
protected Widget m_wIconsContainer;

[Attribute("{DD15734EB89D74E2}UI/layouts/Map/MapMarkerBase.layout", params: "layout")]
[Attribute("{F031C659D2F1C14B}UI/layouts/Map/ACE_Finger_MapPointer.layout", params: "layout")]
protected ResourceName m_sPointerElementName;

protected ref array<ACE_Finger_MapPointer> m_aPointers = {};
Expand Down Expand Up @@ -150,12 +150,12 @@ class ACE_Finger_MapUIPointerContainer : SCR_MapUIBaseComponent
FrameSlot.SetAlignment(w, 0.5, 0.2);
UpdatePointerMarker(w, ptr);

SCR_MapMarkerWidgetComponent handler = SCR_MapMarkerWidgetComponent.Cast(w.FindHandler(SCR_MapMarkerWidgetComponent));
ACE_Finger_MapPointerWidgetComponent handler = ACE_Finger_MapPointerWidgetComponent.Cast(w.FindHandler(ACE_Finger_MapPointerWidgetComponent));
if (!handler)
return;

handler.SetImage("{4020BDDA0BA7D5CF}UI/Textures/Icons/icons_gamepad/icons_gamepad.imageset", "stick_hold");
handler.ACE_ResizeImage(0.6, 0.6);
handler.ResizeImage(0.6, 0.6);
handler.SetColor(Color.Orange);
handler.SetAuthor(GetGame().GetPlayerManager().GetPlayerName(ptr.GetOwnerPlayerID()));
handler.SetAuthorVisible(true);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//------------------------------------------------------------------------------------------------
//! Map marker layout component
//! Attached to root of marker base layout
class ACE_Finger_MapPointerWidgetComponent : SCR_MapMarkerWidgetComponent
{
//------------------------------------------------------------------------------------------------
void ResizeImage(float w, float h)
{
vector size = m_wMarkerIcon.GetSize();
m_wMarkerIcon.SetSize(size[0] * w, size[1] * h);
}

//------------------------------------------------------------------------------------------------
//! Vanilla only shows author while mouse is hovering over the marker, but we want it to be permanently
//! shown when m_bShowAuthor is enabled
override protected void ShowAuthor(bool state)
{
super.ShowAuthor(m_bShowAuthor);
}
}

This file was deleted.