Modding Help Custom interface (scroller)

Discussion in 'Starbound Modding' started by Ultimate sandvich, Dec 8, 2016.

  1. Ultimate sandvich

    Ultimate sandvich Scruffy Nerf-Herder

    So I'm trying to make my own interface and I can't seem to find how to move the scroller. I've been digging around in the merchant.config file but I can't really find anything.

    Code:
    {
      "sellContainerSize" : 56, // needs to match the size of the itemgrid defined in this window
      "buyBody" : "/interface/merchant/buybody.png",
      "sellBody" : "/interface/merchant/sellbody.png",
      "paneLayout" : {
        "background" : {
          "type" : "background",
          "fileHeader" : "/interface/merchant/merchantheader.png",
          "fileBody" : "/interface/merchant/buybody.png",
          "fileFooter" : "/interface/merchant/merchantfooter.png"
        },
        "close" : {
          "type" : "button",
          "base" : "/interface/inventory/x.png",
          "hover" : "/interface/inventory/xhover.png",
          "press" : "/interface/inventory/xpress.png",
          "position" : [161, 242]
        },
        "windowtitle" : {
          "type" : "title",
          "title" : "  Merchant",
          "subtitle" : "  ^#b9b5b2;Buy and sell your goods here!",
          "position" : [-5, 252],
          "icon" : {
            "type" : "image",
            "file" : "/interface/merchant/merchanticon.png",
            "position" : [0, -20],
            "zlevel" : -1
          }
        },
        "bgShine" : {
          "type" : "image",
          "file" : "/interface/merchant/shine.png",
          "position" : [0, -12],
          "zlevel" : 1,
          "mouseTransparent" : true
        },
    
        "buySellTabs" : {
          "type" : "tabSet",
          "tabButtonBaseImage" : "/interface/tabs/tabbase.png",
          "tabButtonHoverImage" : "/interface/tabs/tabover.png",
          "tabButtonBaseImageSelected" : "/interface/tabs/tabselected.png",
          "tabButtonHoverImageSelected" : "/interface/tabs/tabselectedover.png",
          "tabButtonPressedOffset" : [0, 0],
          "tabButtonTextOffset" : [0, -1],
          "tabButtonSpacing" : [-1, 0],
          "rect" : [3, 0, 173, 234],
          "tabs" : [
            {
              "tabName" : "buy",
              "tabTitle" : "Buy",
              "children" : {
                "spinCount" : {
                  "type" : "spinner",
                  "position" : [7, 51],
                  "upOffset" : 44
                },
                "tbCount" : {
                  "callback" : "parseCountText",
                  "blur" : "countChanged",
                  "type" : "textbox",
                  "position" : [22, 51],
                  "textAlign" : "center",
                  "maxWidth" : 18,
                  "regex" : "x?\\d{0,4}"
                },
                "imgCountBg" : {
                  "type" : "image",
                  "file" : "/interface/merchant/amount.png",
                  "position" : [17, 50],
                  "zlevel" : -3
                },
                "lblBuyTotalCaption" : {
                  "type" : "label",
                  "fontSize" : 8,
                  "position" : [110, 51],
                  "value" : "TOTAL COST",
                  "hAnchor" : "right"
                },
                "imgBuyMoneyIcon" : {
                  "type" : "image",
                  "file" : "/interface/merchant/pixels.png",
                  "position" : [112, 53],
                  "zlevel" : -3
                },
                "lblBuyTotal" : {
                  "type" : "label",
                  "fontSize" : 8,
                  "position" : [124, 51],
                  "value" : "999999"
                },
                "btnBuy" : {
                  "callback" : "buy",
                  "type" : "button",
                  "base" : "/interface/merchant/button.png",
                  "hover" : "/interface/merchant/buttonhover.png",
                  "position" : [60, 30],
                  "caption" : "Buy"
                },
                "scrollArea" : {
                  "type" : "scrollArea",
                  "rect" : [5, 62, 171, 216],
                  "children" : {
                    "itemList" : {
                      "type" : "list",
                      "schema" : {
                        "selectedBG" : "/interface/merchant/itemselected.png",
                        "unselectedBG" : "/interface/merchant/itembackground.png",
                        "spacing" : [0, 1],
                        "memberSize" : [156, 20],
                        "listTemplate" : {
                          "background" : {
                            "type" : "image",
                            "file" : "/interface/merchant/itembackground.png",
                            "position" : [0, 0],
                            "zlevel" : -1
                          },
                          "itemName" : {
                            "type" : "label",
                            "position" : [22, 18],
                            "hAnchor" : "left",
                            "vAnchor" : "top",
                            "wrapWidth" : 116,
                            "lineSpacing" : 1.05,
                            "value" : "Replace Me"
                          },
                          "itemIcon" : {
                            "type" : "itemslot",
                            "position" : [1, 1],
                            "callback" : "null"
                          },
                          "moneyIcon" : {
                            "type" : "image",
                            "position" : [108, 1],
                            "file" : "/interface/money.png"
                          },
                          "priceLabel" : {
                            "type" : "label",
                            "position" : [153, 0],
                            "hAnchor" : "right",
                            "value" : "0"
                          },
                          "unavailableoverlay" : {
                            "type" : "image",
                            "file" : "/interface/merchant/unavailableoverlay.png",
                            "position" : [0, 0],
                            "zlevel" : 1
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            {
              "tabName" : "sell",
              "tabTitle" : "Sell",
              "children" : {
                "itemGrid" : {
                  "rightClickCallback" : "null",
                  "type" : "itemgrid",
                  "position" : [10, 73],
                  "dimensions" : [8, 7],
                  "spacing" : [19, 19],
                  "backingImage" : "/interface/inventory/empty.png",
                  "zlevel" : 2
                },
                "lblSellTotalCaption" : {
                  "type" : "label",
                  "fontSize" : 8,
                  "position" : [94, 51],
                  "value" : "SELL VALUE",
                  "hAnchor" : "right"
                },
                "imgSellMoneyIcon" : {
                  "type" : "image",
                  "file" : "/interface/merchant/pixels.png",
                  "position" : [98, 53],
                  "zlevel" : -3
                },
                "lblSellTotal" : {
                  "type" : "label",
                  "fontSize" : 8,
                  "position" : [112, 51],
                  "value" : "0"
                },
                "btnSell" : {
                  "callback" : "sell",
                  "type" : "button",
                  "base" : "/interface/merchant/button.png",
                  "hover" : "/interface/merchant/buttonhover.png",
                  "position" : [60, 30],
                  "caption" : "Sell"
                }
              }
            }
          ]
        }
      }
    }


    I'm trying to move it from here (the normal place)
    egmbuybody.png

    to more to the right. (unfinished texture)
    egmbodytest.png

    Does anybody have a suggestion?
     

Share This Page