mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 20:07:21 +01:00
FUCKING COMBO BOXES
This commit is contained in:
parent
1ef6f50246
commit
7bea2e88f1
1 changed files with 3 additions and 14 deletions
|
|
@ -559,21 +559,11 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
|
|||
|
||||
if (!_selectedComboItems.TryGetValue(comboName, out var selectedItem) && selectedItem == null)
|
||||
{
|
||||
if (!EqualityComparer<T>.Default.Equals(initialSelectedItem, default(T)))
|
||||
{
|
||||
selectedItem = initialSelectedItem;
|
||||
_selectedComboItems[comboName] = selectedItem!;
|
||||
if (!EqualityComparer<T>.Default.Equals(initialSelectedItem, default))
|
||||
onSelected?.Invoke(initialSelectedItem);
|
||||
}
|
||||
else
|
||||
{
|
||||
selectedItem = null;
|
||||
_selectedComboItems[comboName] = selectedItem;
|
||||
}
|
||||
selectedItem = initialSelectedItem;
|
||||
_selectedComboItems[comboName] = selectedItem;
|
||||
}
|
||||
|
||||
if (ImGui.BeginCombo(comboName, toName((T?)selectedItem)))
|
||||
if (ImGui.BeginCombo(comboName, selectedItem == null ? "Unset Value" : toName((T?)selectedItem)))
|
||||
{
|
||||
foreach (var item in comboItems)
|
||||
{
|
||||
|
|
@ -887,7 +877,6 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
|
|||
{
|
||||
var aliasPairs = _discordOAuthUIDs?.Result?.Select(t => new UIDAliasPair(t.Key, t.Value)).ToList() ?? [new UIDAliasPair(item.UID ?? null, null)];
|
||||
var uidComboName = "UID###" + item.CharacterName + item.WorldId + serverUri + indexOffset;
|
||||
logger?.LogInformation("Drawing Combo with name {name}", uidComboName);
|
||||
DrawCombo(uidComboName, aliasPairs,
|
||||
(v) =>
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue