From 9a31d7b078cfff3330514491ec392f0831aa392b Mon Sep 17 00:00:00 2001 From: ESloman Date: Tue, 9 Feb 2016 13:12:43 +0000 Subject: [PATCH] Icon Changes Made some changes so that the application now has a custom icon. Changes were only really made to DesktopLauncher.java and added the icon to the asset folder. The other two files edited weren't actually changed. --- core/assets/spritesheets/icon.jpg | Bin 0 -> 20698 bytes core/src/com/game/Game.java | 7 +++++-- core/src/com/game/Misc/Vars.java | 4 ++-- .../src/com/game/desktop/DesktopLauncher.java | 3 +++ 4 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 core/assets/spritesheets/icon.jpg diff --git a/core/assets/spritesheets/icon.jpg b/core/assets/spritesheets/icon.jpg new file mode 100644 index 0000000000000000000000000000000000000000..002162c6ab5919a86eca7d851d5afda9865b987e GIT binary patch literal 20698 zcmeHvcU)7;67Z%%=v_e6(4)Br!%r6mFM>%7h~^1-f@oeGks3rH8v4=bEG~jD0%Qvk#omH! zZ(&Cyk?k!l>`Ate4Z!S2jmozlJ<_lN4g71N_N<=IIqml7Z;X?r-td77@gYYyl%^>WIzzhzT0cjAK z;}{$U0#`uzw*(Or!Wdr&rzNnMi4cASVLi5p!-DW<2&-_IGywou83Zq6(xV}40bv<_ za3B@J4sg=RM2&$X#=t^m5|k4FDlcvcpA{7?BpT9{oVVu3Wd17Ls8H-6b zLlioa{*hpW@?QgE+A~Ai8_^xnjTuQ3v4uoLsdOHjC*l(YaWp!UX!_?#{9jibBi0x> zrUf!1nS3S}HWdnI8H*bQhnve_30XWYk;VO2Bm7@h8zTb(4$f-`DChqKDvQj3LX8T* zblnA5Wodw!zZaIEM#jyT5DJi$H)l%w;Jk-0EEnH@xuLhfELy;dA|hyNU@(y`;wK<5 zTocF*2c&>JPyrfXGSCHvz!Z>y4VVs`fjgK9{6R1X2MYlmL<0`sgG7)5R)I9I5o`sS zU>Dd2@<9f1=t=0QXmhkJ+6C={4n{9PN1@}<$>=rc&FF0OLG&?n3Hlnk8eNBOMZZD!!HroO zqlVG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e_TweJUyR7I;;lam(To-AwK zzO`&$(`5Hc6Ld2Z3A?%zzebX39M_QbJRVR&Lu*Z@TVL0$=yjj6QZFRu+U=TH$CWL1 z{oB6ur!?q#yf$%>QJdL)ASH6fv~9eDFv^dhP=Y47Ia;zxzsFOy>w&jk$F#!pp5uPra8MSy)%wb%!9VCR=i|bbXvLUM!nwc zcLShN@0&dPN_XpQT7q8zuyYS4B z*RNH3Z%SgU&!$gN^?C<8Dwr#5vZ-3JmZfT}km@Dd>#|a!KXcA4w-$Yx&ghD92()%| z%goHQO`oPdU%2Ji@ky$9Gb4kU4$E-FV6P|7g44Xi-emrG-Q7~tBzvX7Z04ngeakt| zcJ)h_mNnaGsO0Yq+ zy_}hj3N?w&I@ahqjdjFZ+N*7LY=EI~^?iD;&GV^quAI!?bnA@X{(`s5_SQYS(aAql zM9SSFo6&P;TT}1jo2O+&0fmP)#~4*vk*bbmptKIXB>d?3QFyU`AM;7#!nv1H&4i69 zE>cyM5oM)2y|bP)<4NWD-r8H!LgK241YLWd6^T=lmc%yhc^2PTw#$g|s;k1_w_5O_ z>E7f6ldd1otyo}o$7*q!AywN{ea^09Sr6SQ zekXkUcBo{t3uaz)BG<+I=A3MV^`>f>vs|b4)Q9o z3)?qoXLuVdHlD2-6813YV1@^;`&m-W#gbcR%R8g)?YqpaQrrBvk?=TNGn1fuPb>av R{_~cc4I4T=iI{;W{|8s!ZW;gp literal 0 HcmV?d00001 diff --git a/core/src/com/game/Game.java b/core/src/com/game/Game.java index a7bafb4..6a92990 100644 --- a/core/src/com/game/Game.java +++ b/core/src/com/game/Game.java @@ -2,6 +2,7 @@ package com.game; import com.badlogic.gdx.ApplicationAdapter; import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; import com.badlogic.gdx.graphics.GL20; import com.badlogic.gdx.graphics.OrthographicCamera; import com.badlogic.gdx.graphics.Texture; @@ -9,6 +10,9 @@ import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.game.Misc.Vars; import com.game.States.StateManager; +import javax.swing.*; +import java.awt.*; + public class Game extends ApplicationAdapter { private float accum; @@ -20,14 +24,13 @@ public class Game extends ApplicationAdapter { private StateManager sm; @Override - public void create () { + public void create() { sb = new SpriteBatch(); cam = new OrthographicCamera(); cam.setToOrtho(false, Vars.SCREEN_WIDTH, Vars.SCREEN_HEIGHT); hudCam = new OrthographicCamera(); hudCam.setToOrtho(false, Vars.SCREEN_WIDTH, Vars.SCREEN_HEIGHT); - sm = new StateManager(this); } diff --git a/core/src/com/game/Misc/Vars.java b/core/src/com/game/Misc/Vars.java index ad53080..8d1b46e 100644 --- a/core/src/com/game/Misc/Vars.java +++ b/core/src/com/game/Misc/Vars.java @@ -2,6 +2,8 @@ package com.game.Misc; import com.badlogic.gdx.math.Vector2; +import java.io.File; + /** * Created by Ash on 08/02/2016. */ @@ -20,8 +22,6 @@ public class Vars { public static final float TILESIZE = 64f; public static final Vector2 SCROLLSPEED = new Vector2(150, 0); - - // Filter bits public static final short BIT_RED = 2; public static final short BIT_GREEN = 4; diff --git a/desktop/src/com/game/desktop/DesktopLauncher.java b/desktop/src/com/game/desktop/DesktopLauncher.java index b4242cf..0678d37 100644 --- a/desktop/src/com/game/desktop/DesktopLauncher.java +++ b/desktop/src/com/game/desktop/DesktopLauncher.java @@ -1,7 +1,9 @@ package com.game.desktop; +import com.badlogic.gdx.Files; import com.badlogic.gdx.backends.lwjgl.LwjglApplication; import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; +import com.badlogic.gdx.graphics.PixmapIO; import com.game.Game; import com.game.Misc.Vars; @@ -13,5 +15,6 @@ public class DesktopLauncher { config.width = Vars.SCREEN_WIDTH; config.height = Vars.SCREEN_HEIGHT; config.resizable = Vars.RESIZABLE; + config.addIcon("spritesheets/icon.jpg", Files.FileType.Internal); } }