Compare commits

..

10 Commits

Author SHA1 Message Date
JonatanRek
83f2e08bb5 Fix Maxro 2024-10-28 17:19:50 +01:00
JonatanRek
4c07938a0d Fixes + PWA Progress 2024-10-02 12:35:15 +02:00
JonatanRek
df80ce37ed Fixes 2024-09-17 21:39:22 +02:00
JonatanRek
50c6c9a1de Merge branch 'main' of https://git.steelants.cz/JonatanRek/FakeDeck 2024-09-17 21:39:18 +02:00
JonatanRek
0b3822b8da Fixes 2024-09-17 21:36:17 +02:00
a63133a7a5 Merge branch 'main' of https://git.steelants.cz/JonatanRek/FakeDeck 2024-09-17 06:23:19 -07:00
600a08dd51 Process Macro Fixes 2024-09-17 06:23:17 -07:00
Jonatan Rek
9d33f9a223 Readme 2024-09-17 08:21:01 +02:00
Jonatan Rek
ed334a7cf9 Merge branch 'main' of https://git.steelants.cz/JonatanRek/FakeDeck 2024-09-17 08:19:31 +02:00
Jonatan Rek
1666be73b3 Readme 2024-09-17 08:19:21 +02:00
9 changed files with 107 additions and 16 deletions

View File

@@ -33,9 +33,11 @@ namespace FakeDeck.ButtonType
//Offensive: Orbital Strikes //Offensive: Orbital Strikes
{ "orbital-precision-strike", new uint[] { 0x65, Key_Right, Key_Right, Key_Up}}, { "orbital-precision-strike", new uint[] { 0x65, Key_Right, Key_Right, Key_Up}},
{ "orbital-380-barrage", new uint[] { 0x65, Key_Right, Key_Down, Key_Up, Key_Up, Key_Left, Key_Down, Key_Down}},
//Defensive //Defensive
{ "mortar-sentry", new uint[] { 0x65, Key_Down, Key_Up, Key_Right, Key_Down}}, { "mortar-sentry", new uint[] { 0x65, Key_Down, Key_Up, Key_Right, Key_Right, Key_Down }},
{ "gatling-sentry", new uint[] { 0x65, Key_Down, Key_Up, Key_Right, Key_Left}}, { "gatling-sentry", new uint[] { 0x65, Key_Down, Key_Up, Key_Right, Key_Left}},
@@ -61,6 +63,7 @@ namespace FakeDeck.ButtonType
{ "autocannon", "https://static.wikia.nocookie.net/helldivers_gamepedia/images/c/c6/AC-8_Autocannon_Icon.png"}, { "autocannon", "https://static.wikia.nocookie.net/helldivers_gamepedia/images/c/c6/AC-8_Autocannon_Icon.png"},
{ "grenade-launcher","https://static.wikia.nocookie.net/helldivers_gamepedia/images/6/66/GL-21_Grenade_Launcher_Icon.png"}, { "grenade-launcher","https://static.wikia.nocookie.net/helldivers_gamepedia/images/6/66/GL-21_Grenade_Launcher_Icon.png"},
{ "orbital-precision-strike", "https://static.wikia.nocookie.net/helldivers_gamepedia/images/4/47/Orbital_Precision_Strike_Icon.png"}, { "orbital-precision-strike", "https://static.wikia.nocookie.net/helldivers_gamepedia/images/4/47/Orbital_Precision_Strike_Icon.png"},
{ "orbital-380-barrage", "https://static.wikia.nocookie.net/helldivers_gamepedia/images/f/f4/Orbital_380MM_HE_Barrage_Icon.png"},
{ "mortar-sentry", "https://static.wikia.nocookie.net/helldivers_gamepedia/images/1/1d/A_M-12_Mortar_Sentry_Icon.png"}, { "mortar-sentry", "https://static.wikia.nocookie.net/helldivers_gamepedia/images/1/1d/A_M-12_Mortar_Sentry_Icon.png"},
{ "gatling-sentry","https://static.wikia.nocookie.net/helldivers_gamepedia/images/4/48/A_G-16_Gatling_Sentry_Icon.png"}, { "gatling-sentry","https://static.wikia.nocookie.net/helldivers_gamepedia/images/4/48/A_G-16_Gatling_Sentry_Icon.png"},

View File

