diff --git a/android/assets/skin/uiskin.json b/android/assets/skin/uiskin.json index c4a3325..acaa30c 100644 --- a/android/assets/skin/uiskin.json +++ b/android/assets/skin/uiskin.json @@ -5,7 +5,7 @@ com.badlogic.gdx.graphics.Color: { white: { a: 1, b: 1, g: 1, r: 1 }, red: { a: 1, b: 0, g: 0, r: 1 }, black: { a: 1, b: 0, g: 0, r: 0 }, - blue: {a: 1, b: 1, g: 0, r: 0 } + blue: {a: 1, b: 0.9, g: 0.4, r: 0 } }, com.badlogic.gdx.scenes.scene2d.ui.Skin$TintedDrawable: { dialogDim: { name: white, color: { r: 0, g: 0, b: 0, a: 0.45 } }, diff --git a/android/assets/skin/uiskin.png b/android/assets/skin/uiskin.png index c1e5f1a..f6ae9ea 100644 Binary files a/android/assets/skin/uiskin.png and b/android/assets/skin/uiskin.png differ diff --git a/android/project.properties b/android/project.properties index 4ab1256..6e18427 100644 --- a/android/project.properties +++ b/android/project.properties @@ -11,4 +11,4 @@ #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt # Project target. -target=android-19 +target=android-21 diff --git a/core/src/com/jw/lightwallet/screens/DaemonView.java b/core/src/com/jw/lightwallet/screens/DaemonView.java index c45580c..4aaca88 100644 --- a/core/src/com/jw/lightwallet/screens/DaemonView.java +++ b/core/src/com/jw/lightwallet/screens/DaemonView.java @@ -1,8 +1,6 @@ package com.jw.lightwallet.screens; import com.badlogic.gdx.Gdx; -import com.badlogic.gdx.graphics.Texture; -import com.badlogic.gdx.scenes.scene2d.ui.Image; import com.badlogic.gdx.scenes.scene2d.ui.Label; import com.badlogic.gdx.scenes.scene2d.ui.Skin; import com.badlogic.gdx.scenes.scene2d.ui.Table; @@ -10,7 +8,6 @@ import com.jw.lightwallet.utils.Constants; import com.jw.lightwallet.utils.DaemonValues; import java.text.DecimalFormat; -import java.util.Date; public class DaemonView { diff --git a/core/src/com/jw/lightwallet/screens/MainScreen.java b/core/src/com/jw/lightwallet/screens/MainScreen.java index 98f14fa..ccfa551 100644 --- a/core/src/com/jw/lightwallet/screens/MainScreen.java +++ b/core/src/com/jw/lightwallet/screens/MainScreen.java @@ -2,12 +2,13 @@ package com.jw.lightwallet.screens; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.Texture; +import com.badlogic.gdx.scenes.scene2d.InputEvent; import com.badlogic.gdx.scenes.scene2d.Stage; -import com.badlogic.gdx.scenes.scene2d.ui.Container; import com.badlogic.gdx.scenes.scene2d.ui.Image; import com.badlogic.gdx.scenes.scene2d.ui.Skin; import com.badlogic.gdx.scenes.scene2d.ui.Table; import com.badlogic.gdx.scenes.scene2d.ui.TextButton; +import com.badlogic.gdx.scenes.scene2d.utils.ClickListener; import com.badlogic.gdx.utils.Timer; import com.jw.lightwallet.LightWallet; import com.jw.lightwallet.daemon.DaemonRPC; @@ -19,23 +20,24 @@ public class MainScreen extends AbstractScreen { // Interface classes DaemonRPC daemonrpc; DaemonValues daemonvalues; + // Layout stuff Stage stage; Table screenlayout; Image logo; Texture logotex; + Table buttonrow; TextButton daemonbutton; TextButton walletbutton; TextButton transferbutton; TextButton txhistorybutton; + Table viewcontainer; DaemonView daemonview; + WalletView walletview; - // Wallet layout - // Transfer layout - // Tx history layout // Timer Timer timer; @@ -50,6 +52,7 @@ public class MainScreen extends AbstractScreen { daemonvalues = new DaemonValues(); stage = new Stage(); + Gdx.input.setInputProcessor(stage); screenlayout = new Table(); viewcontainer = new Table(); @@ -58,9 +61,37 @@ public class MainScreen extends AbstractScreen { buttonrow = new Table(); daemonbutton = new TextButton("Daemon", uiSkin); + daemonbutton.addListener(new ClickListener() { + @Override + public void clicked (InputEvent event, float x, float y) { + System.out.println("Daemon button Pressed"); + viewcontainer.removeActor(walletview.walletlayout); + viewcontainer.add(daemonview.daemonlayout).expand().bottom(); + } + }); walletbutton = new TextButton("Wallet", uiSkin); + walletbutton.addListener(new ClickListener() { + @Override + public void clicked (InputEvent event, float x, float y) { + System.out.println("Wallet button Pressed"); + viewcontainer.removeActor(daemonview.daemonlayout); + viewcontainer.add(walletview.walletlayout).expand().bottom(); + } + }); transferbutton = new TextButton("Transfer", uiSkin); + transferbutton.addListener(new ClickListener() { + @Override + public void clicked (InputEvent event, float x, float y) { + System.out.println("Transfer button Pressed"); + } + }); txhistorybutton = new TextButton("History", uiSkin); + txhistorybutton.addListener(new ClickListener() { + @Override + public void clicked (InputEvent event, float x, float y) { + System.out.println("History button Pressed"); + } + }); buttonrow.add(daemonbutton).width(Constants.WORLD_WIDTH/4); buttonrow.add(walletbutton).width(Constants.WORLD_WIDTH/4); @@ -71,6 +102,7 @@ public class MainScreen extends AbstractScreen { screenlayout.add(logo).pad(10).center().row(); daemonview = new DaemonView(); + walletview = new WalletView(); viewcontainer.add(daemonview.daemonlayout).expand().bottom(); screenlayout.add(viewcontainer); diff --git a/core/src/com/jw/lightwallet/screens/WalletView.java b/core/src/com/jw/lightwallet/screens/WalletView.java index c0d9af4..2c81d91 100644 --- a/core/src/com/jw/lightwallet/screens/WalletView.java +++ b/core/src/com/jw/lightwallet/screens/WalletView.java @@ -1,5 +1,35 @@ package com.jw.lightwallet.screens; +import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.scenes.scene2d.ui.Label; +import com.badlogic.gdx.scenes.scene2d.ui.Skin; +import com.badlogic.gdx.scenes.scene2d.ui.Table; + public class WalletView { + Table walletlayout; + + Label addresslabel; + Label addressvalue; + Label unlockedlabel; + Label unlockedvalue; + Label lockedlabel; + Label lockedvalue; + + int padvalue; + + + public WalletView () { + + Skin uiSkin = new Skin(Gdx.files.internal("skin/uiskin.json")); + + walletlayout = new Table(); + padvalue = 15; + + addresslabel = new Label("Address: ", uiSkin); + addressvalue = new Label("assssssssssssssddddddddddddddddddddddddddddssssssssssssssssssssssssssssssssffffffffffffffffd", uiSkin); + walletlayout.add(addresslabel).pad(padvalue); + walletlayout.add(addressvalue).pad(padvalue).row(); + + } }