Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Kiberchaika/juce_murka
https://github.com/Kiberchaika/juce_murka
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/Kiberchaika/juce_murka
- Owner: Kiberchaika
- Created: 2021-04-05T18:49:45.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-28T16:19:19.000Z (3 months ago)
- Last Synced: 2024-08-28T23:07:47.105Z (3 months ago)
- Language: C++
- Size: 206 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-juce - juce_murka - accelerated library inspired from ImGui for interactive audio plugin UI design for JUCE| |3|Β 1Β month<sub><sup>σ σ π’</sup></sub>| (UI)
README
# JUCE Murka
![](https://raw.githubusercontent.com/Kiberchaika/Murka/master/murka_logo.jpg?raw=true)Murka is a lightweight UI library aimed at a modern, rich, GPU-accelerated and highly interactive audio plugin UI design. It supports JUCE 7 but it's not dependent on it.
Inspired by ImGUI, it's an "immediate mode" UI. It means that it doesn't require you to design an explicit hierarchy, you write your draw and interaction code in a single draw thread, without managing the widgets lifecycle or input thread interaction with the draw thread.
Murka is designed to make it as easy as possible to create custom widgets with real-time feedback. It requires some knowledge of OpenGL to use it to the fullest but provides drawing functions for fonts and basic shapes.
## Overview
This repo is a submodule that you can add to your [JUCE](https://github.com/juce-framework/JUCE) project to use the [Murka](https://github.com/Kiberchaika/Murka)
UI library. Murka itself is added as a submodule here, so it makes sense to clone this with the `--recursive` option.## Quickstart
Add this module to your JUCE project, then you can subclass the `murka::JuceMurkaBaseComponent` and place all your Murka code in `draw()`.
### Like this:
```cpp
#pragma once#include
#include "juce_murka/JuceMurkaBaseComponent.h"class MainComponent : public JuceMurkaBaseComponent
{
public:
MainComponent() {
setSize(600, 400);
}void MainComponent::initialise() override {
JuceMurkaBaseComponent::initialise();// load font from Projucer's BinaryData.cpp
m.setFontFromRawData("InterRegular.ttf", BinaryData::InterRegular_ttf, BinaryData::InterRegular_ttfSize, 12);
}void draw() override {
m.clear(100, 100, 100);
if (m.prepare({ 10, 10, 150, 45 }).text("Button 1").draw().pressed) {
DBG("Button 1 pressed!");
}
if (m.prepare({ 10, 60, 150, 45 }).text("Button 2").draw().pressed) {
DBG("Button 2 pressed!");
}
}private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainComponent)
};```
### TODO
- Test and resolve linux target and uncomment the [linux tests](https://github.com/Kiberchaika/juce_murka/blob/main/.github/workflows/test.yaml#L31-L34)(c) 2024