@@ -1,6 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.IO;
using System.Linq; using System.Linq;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Text; using System.Text;
@@ -31,10 +32,16 @@ namespace FakeDeck.ButtonType
public static bool invokeAction(string process, string arguments = "") public static bool invokeAction(string process, string arguments = "")
{ {
if (!System.IO.File.ReadAllText("./configuration.yaml").Contains(process)) if (!File.ReadAllText("./configuration.yaml").Contains(process))
{ {
Debug.WriteLine("not known process"); Debug.WriteLine("not known process");
return true; return false;
}
if (!File.ReadAllText("./configuration.yaml").Contains(arguments))
{
Debug.WriteLine("not known arguments");
return false;
} }
Process notePad = new Process(); Process notePad = new Process();

View File

@@ -24,6 +24,7 @@ namespace FakeDeck.Class
" <link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css\" rel=\"stylesheet\">" + " <link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css\" rel=\"stylesheet\">" +
" <link href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css\" rel=\"stylesheet\">" + " <link href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css\" rel=\"stylesheet\">" +
" <link href=\"StaticFiles/style.css\" rel=\"stylesheet\">" + " <link href=\"StaticFiles/style.css\" rel=\"stylesheet\">" +
" <link rel=\"manifest\" href=\"StaticFiles/manifest.json\" />" +
" </head>" + " </head>" +
" <body>" + " <body>" +
" <div id=\"main\" class=\"d-flex flex-wrap\" style=\"transform-origin: left top;\">"; " <div id=\"main\" class=\"d-flex flex-wrap\" style=\"transform-origin: left top;\">";

View File

@@ -56,6 +56,7 @@ namespace FakeDeck.Class
{".img", "application/octet-stream"}, {".img", "application/octet-stream"},
{".iso", "application/octet-stream"}, {".iso", "application/octet-stream"},
{".jar", "application/java-archive"}, {".jar", "application/java-archive"},
{".json", "application/json"},
{".jardiff", "application/x-java-archive-diff"}, {".jardiff", "application/x-java-archive-diff"},
{".jng", "image/x-jng"}, {".jng", "image/x-jng"},
{".jnlp", "application/x-java-jnlp-file"}, {".jnlp", "application/x-java-jnlp-file"},

View File

@@ -19,6 +19,9 @@
<None Update="StaticFiles\app.js"> <None Update="StaticFiles\app.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Update="StaticFiles\manifest.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="StaticFiles\style.css"> <None Update="StaticFiles\style.css">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>

View File

@@ -13,6 +13,10 @@ function urlencodeFormData(fd){
function resizeGrid(){ function resizeGrid(){
var width = document.body.clientWidth; var width = document.body.clientWidth;
var height = document.body.clientHeight; var height = document.body.clientHeight;
width = window.screen.availWidth;
height = window.screen.availHeight;
var biggerSizeW = (width / 7); var biggerSizeW = (width / 7);
var biggerSizeH = (height / 5); var biggerSizeH = (height / 5);
@@ -64,6 +68,8 @@ function formToAjax(){
const target = event.currentTarget; const target = event.currentTarget;
target.style.opacity = "0.5" target.style.opacity = "0.5"
navigator.vibrate(200);
console.log(target.method, target.action); console.log(target.method, target.action);
console.log(form.method, form.action); console.log(form.method, form.action);
console.log(form === target); console.log(form === target);

View File

@@ -0,0 +1,10 @@
{
"name": "FakeDeck",
"short_name": "FakeDeck",
"theme_color": "#fff",
"background_color": "#fff",
"display": "fullscreen",
"orientation": "landscape",
"scope": "/",
"start_url": "/"
}

View File

@@ -11,6 +11,50 @@ pages:
- name: Key - name: Key
value: "reinforce" value: "reinforce"
- button: flamethrower
function: HelldiversTwoMacro
parameters:
- name: Key
value: "flamethrower"
- button: anti-material
function: HelldiversTwoMacro
parameters:
- name: Key
value: "anti-material"
- button: spacer
function: FakeDeckMacro
parameters:
- name: Key
value: "spacer"
- name: Color
value: red
- button: spacer
function: FakeDeckMacro
parameters:
- name: Key
value: "spacer"
- name: Color
value: red
- button: spacer
function: FakeDeckMacro
parameters:
- name: Key
value: "spacer"
- name: Color
value: red
- button: spacer
function: FakeDeckMacro
parameters:
- name: Key
value: "spacer"
- name: Color
value: red
- button: strafing-run - button: strafing-run
function: HelldiversTwoMacro function: HelldiversTwoMacro
parameters: parameters:
@@ -52,20 +96,23 @@ pages:
parameters: parameters:
- name: Key - name: Key
value: bomb value: bomb
- button: spacer
function: FakeDeckMacro - button: full-screen
parameters:
- name: Key
value: "spacer"
- name: Color
value: orange
- button: spacer
function: FakeDeckMacro function: FakeDeckMacro
parameters: parameters:
- name: Key - name: Key
value: "full-screen" value: "full-screen"
- name: Color - name: Color
value: orange value: orange
- button: spacer
function: FakeDeckMacro
parameters:
- name: Key
value: "spacer"
- name: Color
value: orange
- button: spacer - button: spacer
function: FakeDeckMacro function: FakeDeckMacro
parameters: parameters:
@@ -73,6 +120,7 @@ pages:
value: "spacer" value: "spacer"
- name: Color - name: Color
value: red value: red
- button: spacer - button: spacer
function: FakeDeckMacro function: FakeDeckMacro
parameters: parameters:
@@ -80,6 +128,7 @@ pages:
value: "spacer" value: "spacer"
- name: Color - name: Color
value: red value: red
- button: spacer - button: spacer
function: FakeDeckMacro function: FakeDeckMacro
parameters: parameters:
@@ -87,13 +136,12 @@ pages:
value: "spacer" value: "spacer"
- name: Color - name: Color
value: red value: red
- button: spacer
function: FakeDeckMacro - button: orbital-380-barrage
function: HelldiversTwoMacro
parameters: parameters:
- name: Key - name: Key
value: "spacer" value: orbital-380-barrage
- name: Color
value: red
- button: page - button: page
function: FakeDeckMacro function: FakeDeckMacro
@@ -121,6 +169,8 @@ pages:
parameters: parameters:
- name: process - name: process
value: "cmd.exe" value: "cmd.exe"
- name: arguments
value: "/C ping google.com -t"
- name: image - name: image
value: "https://winaero.com/blog/wp-content/uploads/2019/06/WIndows-Terminal-icon.png" value: "https://winaero.com/blog/wp-content/uploads/2019/06/WIndows-Terminal-icon.png"

View File

@@ -124,6 +124,16 @@ Just add desired macros to `configuration.yaml` and start the application, tahn
- name: Key - name: Key
value: spacer value: spacer
``` ```
### Process Macro
```yaml
- button: cmd
function: ProcessMacro
parameters:
- name: process
value: "cmd.exe"
- name: arguments #Optional Proces Arguments
value: "/C ipconfig"
```
### Comon Macro Parameters ### Comon Macro Parameters
```yaml ```yaml
... ...