示例#1
0
 protected static UIButton ConfigureActionButton(UIComponent parent, CommonsSpriteNames spriteName)
 {
     KlyteMonoUtils.CreateUIElement(out UIButton actionButton, parent.transform, "Btn");
     KlyteMonoUtils.InitButton(actionButton, false, "ButtonMenu");
     actionButton.focusedBgSprite      = "";
     actionButton.autoSize             = false;
     actionButton.width                = 20;
     actionButton.height               = 20;
     actionButton.foregroundSpriteMode = UIForegroundSpriteMode.Scale;
     actionButton.normalFgSprite       = KlyteResourceLoader.GetDefaultSpriteNameFor(spriteName);
     return(actionButton);
 }
示例#2
0
 public static UIButton ConfigureActionButton(UIComponent parent, CommonsSpriteNames sprite, MouseEventHandler onClicked, string tooltipLocale, float size = 40)
 {
     KlyteMonoUtils.InitCircledButton(parent, out UIButton actionButton, sprite, onClicked, tooltipLocale, size);
     return(actionButton);
 }
示例#3
0
 public static void InitCircledButton(UIComponent parent, out UIButton button, CommonsSpriteNames sprite, MouseEventHandler onClicked, string tooltipLocale, float size = 40) => InitCircledButton(parent, out button, KlyteResourceLoader.GetDefaultSpriteNameFor(sprite), onClicked, tooltipLocale == null ? null : Locale.Get(tooltipLocale), size);