Player stuck after closing the shop (ESC to unstuck)Not An Issue

Hello,
Thank you for the plugin.

I noticed when I close the shop interface (invoked from the command or NPC), my keyboard inputs are ignored, with the exception of "ESC". I can howover move the camera freely. To regain the full control, I must press ESC to display the in-game menu and close it to fix the issue.

I don't know if I am alone with this bug (probably...).

Perms: admin group guishop.use 
Player level account tested from: auth2

GUIShop config:

{
  "Carefully Edit This": {
    "WipeTime": "2022-01-04 20:20:36Z",
    "LastWipe": "2022-01-04 20:20:36Z",
    "Sets time before shops can be used after the server wipes": 300.0
  },
  "Sets the ImageLibrary Counter Check ( Set higher if needed for server restarts )": 15,
  "Enable Discord Buy Transaction Logging": true,
  "Enable Discord Sell Transaction Logging": true,
  "Discord Webhook URL": "https://discord.com/api/webhooks/***********",
  "Discord Embed Color": "#483D8B",
  "Discord Author Image": "https://assets.umod.org/images/icons/plugin/5f80fe12851f5.png",
  "Discord Embed Icon": "GUIShop",
  "Set Default Global Shop to open": "Construction",
  "Sets shop command": "shop",
  "Sets Vehicle Spawn Distance": 15.0,
  "Switches to Economics as default curency": true,
  "Switches to ServerRewards as default curency": false,
  "Switches to Custom as default curency": false,
  "Allow Custom Currency Sell Of Used Items": true,
  "Custom Currency Item ID": -932201673,
  "Custom Currency Skin ID": 0,
  "Custom Currency Name": "",
  "Allows you to specify which containers you can sell items from": 3,
  "Enable Shop Buy All Button": false,
  "Enable Shop Sell All Button": false,
  "Sets the buy/Sell button amounts + how many buttons": [
    1,
    10,
    50,
    100
  ],
  "Player UI display": false,
  "Block Monuments": false,
  "If true = Images, If False = Text Labels": false,
  "NPC Distance Check": 2.5,
  "Enable NPC Auto Open": false,
  "Enable GUIShop NPC Msg's": false,
  "GUI Shop - Welcome MSG": "Trading Interface",
  "Shop - Buy Price Label": "Buy for",
  "Shop - Amount1 Label1": "Amount",
  "Shop - Sell $ Label": "Sell for",
  "Shop - Amount2 Label2": "Amount",
  "Shop - Back Button Text": "←",
  "Shop - Forward Button Text": "→",
  "Shop - Close Label": "CLOSE",
  "Shop - GUIShop Welcome Url": "https://i.imgur.com/RcLdEly.png",
  "Shop - GUIShop Background Image Url": "https://i.imgur.com/Jej3cwR.png",
  "Shop - Sets any shop items to this image if image link does not exist.": "https://imgur.com/BPM9UR4.png",
  "Shop - Shop Buy Icon Url": "https://imgur.com/oeVUwCy.png",
  "Shop - Shop Amount Left Url": "https://imgur.com/EKtvylU.png",
  "Shop - Shop Amount Right Url": "https://imgur.com/EKtvylU.png",
  "Shop - Shop Sell Icon Url": "https://imgur.com/jV3hEHy.png",
  "Shop - Shop Back Arrow Url": "https://imgur.com/zNKprM1.png",
  "Shop - Shop Forward Arrow Url": "https://imgur.com/qx9syT5.png",
  "Shop - Close Image Url": "https://imgur.com/IK5yVrW.png",
  "Shop GUI Button": {
    "Image": "https://img.icons8.com/fluency-systems-regular/42/e5dada/buy--v1.png",
    "Background color (RGBA format)": "1.00 0.95 0.90 0.03",
    "GUI Button Position": {
      "Anchors Min": "0.2705 0.025",
      "Anchors Max": "0.2915 0.063",
      "Offsets Min": "0.0 0.0",
      "Offsets Max": "0.0 0.0"
    }
  },
  "GUIShop Configurable UI colors (First 8 Colors!)": [
    "#A569BD",
    "#2ECC71",
    "#E67E22",
    "#3498DB",
    "#E74C3C",
    "#F1C40F",
    "#F4F6F7",
    "#00FFFF"
  ],
  "Set Default Shop Buy Color": "#FAC85A",
  "Set Default Shop Sell Color": "#8CC8F0",
  "Set Default Shop Text Color": "#D2C8BE",
  "Was Saved Don't Touch!": true,
  "Shop - Shop Categories": {
    "Attire": {
      "DisplayName": "Attire",
      "DisplayNameColor": null,
      "Description": "Your balance is: {0} ¤",
      "DescriptionColor": null,
      "Permission": "",
      "Currency": "",
      "CustomCurrencyAllowSellOfUsedItems": false,
      "CustomCurrencyNames": "",
      "CustomCurrencyIDs": 0,
      "CustomCurrencySkinIDs": 0,
      "EnabledCategory": false,
      "EnableNPC": false,
      "NPCId": "",
      "NpcIds": [],
      "Items": [


after that, few shops configured the same way at the exception of one named "Construction", with "EnabledCategory": true,
Also another shop I used with a NPC. (shops are work in progress :) )​

Any idea from where it could come from ? Is there test I could do to help to debug this?
Thank you.

I tested with the default config of the shop, the problem remaine.
May be a problem with another mod? It is strange because I can move my character while the shop is open (keyboard input ok) but when I close it is happening. 🤔

Merged post

The problem seems to be linked with the close method used in cuibutton class.
I made a small change in the source code to figure out.
I created a method to close the interface with a command

        [ConsoleCommand("guishop.close")]
        private void CloseAllUi(ConsoleSystem.Arg arg)
        {
            var player = arg.Player();
            if (player == null) return;
            CuiHelper.DestroyUi(player, GUIShopContentName);
            CuiHelper.DestroyUi(player, "ButtonForward");
            CuiHelper.DestroyUi(player, "ButtonBack");
            CuiHelper.DestroyUi(player, GUIShopDescOverlay);
            CuiHelper.DestroyUi(player, GUIShopOverlayName);
        }​

and updated guishop close button accordingly:
            container.Add(new CuiButton //close button Label
                {
                    Button =
                    {
                        Command = $"guishop.close",//Hiro
                        //Close = GUIShopOverlayName,//Hiro
                        Color = "0.82 0.78 0.74 0.50" //Hiro
                    },
                    RectTransform =
                    {
                        AnchorMin = "0.45 0.14", 
                        AnchorMax = "0.55 0.19"
                    },
                    Text =
                    {
                        Text = GetText(_config.CloseButtonlabel, "label", player),
                        FontSize = 20,
                        Color = GetUITextColor(player, _config.TextColor),
                        Align = TextAnchor.MiddleCenter
                    }
                },
                GUIShopOverlayName);
​

With this modification, it close the interface and my keyboard input work properly.

My question is, was I alone with this bug ?

I've never had an issue closing the shop.

I am unable to reproduce your issue.

Had the bug happening again few hours later... so my solution wasn't one.
Maybe a client side issue then. this doesn't make sense otherwise. I will do test with other players.

Anyway, I believe this is not related to the plugin itself so you can set as not an issue.
Sorry for the waste of time. :')

Locked automatically