use of dev.hypnotic.ui.clickgui2.frame.Frame in project Hypnotic-Client by Hypnotic-Development.
the class ClickGUI method render.
@Override
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
this.renderBackground(matrices);
for (Frame frame : frames) {
frame.setWidth(120);
frame.render(matrices, mouseX, mouseY);
frame.updatePosition(mouseX, mouseY);
frame.updateButtons();
}
menuBar.renderMenuBar(matrices, mouseX, mouseY, this.width, this.height);
super.render(matrices, mouseX, mouseY, delta);
}
use of dev.hypnotic.ui.clickgui2.frame.Frame in project Hypnotic-Client by Hypnotic-Development.
the class SaveLoad method save.
public void save() {
ArrayList<String> toSave = new ArrayList<String>();
if (ModuleManager.INSTANCE == null || HudManager.INSTANCE == null)
return;
for (Mod mod : ModuleManager.INSTANCE.modules) {
toSave.add("MOD:" + mod.getName() + ":" + mod.isEnabled() + ":" + mod.getKey());
}
for (HudModule element : HudManager.INSTANCE.hudModules) {
toSave.add("HUD:" + element.getName() + ":" + element.getX() + ":" + element.getY());
}
for (Friend friend : FriendManager.INSTANCE.friends) {
toSave.add("FRIEND:" + friend.name);
}
for (Frame frame : ClickGUI.INSTANCE.frames) {
toSave.add("FRAME:" + frame.name + ":" + frame.getX() + ":" + frame.getY() + ":" + frame.isExtended());
}
toSave.add("FRAME:" + HudEditorScreen.INSTANCE.frame.name + ":" + HudEditorScreen.INSTANCE.frame.getX() + ":" + HudEditorScreen.INSTANCE.frame.getY() + ":" + HudEditorScreen.INSTANCE.frame.isExtended());
toSave.add("CLICKGUI:X:" + dev.hypnotic.ui.clickgui.ClickGUI.INSTANCE.x + ":Y:" + dev.hypnotic.ui.clickgui.ClickGUI.INSTANCE.y);
for (Waypoint waypoint : WaypointManager.INSTANCE.waypoints) {
toSave.add("WAYPOINT:NAME:" + waypoint.getName() + ":X:" + waypoint.getX() + ":Y:" + waypoint.getY() + ":Z:" + waypoint.getZ());
}
try {
PrintWriter pw = new PrintWriter(this.dataFile);
for (String str : toSave) {
pw.println(str);
}
pw.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
}
}
use of dev.hypnotic.ui.clickgui2.frame.Frame in project service-proxy by membrane.
the class FrameSender method getNextFrame.
private Frame getNextFrame() {
Frame frame = queue.poll();
if (frame != null) {
totalBufferedFrames.decrementAndGet();
return frame;
}
// TODO: implement prioritization logic
for (StreamInfo streamInfo : streams.values()) {
frame = streamInfo.getDataFramesToBeSent().poll();
if (frame != null) {
streamInfo.getBufferedDataFrames().release();
totalBufferedFrames.decrementAndGet();
return frame;
}
}
return null;
}
use of dev.hypnotic.ui.clickgui2.frame.Frame in project service-proxy by membrane.
the class FrameSender method waitForNextFrame.
private Frame waitForNextFrame() throws InterruptedException {
// TODO: improve waiting logic
Thread.sleep(100);
Frame frame = getNextFrame();
return frame;
}
use of dev.hypnotic.ui.clickgui2.frame.Frame in project service-proxy by membrane.
the class Http2Logic method handle.
public void handle() throws IOException, EndOfStreamException {
try {
while (receiving) {
Frame frame = new Frame(ourSettings);
frame.read(srcIn);
handleFrame(frame);
}
} catch (EOFException eof) {
throw new EndOfStreamException("");
} finally {
sender.stop();
}
}
Aggregations