[WIP] more Settings Manager

Discussion in 'Work-In-Progress Mods' started by gonzo4711, June 19, 2014.

  1. gonzo4711

    gonzo4711 Member

    Messages:
    21
    Likes Received:
    25
    This mod is a 'framework' for the settings VIEW and get the settings easier from the new API-System.

    Why creating this mod?
    After PAMM installation and activating a handfull mods, the Settings UI is crowded with settings of each mod. Sometimes you are searching for the correct setting a while until you'll see it. This is always annoying, so there should be a better solution for this.

    Alternatives?
    We know, it's getting easier to setup a custom settings-key, since the 'rSettingsManager' was created and updated to the new settings-API. BUT: Overview of the themed settings is still difficult - only modding development gets easier.

    What are the features?
    You can actually create two kinds of settings (DropDown and Slider) - yes, this is the same like the 'rSettingsManager' does, but now you can create TABS and SUBGROUPS for this settings as well! It is also compatible to the 'rSettingsManager', so you can use both at the same time... This mod will also recognize a change of settings after displaying the page - so you can append a setting while in runtime.

    Here is a quick info about the 'general' functions:
    Code:
    model.addSetting.dropDown(id,title,options,defaultIndex,tabName[,groupName]);
    model.addSetting.slider(id,title,minValue,maxValue,defaultValue,tabName[,groupName]);
    model.addSetting.text(id,title,defaultValue,tabName[,groupName]);
    
    model.extendSettings(tabName,groupName,extendData)
    settingHelper.getSetting(id[,tabName]);
    

    These functions are deprecated
    New Version with documentation can be found here: https://github.com/pamods/mods-gtc/tree/master/gtcSettingsManager/v2.0

    example1_final.png example2_final.png example3_final.png example4_final.png
    Last edited: August 3, 2014
    Fr33Lancer likes this.
  2. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    Gonzo4711, would you be willing to work with me to finish and extend this mod? It looks like a great start but there's a need right now for an easy and compatible way to add other types of settings to the settings menu. With your help I'd like to extend this mod to add those features. The main things that are needed are text boxes, buttons, and divs for custom settings controls. I started a discussion on writing a new mod for doing that here but Wondible told me about your mod and it looks like a perfect fit to fill this need.
    Fr33Lancer likes this.
  3. gonzo4711

    gonzo4711 Member

    Messages:
    21
    Likes Received:
    25
    Hey, yes that sounds very good - Ididn't upload this mod on PAMM, 'cause it seems that nobody need this extension until now.
    I don't think we need much time to extend this.
    Did you already read my 'docs' @ github?

    So let's start, what do you think we need to change / extend to this.
    I can easily add textboxes, buttons and so on, but first we should discuss about "div"-container - what do you think about this?
    Fr33Lancer likes this.
  4. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    ok, sweet!

    So first, I looked over your repo on GitHub and it looks like you have a ton of great documentation there. Could you move the repo over to our PA Mods group though? (I just added you to the group so you can make and edit repos at https://github.com/pamods.) That way I'll be able to push commits to the project and it's best if we keep projects like this there for easy access.

    Second, it looks like you actually have the base of what I meant by the custom div implemented with your "Add a custom field". Could you add an example for it though since it's not entirely clear how to build a correct sData?

    Is there anything you would like me to work on in this mod? Thanks for doing this! It should be a great help.
    Fr33Lancer likes this.
  5. gonzo4711

    gonzo4711 Member

    Messages:
    21
    Likes Received:
    25
    ok, cool, thx.
    First step is done.
    Now I'll update this mod for the latest PA-build and create new input elements (such as textboxes)...
    LavaSnake and Fr33Lancer like this.
  6. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    Thanks! Also, don't forget to copy the readme file over to the new repo and update the link you have in your first post.
  7. gonzo4711

    gonzo4711 Member

    Messages:
    21
    Likes Received:
    25
    Yes, thx! Readme and links are changed.
    I also finished working on this first version - you'll find it on github (see Link in first post).
    I created a 'examples' and 'sourcecode' folder.

    Maybe @LavaSnake you have time to test this today?
    (You will find all infos in the examples or documentation)
    LavaSnake and Fr33Lancer like this.
  8. gonzo4711

    gonzo4711 Member

    Messages:
    21
    Likes Received:
    25
    btw. I'm also working on some more features, these are the next steps:
    - settingMap: define a position (grid) for a setting.
    - buttons with callbackFunctions
    - labels, single-texts
    - more dynamic containers
    LavaSnake and Fr33Lancer like this.
  9. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    Wow, you sure work fast! This is looking great! I'd love to test it out but I won't have time until Sunday. When Sunday hits I'll download your latest copy and try using it to update my mods. That should sufficiently test this mod for both stability and ease of use. Thanks!
  10. gonzo4711

    gonzo4711 Member

    Messages:
    21
    Likes Received:
    25
    okay cool.
    In the meantime I'll work on the other features - maybe I'll finish them until sunday - we'll see...
  11. gonzo4711

    gonzo4711 Member

    Messages:
    21
    Likes Received:
    25
    Forget testing. The current build is working but I've created a very new system - so all old functions are deprecated and will not be available in the new version.
    But therefore there are a lot of new options and possibilities.

    More informations will follow soon...
  12. gonzo4711

    gonzo4711 Member

    Messages:
    21
    Likes Received:
    25
    Version 2.0. is synced to github right now.

    I wasn't able to complete the documentation, so this is still missing on github.
    I hope I can finish this on sunday.

    Here's a short info about the features:

    container:
    • tabs, subtabs, groups, items
    items:
    • selection,slider,textfield,text,button
    features:
    • hide/show single containers & items,
    • add/update/remove containers & items
    • format items to a grid (rows,columns)
    bugs:
    • there are some small PA-bugs that are fixed now (design, ui)

    BASIC EXAMPLE:
    Code:
    settingsManager.tab.add("test").item.add("testitem,"textfield",{title: 'Test item'});
    settingsManager.tab.assign("test")
    Code:
    settingsManager.tab.get("ui").item.add("testitem2,"text",{text: 'Hello world, this is a textexample with a lot of characters that are visible in a two-grid-column!'}).columns(2);

    This is still WIP but should already work...
    LavaSnake and Fr33Lancer like this.
  13. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    Nice! I can't wait to try this out!
  14. gonzo4711

    gonzo4711 Member

    Messages:
    21
    Likes Received:
    25
    Fr33Lancer likes this.
  15. Fr33Lancer

    Fr33Lancer Well-Known Member

    Messages:
    595
    Likes Received:
    288
    @Modders : Ready, steady, go ! :eek:
    gonzo4711 likes this.
  16. gonzo4711

    gonzo4711 Member

    Messages:
    21
    Likes Received:
    25
    Aaaaaand, also available on PAMM now ;)

    Feedbacks and BUG-reports are welcome!
    LavaSnake likes this.
  17. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    SWEET! I only have a day left until I'm out of town for a week so hopefully I can try this out and update at least one of my mods before then. If not I'll be sure to give this a spin when I get back.
    Fr33Lancer likes this.
  18. gonzo4711

    gonzo4711 Member

    Messages:
    21
    Likes Received:
    25
    I already found a BUG, that prevent other setting-plugins from working correctly.
    I'll fix this soon and will push an update on PAMM.
    LavaSnake and Fr33Lancer like this.
  19. gonzo4711

    gonzo4711 Member

    Messages:
    21
    Likes Received:
    25
    UPDATE: Version 2.1. is published on PAMM right now.
    This fixes a BUG with some callback-defaults and crashing behaviours with other mods.
  20. Fr33Lancer

    Fr33Lancer Well-Known Member

    Messages:
    595
    Likes Received:
    288
    I noticed that if I enable this Settings Manager (having the legacy one from @raevn disabled), I lose the settings from some mods which does not rely on any settings manager, like "auto factory", "instant sandbox", "hotbuild" (some options not being in its dedicated HOTBUILD tab) to name a few.

Share This Page