forked from Shardstone/trail-into-darkness
some cosmetic changes
This commit is contained in:
@@ -62,10 +62,13 @@ namespace Nox.Game.UI {
|
||||
: 0;
|
||||
|
||||
// Activate slots for current members, deactivate the rest
|
||||
for(int i = 0; i < PoolSize; i++) {
|
||||
for(var i = 0; i < PoolSize; i++) {
|
||||
var slot = slotPool[i];
|
||||
if(i < memberCount) {
|
||||
if(i < memberCount && trackedParty?.members != null) {
|
||||
var member = trackedParty.members[i];
|
||||
if(member == null) {
|
||||
continue;
|
||||
}
|
||||
slot.gameObject.SetActive(true);
|
||||
|
||||
// Portrait
|
||||
@@ -84,20 +87,18 @@ namespace Nox.Game.UI {
|
||||
activeCount = memberCount;
|
||||
|
||||
// Initialize popup triggers
|
||||
if(popupSystem != null) {
|
||||
popupSystem.InitializeTriggersInChildren(portraitsContainer, (trigger, view) => {
|
||||
var slot = trigger.GetComponentInParent<PartyMemberSlot>();
|
||||
if(slot == null) {
|
||||
return;
|
||||
}
|
||||
var slotIndex = System.Array.IndexOf(slotPool, slot);
|
||||
if(slotIndex < 0 || slotIndex >= activeCount) {
|
||||
return;
|
||||
}
|
||||
var member = trackedParty.members[slotIndex];
|
||||
view.SetContent(builder => BuildCharacterPopup(builder, member));
|
||||
});
|
||||
}
|
||||
popupSystem?.InitializeTriggersInChildren(portraitsContainer, (trigger, view) => {
|
||||
var slot = trigger.GetComponentInParent<PartyMemberSlot>();
|
||||
if(!slot) {
|
||||
return;
|
||||
}
|
||||
var slotIndex = System.Array.IndexOf(slotPool, slot);
|
||||
if(slotIndex < 0 || slotIndex >= activeCount) {
|
||||
return;
|
||||
}
|
||||
var member = trackedParty.members[slotIndex];
|
||||
view.SetContent(builder => BuildCharacterPopup(builder, member));
|
||||
});
|
||||
}
|
||||
|
||||
private void BuildCharacterPopup(PopupContentBuilder builder, CharacterDefinition member) {
|
||||
|
||||
@@ -12,9 +12,9 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: e38e313f3665d464b82b22699b2a4634, type: 3}
|
||||
m_Name: PopupSettings
|
||||
m_EditorClassIdentifier: Jovian.PopupSystem::Jovian.PopupSystem.PopupSettings
|
||||
popupDelay: 0.4
|
||||
popupDelay: 0.2
|
||||
fadeDuration: 0.2
|
||||
defaultAnchorSide: 3
|
||||
defaultAnchorSide: 2
|
||||
screenEdgePadding: 10
|
||||
maxPopupWidth: 400
|
||||
sortingOrder: 100
|
||||
|
||||
Reference in New Issue
Block a user