mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-12 18:27:24 +01:00
Make combos start from preview selection if possible.
This commit is contained in:
parent
f192c17c9b
commit
74674cfa0c
3 changed files with 2 additions and 10 deletions
|
|
@ -37,7 +37,7 @@ public partial class CustomizationDrawer
|
||||||
using var dragDropTarget = ImUtf8.DragDropTarget();
|
using var dragDropTarget = ImUtf8.DragDropTarget();
|
||||||
if (!dragDropTarget.Success || !dragDropTarget.IsDropping("##colorDragDrop"u8))
|
if (!dragDropTarget.Success || !dragDropTarget.IsDropping("##colorDragDrop"u8))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var idx = _set.DataByValue(_draggedColorType, _draggedColorValue, out var draggedData, _customize.Face);
|
var idx = _set.DataByValue(_draggedColorType, _draggedColorValue, out var draggedData, _customize.Face);
|
||||||
var bestMatch = _draggedColorValue;
|
var bestMatch = _draggedColorValue;
|
||||||
if (draggedData.HasValue)
|
if (draggedData.HasValue)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
using Glamourer.Designs;
|
using Glamourer.Designs;
|
||||||
using ImGuiNET;
|
using ImGuiNET;
|
||||||
using OtterGui;
|
using OtterGui;
|
||||||
using OtterGui.Extensions;
|
|
||||||
using OtterGui.Raii;
|
using OtterGui.Raii;
|
||||||
using OtterGui.Widgets;
|
using OtterGui.Widgets;
|
||||||
|
|
||||||
|
|
@ -13,13 +12,6 @@ public sealed class DesignColorCombo(DesignColors _designColors, bool _skipAutom
|
||||||
: _designColors.Keys.OrderBy(k => k).Prepend(DesignColors.AutomaticName),
|
: _designColors.Keys.OrderBy(k => k).Prepend(DesignColors.AutomaticName),
|
||||||
MouseWheelType.Control, Glamourer.Log)
|
MouseWheelType.Control, Glamourer.Log)
|
||||||
{
|
{
|
||||||
protected override void OnMouseWheel(string preview, ref int current, int steps)
|
|
||||||
{
|
|
||||||
if (CurrentSelectionIdx < 0)
|
|
||||||
CurrentSelectionIdx = Items.IndexOf(preview);
|
|
||||||
base.OnMouseWheel(preview, ref current, steps);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override bool DrawSelectable(int globalIdx, bool selected)
|
protected override bool DrawSelectable(int globalIdx, bool selected)
|
||||||
{
|
{
|
||||||
var isAutomatic = !_skipAutomatic && globalIdx == 0;
|
var isAutomatic = !_skipAutomatic && globalIdx == 0;
|
||||||
|
|
|
||||||
2
OtterGui
2
OtterGui
|
|
@ -1 +1 @@
|
||||||
Subproject commit 9aeda9a892d9b971e32b10db21a8daf9c0b9ee53
|
Subproject commit 421874a12540b7f8c1279dcc6a92e895a94d2fbc
|
||||||
Loading…
Add table
Add a link
Reference in a new issue