public static cave.ui.ImageButtonWidget forImageResource(cave.GuiApplicationContext context, string resName, System.Action handler) { var v = new cave.ui.ImageButtonWidget(context); v.setWidgetImageResource(resName); v.setWidgetClickHandler(handler); return(v); }
private void updateRightButton() { if (rightButton == null) { return; } if (cape.String.isEmpty(widgetRightIconResource) == false) { rightButton.setWidgetImageResource(widgetRightIconResource); rightButton.setWidgetClickHandler(widgetRightAction); } else { rightButton.setWidgetImageResource(null); rightButton.setWidgetClickHandler(null); } }
public static cave.ui.ImageButtonWidget forImage(cave.GuiApplicationContext context, cave.Image image, System.Action handler) { var v = new cave.ui.ImageButtonWidget(context); v.setWidgetImage(image); v.setWidgetClickHandler(handler); return(v); }