mirror of
https://github.com/Relintai/mtg-forge-ios.git
synced 2025-02-09 18:10:04 +01:00
Fixed the BitmapFont import errors, but I'm not comitting 2 of the files for now.
This commit is contained in:
parent
cf014c9b04
commit
8dfa917ed1
@ -124,6 +124,7 @@ project(":forge-gui-mobile-desktop") {
|
||||
compile project(":forge-ai")
|
||||
compile project(":forge-gui")
|
||||
compile project(":forge-gui-mobile")
|
||||
compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
|
||||
compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
|
||||
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
|
||||
compile "com.miglayout:miglayout:3.5.5"
|
||||
|
@ -4,8 +4,7 @@ import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import com.badlogic.gdx.graphics.GL20;
|
||||
import com.badlogic.gdx.graphics.Texture;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.TextBounds;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
|
||||
|
@ -6,8 +6,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.TextBounds;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
|
||||
import forge.Graphics;
|
||||
import forge.card.CardFaceSymbols;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package forge.card;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
|
||||
import forge.item.PaperCard;
|
||||
|
@ -7,8 +7,7 @@ import com.badlogic.gdx.graphics.GL20;
|
||||
import com.badlogic.gdx.graphics.Pixmap;
|
||||
import com.badlogic.gdx.graphics.Texture;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.TextBounds;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import com.badlogic.gdx.graphics.g2d.PixmapPacker;
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||
import com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator;
|
||||
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import com.badlogic.gdx.math.Rectangle;
|
||||
|
||||
import forge.Forge;
|
||||
|
@ -48,7 +48,7 @@ import forge.toolbox.FTextArea;
|
||||
import forge.util.Callback;
|
||||
import forge.util.Utils;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
|
@ -41,7 +41,7 @@ import forge.util.storage.IStorage;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package forge.deck;
|
||||
|
||||
import com.badlogic.gdx.Input.Keys;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.base.Predicates;
|
||||
|
@ -20,7 +20,7 @@ import forge.toolbox.FList;
|
||||
import forge.toolbox.FList.CompactModeHandler;
|
||||
import forge.util.Utils;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
|
||||
import java.util.Map.Entry;
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
package forge.itemmanager;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import com.badlogic.gdx.math.Rectangle;
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.base.Predicate;
|
||||
|
@ -3,7 +3,7 @@ package forge.itemmanager;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import com.badlogic.gdx.graphics.Texture;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import com.google.common.base.Function;
|
||||
|
||||
import forge.Graphics;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package forge.itemmanager.filters;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.collect.Iterables;
|
||||
|
||||
|
@ -28,7 +28,7 @@ import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
|
||||
|
||||
public abstract class FormatFilter<T extends InventoryItem> extends ItemFilter<T> {
|
||||
|
@ -1,6 +1,6 @@
|
||||
package forge.itemmanager.filters;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
|
||||
import forge.assets.FSkinFont;
|
||||
import forge.item.InventoryItem;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package forge.itemmanager.filters;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.base.Predicates;
|
||||
|
||||
|
@ -3,7 +3,7 @@ package forge.itemmanager.filters;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
|
||||
import forge.assets.FImage;
|
||||
import forge.item.InventoryItem;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package forge.itemmanager.filters;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import com.google.common.base.Predicate;
|
||||
|
||||
import forge.card.CardRules;
|
||||
|
@ -37,7 +37,7 @@ import java.util.Map.Entry;
|
||||
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import com.badlogic.gdx.graphics.Texture;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import com.badlogic.gdx.math.Rectangle;
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
package forge.menu;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.TextBounds;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
|
||||
import forge.Graphics;
|
||||
import forge.assets.FSkinColor;
|
||||
|
@ -3,7 +3,7 @@ package forge.screens;
|
||||
import java.util.List;
|
||||
|
||||
import com.badlogic.gdx.Input.Keys;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import com.badlogic.gdx.math.Rectangle;
|
||||
|
||||
import forge.Forge;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package forge.screens;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
|
||||
import forge.Forge;
|
||||
import forge.Graphics;
|
||||
|
@ -19,7 +19,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
|
||||
public class AvatarSelector extends FScreen {
|
||||
public static int getRandomAvatar(List<Integer> usedAvatars) {
|
||||
|
@ -5,7 +5,7 @@ import java.util.*;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import com.google.common.collect.Iterables;
|
||||
|
||||
import forge.FThreads;
|
||||
|
@ -6,7 +6,7 @@ import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
|
@ -3,7 +3,7 @@ package forge.screens.home;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
|
||||
import forge.Forge;
|
||||
import forge.Graphics;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package forge.screens.limited;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
|
||||
import forge.FThreads;
|
||||
import forge.Forge;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package forge.screens.match.views;
|
||||
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
|
||||
import forge.Graphics;
|
||||
|
@ -2,7 +2,7 @@ package forge.screens.match.views;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
|
||||
import forge.Graphics;
|
||||
import forge.assets.FSkinColor;
|
||||
|
@ -3,7 +3,7 @@ package forge.screens.match.views;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
|
||||
import forge.Forge;
|
||||
import forge.Graphics;
|
||||
|
@ -4,8 +4,7 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.TextBounds;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
|
||||
import forge.Graphics;
|
||||
import forge.assets.FSkinColor;
|
||||
|
@ -6,7 +6,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
|
||||
import forge.Forge;
|
||||
import forge.Graphics;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package forge.screens.match.views;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
|
||||
import forge.Graphics;
|
||||
import forge.assets.FImage;
|
||||
|
@ -6,7 +6,7 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
|
||||
import forge.Forge;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package forge.screens.match.winlose;
|
||||
|
||||
import com.badlogic.gdx.Input.Keys;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import forge.FThreads;
|
||||
import forge.Forge;
|
||||
import forge.assets.FSkinColor;
|
||||
|
@ -5,7 +5,7 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import com.badlogic.gdx.math.Rectangle;
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.base.Predicates;
|
||||
|
@ -2,7 +2,7 @@ package forge.screens.planarconquest;
|
||||
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import com.google.common.base.Predicate;
|
||||
|
||||
import forge.Forge;
|
||||
|
@ -5,7 +5,7 @@ import java.util.List;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import com.badlogic.gdx.math.Rectangle;
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
|
||||
|
@ -3,7 +3,7 @@ package forge.screens.planarconquest;
|
||||
import java.util.List;
|
||||
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import com.badlogic.gdx.math.Rectangle;
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package forge.screens.planarconquest;
|
||||
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
|
||||
import forge.Forge;
|
||||
import forge.Graphics;
|
||||
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.badlogic.gdx.graphics.Texture;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
|
||||
import forge.Graphics;
|
||||
import forge.ImageKeys;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package forge.screens.planarconquest;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
|
||||
import forge.assets.FImage;
|
||||
import forge.assets.FSkinFont;
|
||||
|
@ -9,7 +9,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
|
||||
import forge.FThreads;
|
||||
import forge.Graphics;
|
||||
|
@ -10,7 +10,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
|
||||
import forge.FThreads;
|
||||
import forge.Forge;
|
||||
|
@ -3,7 +3,7 @@ package forge.screens.quest;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
|
||||
import forge.Forge;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package forge.screens.quest;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
|
||||
import forge.assets.FSkinFont;
|
||||
|
@ -1,6 +1,7 @@
|
||||
package forge.screens.quest;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import com.badlogic.gdx.utils.Align;
|
||||
|
||||
import forge.FThreads;
|
||||
import forge.Forge;
|
||||
@ -34,7 +35,7 @@ public class QuestDecksScreen extends FScreen {
|
||||
private final FButton btnRandom = add(new FButton("Random Deck"));
|
||||
|
||||
private final FLabel lblInfo = add(new FLabel.Builder()
|
||||
.align(HAlignment.CENTER).font(FSkinFont.get(16))
|
||||
.align(Align.center).font(FSkinFont.get(16))
|
||||
.text("Build or select a deck").build());
|
||||
|
||||
private final FEventHandler onDeckSelectionChanged = new FEventHandler() {
|
||||
@ -161,6 +162,7 @@ public class QuestDecksScreen extends FScreen {
|
||||
float y = startY + PADDING / 2;
|
||||
float w = width - 2 * PADDING;
|
||||
|
||||
// lblInfo.get
|
||||
lblInfo.setBounds(x, y, w, lblInfo.getAutoSizeBounds().height);
|
||||
y += lblInfo.getHeight();
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package forge.screens.quest;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
import forge.assets.FSkinFont;
|
||||
import forge.interfaces.IButton;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package forge.screens.quest;
|
||||
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import forge.Graphics;
|
||||
import forge.assets.*;
|
||||
import forge.assets.FSkinColor.Colors;
|
||||
|
@ -6,7 +6,7 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
|
||||
import forge.FThreads;
|
||||
import forge.assets.FImage;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package forge.screens.quest;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
|
||||
import forge.FThreads;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package forge.toolbox;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
|
||||
import forge.Graphics;
|
||||
import forge.assets.FImage;
|
||||
|
@ -3,7 +3,7 @@ package forge.toolbox;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
|
||||
import forge.Graphics;
|
||||
import forge.interfaces.IComboBox;
|
||||
|
@ -6,7 +6,7 @@ import java.io.FilenameFilter;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import com.badlogic.gdx.Input.Keys;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
|
||||
import forge.Forge;
|
||||
import forge.Graphics;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package forge.toolbox;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
|
||||
import forge.Graphics;
|
||||
import forge.assets.FSkinColor;
|
||||
|
@ -1,8 +1,8 @@
|
||||
package forge.toolbox;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.TextBounds;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
import com.badlogic.gdx.utils.Align;
|
||||
|
||||
import forge.Graphics;
|
||||
import forge.UiCommand;
|
||||
@ -25,7 +25,7 @@ public class FLabel extends FDisplayObject implements IButton {
|
||||
private float bldIconScaleFactor = 0.8f;
|
||||
private FSkinFont bldFont = FSkinFont.get(14);
|
||||
private float bldAlphaComposite = 0.7f;
|
||||
private HAlignment bldAlignment = HAlignment.LEFT;
|
||||
private Align bldAlignment = Align.LEFT;
|
||||
private Vector2 bldInsets = new Vector2(DEFAULT_INSETS, DEFAULT_INSETS);
|
||||
|
||||
private boolean bldSelectable = false;
|
||||
@ -48,7 +48,7 @@ public class FLabel extends FDisplayObject implements IButton {
|
||||
// Begin builder methods.
|
||||
public Builder text(final String s0) { this.bldText = s0; return this; }
|
||||
public Builder icon(final FImage i0) { this.bldIcon = i0; return this; }
|
||||
public Builder align(final HAlignment a0) { this.bldAlignment = a0; return this; }
|
||||
public Builder align(final Align a0) { this.bldAlignment = a0; return this; }
|
||||
public Builder insets(final Vector2 v0) { this.bldInsets = v0; return this; }
|
||||
public Builder opaque(final boolean b0) { this.bldOpaque = b0; return this; }
|
||||
public Builder opaque() { opaque(true); return this; }
|
||||
@ -103,7 +103,7 @@ public class FLabel extends FDisplayObject implements IButton {
|
||||
private float iconScaleFactor;
|
||||
private FSkinFont font;
|
||||
private float alphaComposite;
|
||||
private HAlignment alignment;
|
||||
private Align alignment;
|
||||
private Vector2 insets;
|
||||
private boolean selectable, selected, opaque, iconInBackground, iconScaleAuto, iconScaleWithFont, pressed;
|
||||
|
||||
@ -186,10 +186,10 @@ public class FLabel extends FDisplayObject implements IButton {
|
||||
insets = insets0;
|
||||
}
|
||||
|
||||
public HAlignment getAlignment() {
|
||||
public Align getAlignment() {
|
||||
return alignment;
|
||||
}
|
||||
public void setAlignment(final HAlignment alignment0) {
|
||||
public void setAlignment(final Align alignment0) {
|
||||
alignment = alignment0;
|
||||
}
|
||||
|
||||
@ -342,13 +342,13 @@ public class FLabel extends FDisplayObject implements IButton {
|
||||
float iconOffset = iconWidth + insets.x + getExtraGapBetweenIconAndText();
|
||||
|
||||
if (iconInBackground || text.isEmpty()) {
|
||||
if (alignment == HAlignment.CENTER) {
|
||||
if (alignment == Align.center) {
|
||||
x += (w - iconWidth) / 2;
|
||||
}
|
||||
y += (h - iconHeight) / 2;
|
||||
}
|
||||
else {
|
||||
if (alignment == HAlignment.CENTER) {
|
||||
if (alignment == Align.center) {
|
||||
float dx;
|
||||
while (true) {
|
||||
dx = (w - iconOffset - getTextWidth()) / 2;
|
||||
@ -362,7 +362,7 @@ public class FLabel extends FDisplayObject implements IButton {
|
||||
font = font.shrink();
|
||||
}
|
||||
}
|
||||
else if (alignment == HAlignment.RIGHT) {
|
||||
else if (alignment == Align.right) {
|
||||
float dx;
|
||||
while (true) {
|
||||
dx = (w - iconWidth - getTextWidth() - insets.x);
|
||||
@ -384,7 +384,7 @@ public class FLabel extends FDisplayObject implements IButton {
|
||||
if (!text.isEmpty()) {
|
||||
x += iconOffset;
|
||||
w -= iconOffset;
|
||||
drawText(g, x, textY, w, h, HAlignment.LEFT);
|
||||
drawText(g, x, textY, w, h, Align.left);
|
||||
}
|
||||
}
|
||||
else if (!text.isEmpty()) {
|
||||
@ -392,7 +392,7 @@ public class FLabel extends FDisplayObject implements IButton {
|
||||
}
|
||||
}
|
||||
|
||||
private void drawText(Graphics g, float x, float y, float w, float h, HAlignment align) {
|
||||
private void drawText(Graphics g, float x, float y, float w, float h, Align align) {
|
||||
g.startClip(x, y, w, h);
|
||||
if (textRenderer == null) {
|
||||
g.drawText(text, font, textColor, x, y, w, h, false, align, true);
|
||||
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
|
||||
import forge.Graphics;
|
||||
import forge.assets.FSkinColor;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package forge.toolbox;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
|
||||
public class FNumericTextField extends FTextField {
|
||||
private int value;
|
||||
|
@ -1,8 +1,7 @@
|
||||
package forge.toolbox;
|
||||
|
||||
import com.badlogic.gdx.Input.Keys;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.TextBounds;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
|
||||
import forge.Forge;
|
||||
import forge.Forge.KeyInputAdapter;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package forge.toolbox;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
|
||||
import forge.Graphics;
|
||||
import forge.assets.FSkinColor;
|
||||
|
Loading…
Reference in New Issue
Block a user