rmkit-dev / rmkit

| remarkable app framework | https://rmkit.dev
https://build.rmkit.dev
356 stars 32 forks source link

[feature] add settings UI builder #6

Open raisjn opened 4 years ago

raisjn commented 4 years ago

It should be easy for an app to save settings to disk and configure them from the UI. The UI configuration might be accomplished via simple widgets, while saving to disk can be in any form, as long as its robust

adbl commented 3 years ago

Has reading/writing settings gotten any further yet?

I have some ideas for iago I'd like to try implementing, snapping is my first candidate. So I'd add some menu/gui for the setting, as you wrote @raisjn. But I'm not sure what is an approprate way/place to store it?

raisjn commented 3 years ago

there is a simple config parser that remux uses that can be used for reading config files. for settings UI, we have "toggled state" buttons that can reflect that config reasonably easily. i can try to put together a demo on the weekend for tying config to toggled button

adbl commented 3 years ago

Such demo would be grand!

I saw something about a slider example, so I would probably want to extend configuration to use that if possible.

I'm excited about hacking my remarkable but feel like 10 years away from cpp/linux, so it will be quite a lot to wrap my head around.

What about app state, if I wanted to, what would be a conventional way/place to store it?

raisjn commented 3 years ago

it looks like you ramped up on cpp/cpy quickly!

for settings / state, are you looking for something that can save to disk or just how to make state for an instance of iago? there is naive code for reading from config file but no code for saving back to file. we also have app state code (see src/harmony/app/state.cpy and places that use STATE variable)

adbl commented 3 years ago

A config file like the one used by remux would work well I think, just that I need to write to it as well, I'll get there eventually. I'll have a look at the state code from Harmony but I don't think it needs to be very fancy.