package com.lucasdnd.ags.gameplay; import org.newdawn.slick.GameContainer; import org.newdawn.slick.Input; import org.newdawn.slick.SlickException; import org.newdawn.slick.state.StateBasedGame; import com.lucasdnd.ags.gameplay.market.MarketTv; import com.lucasdnd.ags.system.MainState; import com.lucasdnd.ags.ui.MiniPanel; import com.lucasdnd.ags.ui.TvMiniPanel; public class Tv extends Asset { public Tv(int id, MarketTv placingMarketAsset) throws SlickException { // Basic Attributes super(id, placingMarketAsset); // Create the MiniPanel with basic info float miniPanelHeight = MiniPanel.topBodyMargin + MiniPanel.lineSize*2; miniPanel = new TvMiniPanel(0f, 0f, 280f, miniPanelHeight, this); } /** * Update */ @Override public void update(GameContainer container, StateBasedGame game, int delta, Input input, boolean leftMouseClicked, boolean leftMouseDown, int mouseX, int mouseY, Business business, MainState mainState) throws SlickException { // Update the Mini Panel ((TvMiniPanel)miniPanel).update(container, game, delta, mainState, business, leftMouseClicked, leftMouseDown, mouseX, mouseY); } /** * TVs are not physically represented (they're attached to Tables). So their Click methods * do nothing. */ @Override public boolean gotLeftClicked(boolean leftMouseClicked, int mouseX, int mouseY) { return false; } /** * TVs are not physically represented (they're attached to Tables). So their Click methods * do nothing. */ @Override public boolean gotRightClicked(boolean rightMouseClicked, int mouseX, int mouseY) { return false; } public MarketTv getReferringMarketTv() { return (MarketTv)super.getReferringMarketAsset(); } }