parent
2cee57d9e9
commit
f07a89fe22
After Width: | Height: | Size: 229 B |
After Width: | Height: | Size: 331 B |
@ -1 +1 @@ |
||||
<h1>Hello World!</h1> |
||||
<img src="../sigIRCicon.png" style="float:left;padding-right:5px;vertical-align:text-bottom;"><font size="5"><b>sigIRC</b> allows you to present dynamic content to viewers on stream and provides various features that may be helpful to you as a streamer. Click <i>Next</i> to begin the setup process.</font> |
@ -0,0 +1,12 @@ |
||||
<font size="5">Now it's time to configure basic features of <b>sigIRC</b>. sigIRC provides the following modules: |
||||
<br> |
||||
<ul> |
||||
<li><b>Scrolling Chat</b> - Displays scrolling chat messages across the screen as users of your channel talk.</li> |
||||
<li><b>Chat Log</b> - Displays a box that contains the latest chat messages from your channel for that day.</li> |
||||
<li><b>Controller</b> - Displays a controller on screen and allows you to configure the buttons and display so viewers can see your button inputs.</li> |
||||
<li><b>Twitch</b> - Displays a bar that shows your channel's stream uptime, number of followers, channel view, and current viewers. Also announces new followers of your stream.</li> |
||||
<li><b>Rabi-Race</b> - For the game <b>Rabi-Ribi</b>. A tracker that allows players of the game to connect to each other in game rooms and see each others' progress as they race. Supports randomizer Egg Hunts and Item Hunts.</li> |
||||
<li><b>Touhou Mother</b> - For the game <b>Touhou Mother</b>. A tracker that displays boss health whenever you get into a boss encounter, the amount of time the boss fight takes, and how much damage your party members deal.</li> |
||||
</ul> |
||||
<br><br> |
||||
Each module will open up in a separate window that you can place and resize on your screen as you see fit.</font> |
@ -0,0 +1 @@ |
||||
<font size="5"><b>sigIRC</b> uses your Twitch account in order to retrieve and send data. Please input your Twitch username below and hit <i>Next</i> to continue. You will be asked for authentication details on the next screen.</font> |
@ -0,0 +1 @@ |
||||
<font size="5">Below you will see a button to <i><a href="https://twitchapps.com/tmi/">https://twitchapps.com/tmi/</a></i> which will allow you to retrieve an <b>oauth Token</b>. Connect to Twitch and generate an <b>oauth token</b>, then copy and paste the token into the box below to grant this program the ability to use Twitch services.</font> |
Binary file not shown.
@ -0,0 +1,204 @@ |
||||
package sig.windows; |
||||
|
||||
import java.awt.Dimension; |
||||
import java.io.File; |
||||
import java.io.IOException; |
||||
import java.net.MalformedURLException; |
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
import javax.swing.JFrame; |
||||
import javax.swing.JPanel; |
||||
import javax.swing.JProgressBar; |
||||
|
||||
import org.json.JSONException; |
||||
import org.json.JSONObject; |
||||
|
||||
import sig.Emoticon; |
||||
import sig.FileManager; |
||||
import sig.sigIRC; |
||||
import sig.modules.RabiRace.Avatar; |
||||
import sig.modules.RabiRace.MemoryData; |
||||
import sig.utils.FileUtils; |
||||
|
||||
public class LoadingDialog extends JFrame{ |
||||
JProgressBar bar = new JProgressBar(); |
||||
List<FileManager> managers = new ArrayList<FileManager>(); |
||||
FakeFileManager programUpdate = new FakeFileManager("_FAKE_"); |
||||
FakeFileManager twitchEmoteUpdate = new FakeFileManager("_FAKE_"); |
||||
public JPanel panel; |
||||
public static List<TwitchEmoteDownload> emotes = new ArrayList<TwitchEmoteDownload>(); |
||||
|
||||
public LoadingDialog() { |
||||
sigIRC.loadingdialog = this; |
||||
panel = new JPanel(); |
||||
|
||||
managers.add(new FileManager("sigIRC/oauthToken.txt")); |
||||
managers.add(new FileManager("sigIRC/Emotes/",true)); |
||||
managers.add(new FileManager("sigIRC/subscribers.txt")); |
||||
managers.add(new FileManager("sigIRC/logs/",true)); |
||||
managers.add(new FileManager("sigIRC/sounds/",true)); |
||||
managers.add(new FileManager("sigIRC/rabi-ribi/",true)); |
||||
managers.add(new FileManager("sigIRC/rabi-ribi/unknown.png")); |
||||
managers.add(new FileManager("sigIRC/rabi-ribi/characters",true)); |
||||
managers.add(new FileManager("sigIRC/rabi-ribi/items",true)); |
||||
//managers.add(new FileManager("sigIRC/sounds/Glaceon_cry.wav")
|
||||
File follower_sounds_folder = new File(sigIRC.BASEDIR+"sigIRC/follower_sounds"); |
||||
if (!follower_sounds_folder.exists()) { |
||||
managers.add(new FileManager("sigIRC/follower_sounds/Glaceon_cry.wav")); |
||||
managers.add(new FileManager("sigIRC/follower_sounds/README.txt")); |
||||
} |
||||
managers.add(new FileManager("sigIRC/record")); |
||||
managers.add(new FileManager("sigIRC/glaceon_follower.png")); |
||||
managers.add(new FileManager("sigIRC/sigIRCicon.png")); |
||||
managers.add(new FileManager("sigIRC/icon_down_arrow.png")); |
||||
managers.add(new FileManager("sigIRC/icon_follower_count.png")); |
||||
managers.add(new FileManager("sigIRC/icon_up_arrow.png")); |
||||
managers.add(new FileManager("sigIRC/icon_uptime.png")); |
||||
managers.add(new FileManager("sigIRC/icon_viewers_count.png")); |
||||
managers.add(new FileManager("sigIRC/icon_views_count.png")); |
||||
managers.add(new FileManager("sigIRC/message_separator.png")); |
||||
managers.add(new FileManager("sigIRC/controller/2-way_axis.png")); |
||||
managers.add(new FileManager("sigIRC/controller/4-way_axis.png")); |
||||
managers.add(new FileManager("sigIRC/controller/controller_overlay.png")); |
||||
managers.add(new FileManager("sigIRC/controller/controller_template.png")); |
||||
managers.add(new FileManager("sigIRC/CP_Font.ttf")); |
||||
managers.add(new FileManager("kill.png")); |
||||
managers.add(new FileManager("memory")); |
||||
managers.add(new FileManager("swap.png")); |
||||
managers.add(new FileManager("update.png")); |
||||
managers.add(new FileManager("backcolor.png")); |
||||
managers.add(new FileManager("drag_bar.png")); |
||||
managers.add(new FileManager("sigIRC/Emotes/1.png")); |
||||
managers.add(new FileManager("sigIRC/Emotes/2.png")); |
||||
managers.add(new FileManager("sigIRC/Emotes/3.png")); |
||||
managers.add(new FileManager("sigIRC/Emotes/4.png")); |
||||
managers.add(new FileManager("sigIRC/Emotes/5.png")); |
||||
managers.add(new FileManager("sigIRC/Emotes/6.png")); |
||||
managers.add(new FileManager("sigIRC/Emotes/7.png")); |
||||
managers.add(new FileManager("sigIRC/Emotes/8.png")); |
||||
managers.add(new FileManager("sigIRC/Emotes/9.png")); |
||||
managers.add(new FileManager("sigIRC/Emotes/10.png")); |
||||
managers.add(new FileManager("sigIRC/Emotes/11.png")); |
||||
managers.add(new FileManager("sigIRC/Emotes/12.png")); |
||||
managers.add(new FileManager("sigIRC/Emotes/13.png")); |
||||
managers.add(new FileManager("sigIRC/Emotes/20.png")); |
||||
managers.add(programUpdate); |
||||
|
||||
if (sigIRC.rabiracemodule_enabled) { |
||||
for (MemoryData data : MemoryData.values()) { |
||||
//Attempt to fetch from server.
|
||||
managers.add(new FileManager("sigIRC/rabi-ribi/items/"+data.img_path)); |
||||
} |
||||
for (Avatar avatar : Avatar.values()) { |
||||
managers.add(new FileManager("sigIRC/rabi-ribi/characters/"+avatar.fileName)); |
||||
} |
||||
managers.add(new FileManager("sigIRC/rabi-ribi/items/easter_egg.png")); |
||||
managers.add(new FileManager("sigIRC/rabi-ribi/items/health_up.png")); |
||||
managers.add(new FileManager("sigIRC/rabi-ribi/items/mana_up.png")); |
||||
managers.add(new FileManager("sigIRC/rabi-ribi/items/regen_up.png")); |
||||
managers.add(new FileManager("sigIRC/rabi-ribi/items/pack_up.png")); |
||||
managers.add(new FileManager("sigIRC/rabi-ribi/items/attack_up.png")); |
||||
} |
||||
|
||||
JSONObject twitchemotes; |
||||
try { |
||||
twitchemotes = FileUtils.readJsonFromUrl("https://twitchemotes.com/api_cache/v3/global.json"); |
||||
System.out.println("Twitch emote Json read."); |
||||
for (String emotes : twitchemotes.keySet()) { |
||||
JSONObject emote = twitchemotes.getJSONObject(emotes); |
||||
int id = emote.getInt("id"); |
||||
String name = emote.getString("code"); |
||||
LoadingDialog.emotes.add(new TwitchEmoteDownload(name,id)); |
||||
managers.add(new FakeFileManager("_FAKE_")); |
||||
//emoticons.add(new Emoticon(name, new URL(TWITCHEMOTEURL+id+"/1.0")));
|
||||
System.out.println("Emote "+id+" with name "+name); |
||||
} |
||||
} catch (JSONException | IOException e) { |
||||
e.printStackTrace(); |
||||
} |
||||
|
||||
bar.setValue(0); |
||||
bar.setMaximum(managers.size()); |
||||
bar.setPreferredSize(new Dimension(240,24)); |
||||
bar.setString("Downloading resources... (0/"+managers.size()+")"); |
||||
bar.setStringPainted(true); |
||||
|
||||
panel.setSize(new Dimension(260,30)); |
||||
|
||||
panel.add(bar); |
||||
|
||||
this.add(panel); |
||||
|
||||
this.setSize(new Dimension(260,36)); |
||||
this.setLocationByPlatform(true); |
||||
this.setMinimumSize(new Dimension(260, 36)); |
||||
this.setMaximumSize(new Dimension(260, 36)); |
||||
this.setUndecorated(true); |
||||
this.setVisible(true); |
||||
this.setAlwaysOnTop(true); |
||||
this.setFocusable(false); |
||||
|
||||
for (FileManager manager : managers) { |
||||
if (manager.verifyAndFetchFileFromServer()) { |
||||
bar.setValue(bar.getValue()+1); |
||||
UpdateBar(); |
||||
} |
||||
} |
||||
|
||||
for (TwitchEmoteDownload d : emotes) { |
||||
try { |
||||
d.download(); |
||||
bar.setValue(bar.getValue()+1); |
||||
UpdateBar(); |
||||
} catch (MalformedURLException e) { |
||||
e.printStackTrace(); |
||||
} |
||||
} |
||||
|
||||
|
||||
sigIRC.prepareTwitchEmoteUpdate(); |
||||
twitchEmoteUpdate.setDone(); |
||||
bar.setValue(bar.getValue()+1); |
||||
UpdateBar(); |
||||
sigIRC.DownloadProgramUpdate(); |
||||
programUpdate.setDone(); |
||||
bar.setValue(bar.getValue()+1); |
||||
UpdateBar(); |
||||
|
||||
sigIRC.emoticons.add(new Emoticon(":)","1")); |
||||
sigIRC.emoticons.add(new Emoticon(":(","2")); |
||||
sigIRC.emoticons.add(new Emoticon(":o","3")); |
||||
sigIRC.emoticons.add(new Emoticon(":O","3")); |
||||
sigIRC.emoticons.add(new Emoticon(":z","4")); |
||||
sigIRC.emoticons.add(new Emoticon(":Z","4")); |
||||
sigIRC.emoticons.add(new Emoticon("B)","5")); |
||||
sigIRC.emoticons.add(new Emoticon(":\\","6")); |
||||
sigIRC.emoticons.add(new Emoticon(":/","6")); |
||||
sigIRC.emoticons.add(new Emoticon(";)","7")); |
||||
sigIRC.emoticons.add(new Emoticon(";p","8")); |
||||
sigIRC.emoticons.add(new Emoticon(";P","8")); |
||||
sigIRC.emoticons.add(new Emoticon(":p","9")); |
||||
sigIRC.emoticons.add(new Emoticon(":P","9")); |
||||
sigIRC.emoticons.add(new Emoticon("R)","10")); |
||||
sigIRC.emoticons.add(new Emoticon("o_O","20")); |
||||
sigIRC.emoticons.add(new Emoticon("O_o","20")); |
||||
sigIRC.emoticons.add(new Emoticon(":D","11")); |
||||
sigIRC.emoticons.add(new Emoticon(">(","12")); |
||||
sigIRC.emoticons.add(new Emoticon("<3","13")); |
||||
} |
||||
|
||||
private void UpdateBar() { |
||||
bar.setString("Downloading resources... ("+bar.getValue()+"/"+managers.size()+")"); |
||||
} |
||||
} |
||||
|
||||
class FakeFileManager extends FileManager{ |
||||
boolean done=false; |
||||
public FakeFileManager(String location) { |
||||
super(location); |
||||
} |
||||
public void setDone() { |
||||
done=true; |
||||
} |
||||
} |
@ -0,0 +1,21 @@ |
||||
package sig.windows; |
||||
|
||||
import java.net.MalformedURLException; |
||||
import java.net.URL; |
||||
|
||||
import sig.Emoticon; |
||||
import sig.sigIRC; |
||||
|
||||
public class TwitchEmoteDownload { |
||||
String name; |
||||
int id; |
||||
|
||||
public TwitchEmoteDownload(String name,int id) { |
||||
this.name=name; |
||||
this.id=id; |
||||
} |
||||
|
||||
public void download() throws MalformedURLException { |
||||
sigIRC.emoticons.add(new Emoticon(name,new URL(sigIRC.TWITCHEMOTEURL+id+"/1.0"))); |
||||
} |
||||
} |
Loading…
Reference in new issue