Skip to content

Commit

Permalink
Merge pull request #2 from Kyusung4698/command
Browse files Browse the repository at this point in the history
Command
  • Loading branch information
Kyusung4698 authored Jan 6, 2020
2 parents e041f82 + 1ab4fae commit c2bb34b
Show file tree
Hide file tree
Showing 113 changed files with 8,862 additions and 6,030 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## 0.3.0 (2020-01-06)

* add basic filters
* add advanced search
* add evaluate chart
* add sockets to item frame
* add custom shortcuts
* add command module with /hideout /dnd
* add feature settings to layout
* add version check against latest github release
* add user settings window cache for faster display times
* update user settings as own window to mask focusable
* update evaluate dialog to be draggable

## 0.2.0 (2020-01-03)

* add favicon
Expand Down
38 changes: 22 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PoE Overlay 0.2.0
# PoE Overlay 0.3.0

A Overlay for Path of Exile. Providing advanced features like evaluating items. The ***core aspect*** is to blend in game. Built with Electron and Angular.
A Overlay for Path of Exile. The ***core aspect*** is to blend in game. Built with Electron and Angular.

<!-- TOC -->
- [Status](#status)
Expand Down Expand Up @@ -32,21 +32,23 @@ This project is currently in a ***pilot phase***. If you encounter any bugs or h

## Features

* Translating of item names from your client language into english.
* Evaluating of item prices from `poe.trade` in `Chaos Orbs` uses the values of the currency market from `poe.ninja` to convert the currencies.
* Modal dialog to open the search result website *in game*.

![ctrl_d_preview](img/ctrl_d_preview.gif)
* Evaluation of items
* with chooseable currency and language
* with a graph to display the distribution<br> ![item](img/item.jpg)
* with a search filter on all supported properties on click<br> ![item_filter](img/item_filter.jpg)
* with a in game browser to display the created search<br> ![browser](img/item_browser.jpg)
* Binding in game commands to a keybinding
* premade /hideout on `F5` and /dnd on `F6`

## Roadmap

| Module | Status | Notes |
| ------------- |-------------: | ------- |
| Core | 70% | + overlay<br>+ global shortcuts<br>+ user settings (language, league)<br>- custom shortcuts.<br>- auto updating
| Core | 100% | + overlay<br>+ global shortcuts<br>+ user settings (language, league)<br>+ custom shortcuts<br>+ ~~auto updating~~ version check
| Shared | 100% | + item frame<br>+ currency frame<br>+ item parser in all languages<br>+ item parser mods
| Evaluate | 50% | + Basic search implemented <br>- Advanced search with filter on modifiers <br>- Chart to display values instead of avg |
| Evaluate | 100% | + Basic search implemented <br>+ User settings (display currency, translated language) <br>+ Chart to display values instead of avg <br>+ Advanced search with filter on modifiers |
| Command | 100% | + bind in-game commmands to shortcuts (/dnd, /hideout) |
| Trade | 0% | - Send messages<br>- Trade UI<br>- etc. |
| Command | 0% | - bind in-game commmands to shortcuts (like /dnd, /hideout) |


## Enduser
Expand All @@ -63,18 +65,22 @@ These instructions will get you a executable to run and enjoy the overlay.

1. Head over to [Releases](https://github.com/Kyusung4698/PoE-Overlay/releases) and download the latest zip
2. Extract zip
3. Run `poe-overlay.exe`
4. Wait until you can see `POE Overlay 0.2.0` in the bottom left corner
3. Run `poe-overlay 0.3.0.exe`
4. Wait until you can see `POE Overlay 0.3.0` in the bottom left corner
5. Hit `f7` and set `Language` and `League` to meet your game settings
6. Start PoE
6. Start Path of Exile

#### Shortcuts

You can change these shortcuts in the user settings menu.

|Shortcut |Description
|--- |---
| `ctrl+d` | Displays the item in a frame and evaluates the price. You can open poe.trade on click of the currency value.
| `ctrl+t` | '' same as above '' but displays the item translated in english.
| `f7` | Opens user settings
| `ctrl+d` | Displays the item in a frame and evaluates the price. You can open poe.trade on click of the currency value
| `ctrl+t` | '' same as above '' but displays the item translated
| `f5` | Go to Hideout
| `f6` | Toggle DND
| `f7` | Opens the user settings menu
| `f8` | Exits overlay

## Developer
Expand Down
Binary file removed img/ctrl_d_preview.gif
Binary file not shown.
Binary file added img/item.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/item_browser.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/item_filter.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
105 changes: 77 additions & 28 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,81 +3,129 @@ import * as path from 'path';
import * as robot from 'robotjs';
import * as url from 'url';

ipcMain.on('keyTap', (event, key, modifier) => {
/* robot js */

ipcMain.on('key-tap', (event, key, modifier) => {
robot.keyTap(key, modifier);
event.returnValue = true;
});

ipcMain.on('set-keyboard-delay', (event, delay) => {
robot.setKeyboardDelay(delay);
event.returnValue = true;
});

/* main window */

let win: BrowserWindow = null;
const args = process.argv.slice(1),
serve = args.some(val => val === '--serve');

function createWindow(): BrowserWindow {

// Create the browser window.
win = new BrowserWindow({
fullscreen: true,
transparent: true,
frame: false,
focusable: false,
resizable: false,
movable: false,
webPreferences: {
nodeIntegration: true,
allowRunningInsecureContent: (serve) ? true : false,
webSecurity: false
}
},
focusable: false,
});
win.setIgnoreMouseEvents(true, { forward: true });
win.setIgnoreMouseEvents(true);
win.setAlwaysOnTop(true, 'screen-saver');

loadApp(win);

win.on('closed', () => {
win = null;
});

return win;
}

/* modal window */

let childs: {
[key: string]: BrowserWindow
} = {};

ipcMain.on('open-route', (event, route) => {
try {
if (!childs[route]) {
// Create the child browser window.
childs[route] = new BrowserWindow({
fullscreen: true,
transparent: true,
frame: false,
resizable: false,
movable: false,
webPreferences: {
nodeIntegration: true,
allowRunningInsecureContent: (serve) ? true : false,
webSecurity: false
},
modal: true,
parent: win,
show: false
});
loadApp(childs[route], `#/${route}`);

childs[route].once('ready-to-show', () => {
childs[route].show()
});

childs[route].once('closed', () => {
childs[route] = null;
});
} else {
childs[route].show();
}

childs[route].once('hide', () => {
event.reply('open-route-reply', 'closed');
});
}
catch (error) {
event.reply('open-route-reply', error);
}
});

function loadApp(win: BrowserWindow, route: string = '') {
if (serve) {
require('electron-reload')(__dirname, {
electron: require(`${__dirname}/node_modules/electron`)
});
win.loadURL('http://localhost:4200');
} else {
win.loadURL(url.format({
win.loadURL('http://localhost:4200' + route);
}
else {
const appUrl = url.format({
pathname: path.join(__dirname, 'dist/index.html'),
protocol: 'file:',
slashes: true
}));
});
win.loadURL(appUrl + route);
}

if (serve) {
win.webContents.openDevTools();
}

// Emitted when the window is closed.
win.on('closed', () => {
// Dereference the window object, usually you would store window
// in an array if your app supports multi windows, this is the time
// when you should delete the corresponding element.
win = null;
});

return win;
}

try {

// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
app.on('ready', createWindow);

// Quit when all windows are closed.
app.on('window-all-closed', () => {
// On OS X it is common for applications and their menu bar
// to stay active until the user quits explicitly with Cmd + Q
if (process.platform !== 'darwin') {
app.quit();
}
});

app.on('activate', () => {
// On OS X it's common to re-create a window in the app when the
// dock icon is clicked and there are no other windows open.
if (win === null) {
createWindow();
}
Expand All @@ -87,3 +135,4 @@ try {
// Catch Error
// throw e;
}

Loading

0 comments on commit c2bb34b

Please sign in to comment.