001package com.fs.starfarer.api.campaign; 002 003import java.util.List; 004 005import com.fs.starfarer.api.input.InputEventAPI; 006import com.fs.starfarer.api.ui.PositionAPI; 007 008public interface CustomUIPanelPlugin { 009 010 /** 011 * Called whenever the location or size of this UI panel changes. 012 * @param position 013 */ 014 void positionChanged(PositionAPI position); 015 016 /** 017 * Below any UI elements in the panel. 018 * @param alphaMult 019 */ 020 void renderBelow(float alphaMult); 021 /** 022 * alphaMult is the transparency the panel should be rendered at. 023 * @param alphaMult 024 */ 025 void render(float alphaMult); 026 027 /** 028 * @param amount in seconds. 029 */ 030 void advance(float amount); 031 032 /** 033 * List of input events that occurred this frame. (Almost) always includes one mouse move event. 034 * 035 * Events should be consume()d if they are acted on. 036 * Mouse-move events should generally not be consumed. 037 * The loop processing events should check to see if an event has already been consumed, and if so, skip it. 038 * Accessing the data of a consumed event will throw an exception. 039 * 040 * @param events 041 */ 042 void processInput(List<InputEventAPI> events); 043 044 void buttonPressed(Object buttonId); 045}