Announcement

Collapse
No announcement yet.

Set up Right Click on SButton

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Set up Right Click on SButton

    Can the SButton take right click events and not just left click

    Code:
    			SNew(SButton)
    			.HAlign(HAlign_Fill)
    			.VAlign(VAlign_Fill)
    			.ButtonStyle(&InvStorage->EmptySlotButtonStyle)
    			.OnClicked(this, &SItemWidget::RightClick)
    			.ContentPadding(FMargin(0))
    This can only detect left clicks and not right clicks.

    #2
    It doesn't look like you can get it to detect right clicks, I guess you'll need to subclass SButton and override OnMouseButtonDown() and OnMouseButtonUp(). Or maybe add right click support directly to SButton and submit a pull request to Epic.
    Contact: enlight in #unrealengine IRC channel on Freenode, or @macagonator on Twitter

    Comment


      #3
      Never submitted a pull request yet but I am planning to right click support to SButton.
      Last edited by envenger; 01-11-2015, 12:57 PM.

      Comment

      Working...
      X