don't clear vbox selected on inventory click
This commit is contained in:
parent
55f0ceeeec
commit
52d9367e3c
@ -283,7 +283,11 @@ class Vbox extends preact.Component {
|
|||||||
const inventoryHighlight = vboxSelecting || itemUnequip.length;
|
const inventoryHighlight = vboxSelecting || itemUnequip.length;
|
||||||
|
|
||||||
if (!v && v !== 0) {
|
if (!v && v !== 0) {
|
||||||
return <button key={i} disabled={!inventoryHighlight} class={inventoryHighlight ? 'receiving' : 'empty'} > </button>;
|
const emptyInvClick = () => {
|
||||||
|
if (vboxSelecting) return vboxBuySelected();
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
return <button key={i} onClick={emptyInvClick} disabled={!inventoryHighlight} class={inventoryHighlight ? 'receiving' : 'empty'} > </button>;
|
||||||
}
|
}
|
||||||
|
|
||||||
const combinerItems = combiner.map(j => vbox.bound[j]);
|
const combinerItems = combiner.map(j => vbox.bound[j]);
|
||||||
@ -303,7 +307,6 @@ class Vbox extends preact.Component {
|
|||||||
const comboHighlight = combinerItems.length > 0 && comboItem ? 'combo-border' : '';
|
const comboHighlight = combinerItems.length > 0 && comboItem ? 'combo-border' : '';
|
||||||
|
|
||||||
function onClick(type) {
|
function onClick(type) {
|
||||||
if (vboxSelecting) clearVboxSelected();
|
|
||||||
if (reclaiming) return sendVboxReclaim(i);
|
if (reclaiming) return sendVboxReclaim(i);
|
||||||
|
|
||||||
const combinerContainsIndex = combiner.indexOf(i) > -1;
|
const combinerContainsIndex = combiner.indexOf(i) > -1;
|
||||||
@ -395,7 +398,6 @@ class Vbox extends preact.Component {
|
|||||||
function inventoryElement() {
|
function inventoryElement() {
|
||||||
function inventoryClick(e) {
|
function inventoryClick(e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
if (vboxSelecting) return vboxBuySelected();
|
|
||||||
if (itemUnequip.length) return sendItemUnequip(itemUnequip);
|
if (itemUnequip.length) return sendItemUnequip(itemUnequip);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user