001package com.fs.starfarer.api.ui; 002 003public interface ButtonAPI extends UIComponentAPI { 004 005 public static enum UICheckboxSize { 006 TINY, 007 SMALL, 008 LARGE, 009 } 010 011 void setShortcut(int key, boolean putLast); 012 void setEnabled(boolean enabled); 013 boolean isEnabled(); 014 void setButtonPressedSound(String buttonPressedSound); 015 void setMouseOverSound(String mouseOverSound); 016 void setButtonDisabledPressedSound(String buttonDisabledPressedSound); 017 boolean isChecked(); 018 void setChecked(boolean checked); 019 void highlight(); 020 void unhighlight(); 021 boolean isHighlighted(); 022 void setHighlightBrightness(float highlightBrightness); 023 float getHighlightBrightness(); 024 void setQuickMode(boolean quickMode); 025 void setClickable(boolean clickable); 026 float getGlowBrightness(); 027 void setGlowBrightness(float glowBrightness); 028 029 /** 030 * Only works for certain types of basic buttons. 031 * @param text 032 */ 033 void setText(String text); 034 /** 035 * Only works for certain types of basic buttons. 036 */ 037 String getText(); 038 039 040 void setSkipPlayingPressedSoundOnce(boolean skipPlayingPressedSoundOnce); 041 void setHighlightBounceDown(boolean b); 042 void setShowTooltipWhileInactive(boolean showTooltipWhileInactive); 043 void setRightClicksOkWhenDisabled(boolean rightClicksOkWhenDisabled); 044 void setFlashBrightness(float flashBrightness); 045 void flash(boolean withSound, float in, float out); 046 void flash(boolean withSound); 047 void flash(); 048 void setPerformActionWhenDisabled(boolean performActionWhenDisabled); 049 boolean isPerformActionWhenDisabled(); 050 boolean isSkipPlayingPressedSoundOnce(); 051 Object getCustomData(); 052 void setCustomData(Object customData); 053}