gudboinero / primedkeys Goto Github PK
View Code? Open in Web Editor NEWA simple gui screen for point and click macros! Useful for people drawing on 2-in-1 laptops or if your computer pen doesn't work as intended.
License: MIT License
A simple gui screen for point and click macros! Useful for people drawing on 2-in-1 laptops or if your computer pen doesn't work as intended.
License: MIT License
Currently we have a system for our texture cache, using the file path to the texture plus all of the shader file paths concatenated together. We store that in a map, this ensures that apple.png
is different than apple.png
with shine.glsl
applied to it.
Lines 57 to 76 in 8ad9f16
It's quite clear that this is not efficient, it works for now, and that's all that matters. However eventually we will need this fixed if we would like to use more textures and shaders. Seeing as our keys will be at least 30-40 characters long each. Nobody wants that. It's called crap_hash
for a reason...
Create a module that reads data from a JSON file which would look like so:
[ // List of macro objects
{
"name": "undo", // Name of macro
"inputs": [ // List of key ups and key downs as well as scancodes
{
"key": 0, // Which key was pressed
"action": 0, // Up or down
}
]
},
{
"name": "redo",
"inputs": [ ... ]
}
]
Then through a function call. Allow calling a specific macro based on their name. RunMacro("path/to_my/file.json", "undo");
or something alike. This path to the json file should default to the pcs config files.
Config files will be something we work on later, for now we should just simulate the files being wherever we need them to be for testing purposes.
Bring the ShowMacroMenu
method into it's own file, inside src/gui
. Ensure it is within the gui
namespace.
Inside of the function MacroManager::LoadMacros
we need it to check whether or not the current Macro
we're reading isn't missing any keys or values.
If the file is incorrect- correctly assign values to the macro and rewrite the file. Make sure to only mess with values that are unset or not existing.
Should be able to do this myself. I want to put this inside of the repo's library folder.
Depending upon the users OS we may need to change things up a little bit.
Location of config files in project c++
macos - Application's data folder in mac
We need quick and clean access to all files within this folder. Create a module user_config.h
that allows for interaction between these folders. We need a method to return the absolute path to the users config folder. A method named GetConfigFolderPath
or alike would be perfect. We want the json
module to be easily interfaced with this.
We need to store the data within /etc/pk
Within C:Users%USERNAME%AppDataLocal/PrimedKeys
Within /Users/USERNAME/Library/Application Support/PrimedKeys
Make a new folder test
which holds a main file called test.h
, with a main function RunTests()
. That method should then allow for bundling up whatever methods that run tests in their own files inside of this main method.
This method should be run after initialization of the rendering framework.
Allow for the loading and displaying of another image file to display on top of the base button. Check images/buttons
. Possibly merge these two together within a texture to allow the modification via shader.
Ideally I would like to use any image from images/palettes
to swap out the colors for any widget or texture I'm using at the time. For right now I'm simply using my custom implementation of Dear ImGui's ImageButtonEx()
function. We use a special function utilizing a library stb_image.h
to load all of our textures. Inside of this function is where we need to allow for the color lookup table to be implemented.
We would replace the colors like so:
Ideally I would like this feature to allow for an input of a file path or some way to use any palette you want.
Later on it would be great to allow for more colors in one palette- since we will allow custom textures.
I figured in the future we may run into an issue with our applied shaders if we only return a texture based on the file path, which probably means we should find a way to make the cache allow for multiple textures of the same file based on what shaders are going to be applied.
In order for the macros on the MacroMenu to work correctly, the window focus must never be set to the MacroMenu, otherwise the macros will be run on it. We want the macros to run on the window that is currently focused. If I were on Chrome, and I pressed a button on the MacroMenu that ran the ctrl+w
macro- I want the focus to always stay on Chrome, this ensures that the macro will not run on the MacroMenu.
Using LoadTextureWithFile
every frame is not a good idea, it just floods clones of textures. So we only need to load the texture once.
Ideally move LoadTextureWithFile
into namespace tex
. We need to keep a map of the currently loaded textures, the keys should be the absolute paths of the files. Then we want the values being of type ImTextureID
.
// src/texture.h
namespace tex
{
// Might have to be reworked in the future due to the usage of the `LoadTextureFromFile` method.
// Since we are also going to apply our shader in that method, this might not be a great solution.
// We'll have to see later on.
ImTextureID GetTextureID(std::string file_path[])
{
// Check if our map has the file_path
// If so make sure the texture stored is valid (reload the texture if it is invalid)
// Return the texture id found in the map.
// If there is nothing found in the map, load the texture then store it within the map.
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.