1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

[solved] Callback not working

Discussion in 'Civ5 - Creation & Customization' started by Infixo, Jan 13, 2018.

  1. Infixo

    Infixo Warlord

    Joined:
    Jan 9, 2016
    Messages:
    2,207
    Gender:
    Male
    Location:
    Warsaw
    What would be a possible reason for a very simple callback not working? The callback function simply is not called.
    I have a GridButton ID="BuyButton" as part of an instance. It works as intended - shows, hides, displays text, etc. It even displays a specific ToolTip meaning that the game properly recognizes situation when mouse is over that specific button.
    Then I have a function:
    Code:
    local function PurchaseQueueItem( orderID, itemID )
       print("PurchaseQueueItem",orderID,itemID);
       return SelectionPurchase( orderID, itemID );
    end
    
    I create an instance (working as expected - see above) and then:
    Code:
    instance.BuyButton:RegisterCallback( Mouse.eLClick, PurchaseQueueItem )
    
    The PurchaseQueueItem is never called when I click the button. What would be a possible reason?
     
  2. Infixo

    Infixo Warlord

    Joined:
    Jan 9, 2016
    Messages:
    2,207
    Gender:
    Male
    Location:
    Warsaw

Share This Page