MV How to set the y pos of a variable?

Not sure if I worded that right, but I'm finessing the look of the item use/discard window of YEP_ItemCore/YEP_X_ItemDiscard. I'm needing to adjust the y position of the icon in the 'use' command line. I've been able to split up command into variables and then add them together, but that's about it! I've tried defining y as I've seen in other code bits, such as y = this.lineHeight(); and then write icon.y = y - 2; but that's not functioning since I'm likely missing logic/for real don't know how, haha.

Code:
Window_ItemActionCommand.prototype.addUseCommand = function() {
    var enabled = this.isEnabled(this._item);
    //var fmt = Yanfly.Param.ItemUseCmd;
    var use = 'Use' + '';
    var icon = '\\i['+ this._item.iconIndex + ']';
    var name = this._item.name;
    var text = use + icon + name;
    if (this._item.textColor !== undefined) {
      text += '\\c['+ this._item.textColor + ']';
    }
    //text = fmt.format(text);
    this.addCommand(text, 'use', enabled);
};

Help is appreciated! Thanks!
Not sure if I worded that right
You didn't 🤣

The question has nothing to do with a position of a variable (which doesn't really mean anything), but with the position of the icon being drawn.

Anyway, none of the code you show (and I don't really get why you commented stuff out) has to do with what you're asking. There isn't anything in that code that actually draws information to the screen.

You'd have to modify it in drawTextEx() processing the escape codes, which filters down to processDrawIcon().

Code:
Window_Base.prototype.processDrawIcon = function(iconIndex, textState) {
    this.drawIcon(iconIndex, textState.x + 2, textState.y + 2);
    textState.x += Window_Base._iconWidth + 4;
};

You can change the textState.y + 2 to adjust the positioning.
Haha ok great, thanks. I wasn't sure if it could be done outside drawTextEx. I commented the other things out because they're unnecessary since I've changed how the info is gathered together but I didn't want to delete them just in case I go back to the original set up.

Since this was a different kind of answer to what I was expecting and I can't apply it directly, from what I can tell, to another part that I'm working on, is there a way for me to adjust the y (or lineHeight, or whatever it would be in this case) of the values added together in quantStock seen in createDiscardCommandName? It's a different font and sits lower on the line. Don't mind the mess lol. I found that if I use drawText/drawTextEx, it causes display issues when the command is written into the window.

Code:
Window_ItemActionCommand.prototype.addDiscardCommand = function() {
  if (!this._item) {
    return false;
  }
  var enabled = this._item.canDiscard;
  var text = this.createDiscardCommandName();
  this.addCommand(text, 'discard', enabled);
};

Window_ItemActionCommand.prototype.createDiscardCommandName = function() {
  var fmt = Yanfly.Param.ItemDiscardCmdFmt;
  var discard = 'Discard';
  var name = this._item.name + '\\c[0]';
  var icon = '\\i[' + this._item.iconIndex + ']';
  //if (this._item.textColor !== undefined) {
  //  name += '\\c[' + this._item.textColor + ']';
  //}
  //name += this._item.name + '\\c[0]';
  if ($gameParty.maxItems(this._item) > 1) {
    var quantity = '\\c[3]' + 'x' + Yanfly.Util.toGroup(this._discardAmount);
    var stock = $gameParty.numItems(this._item);
  } else {
    var quantity = '';
    var stock = '';
  }
  var itemName = discard + ' ' + icon + name;
  var quantStock = quantity + '/' + stock
  return itemName + ' ' + quantStock;
};

Original thread: https://forums.rpgmakerweb.com/threads/how-to-set-the-y-pos-of-a-variable.170417/