Thread: Sidebar setup

  1. #1

    Sidebar setup

    I just had some time to work again and finished up some class work I was doing. Prior to starting on the next Character sheet page, decided would FINALLY replace the default CoreRPG look NPC/Story/Characters etc buttons.

    I liked the simple look in 2E so figured I'd start with that and reskin later when get to UI customization part.
    Thing is, I am lost. I found in data_library_5E for example where aRecords sets up the things like ["npc"] and that selects the background in the aDisplayIcon and of course does stuff like popup buttons/filters etc. But while I found the button, I am not sure how the TEXT/font get selected?

    I decided to look for "NPCs" (case sensitive since it's what is displayed) and I only found the one instance in CoreRPG (and PFRPG2/SFRPG) where it is defined (library_recordtype_label_npc) but no where where it is referenced in any ruleset I have.

    So, how do you get the text to put in the NPC side button? (and the font?)

    Thanks,
    Vars

  2. #2
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    18,604
    Blog Entries
    1
    Quote Originally Posted by Varsuuk View Post
    I just had some time to work again and finished up some class work I was doing. Prior to starting on the next Character sheet page, decided would FINALLY replace the default CoreRPG look NPC/Story/Characters etc buttons.

    I liked the simple look in 2E so figured I'd start with that and reskin later when get to UI customization part.
    Thing is, I am lost. I found in data_library_5E for example where aRecords sets up the things like ["npc"] and that selects the background in the aDisplayIcon and of course does stuff like popup buttons/filters etc. But while I found the button, I am not sure how the TEXT/font get selected?

    I decided to look for "NPCs" (case sensitive since it's what is displayed) and I only found the one instance in CoreRPG (and PFRPG2/SFRPG) where it is defined (library_recordtype_label_npc) but no where where it is referenced in any ruleset I have.

    So, how do you get the text to put in the NPC side button? (and the font?)

    Thanks,
    Vars
    Look at the Curse of Strahd theme extension.

    MoreCore - Generic Ruleset
    --- Projects ---
    Extensions | Tutorials | MoreCore | MoreCore Themes | Call of Cthulhu | Maelstrom | FG Con

  3. #3
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Denver, Colorado, USA (for a bit)
    Posts
    22,629
    Quote Originally Posted by Varsuuk View Post
    So, how do you get the text to put in the NPC side button? (and the font?)
    Normal FG theme sidebar buttons are 100% graphics, with the Name/label embedded in the graphic. Look in the ruleset graphics directory.


    FG Product Development status: Pathfinder Playtest Ruleset and add-ons: In development. Pathfinder Bestiary, Pathfinder Bestiary 2, Pathfinder Bestiary 3 (in store).

    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  4. #4
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    18,604
    Blog Entries
    1
    The 2E ruleset uses the Curse of Strahd menu system.

  5. #5

    Join Date
    May 2016
    Location
    Jacksonville, FL
    Posts
    1,697
    Blog Entries
    7
    From the CoS theme (tweaked to go into extension.xml rather than a separate .lua file):

    Code:
    <script name="sidebar_buttontext">
    	function onInit()
    		DesktopManager.showDockTitleText(true);
    		DesktopManager.setDockTitleFont("sidebar");
    		DesktopManager.setDockTitleFrame("", 25, 2, 25, 5);
    		DesktopManager.setDockTitlePosition("top", 0, 16);
    		DesktopManager.setStackIconSizeAndSpacing(47, 27, 3, 3, 4, 0);
    		DesktopManager.setDockIconSizeAndSpacing(100, 30, 0, 4);
    		DesktopManager.setLowerDockOffset(2, 0, 2, 3);
    	end
    </script>

  6. #6
    Thanks, going to look at this in a bit - been busy with family stuff since work. I was confused since I DID expect the image/graphic together at first then when saw it was just two backgrounds, figured there was a load resource somewhere and couldn't find it. (That's why searched the terms I mentioned above.)

  7. #7
    I'm real sorry guys to rehash and be thick about it.

    Decided to basically copy Celestian's UI sidebar to get it in the right "shape" for later tweaking/skinning but I can't seem to get there. I looked at the Strand ext that was the basis of what Celestian used but that also left me confused.

    Other than the set calls in the data_library_com.lua file I don't see any other code and wondered how the labels are put on the buttons? And sure enough, my try results in labelers buttons. I tried searching for words like NPCs in string but didn't find the right thing.

    Any clue what obvious step I am missing that gets me to this step with non-labeled buttons?

    Screen Shot 2019-06-15 at 7.50.06 PM.png

    I'm in Binghamton, about to pass out at 8PM because of long day taking son to camp then driving then shopping. Collapsed at hotel intending to code but too tired and couldn't be enthused due to lack of progress. I'll have a couple hours in the AM before driving to getting him so maybe I'll get a tip before the.

    I am certain with the two example I should be able to see how the labeling works, especially the small ext, but nope I'm being thick here.
    Last edited by Varsuuk; June 16th, 2019 at 01:21.

  8. #8

    Join Date
    May 2016
    Location
    Jacksonville, FL
    Posts
    1,697
    Blog Entries
    7
    I went thru the same confusion a month or whatever ago making the 2E theme 'generic' so I could use it in Savage Worlds (don't ask). I'm at work for several more days with no access to scripts to look through, but the first line of the codeblock I copied above DesktopManager.showDockTitleText(true); is what toggles the text labels on/off.

    The default label text itself set with a string value (most likely in the strings.xml file for a ruleset). Take a look at CoreRPG strings/data_library.lua and look how sDisplayText is used. I think in the initialize() function it sets up where any string using the form library_recordtype_label_ pulls the appended value into the table and stores its text value for that button's tooltip there (ie. the sDisplayText value).
    Last edited by Talyn; June 16th, 2019 at 01:32.

  9. #9
    I just edited the COS ext to make it load for CoreRPG to do a minimal check and it worked. So I searched for the library_recordtype_label_charsheet string and found it in strings.xml which let me know that it must as you said above figure out what goes where based on names.

    Thing now for me to see is what I am messing up in naming that makes the names not match. So now will look for those suffices "char sheet", "battles", "backgrounds" etc. Yeah, I want to sleep but was bugging me

    I'll look at what you mentioned in data_library.lua next, thanks!

  10. #10
    Busting my head and what I forgot was adding the custom fonts.xml file to the base.xml. Until then I wasn't using any of the customers fonts defined there and I am doing a minimalist (where I can figure it out) from clean empty file borrowing or adding only what I need as I need it. Bah... forgot the FILE hadn't been added so writing in the file was ignored

    Still have one problem with Classes using the old core icon (albeit shrunk shape of others) for some reason. Bet that will be simple.


    AWESOME: Found the duplicate definition and it is all fixed now. I'll wait to merge it tomorrow so I don't make a mistake closing off the topic branch in git. Dead sleepy but a nice woot since while it is still identical to AD&D and direct copy, it looks better with where I am going than the shields of the CoreRPG so it doesn't distract me any more.

    Thanks to all 4 of ya
    Last edited by Varsuuk; June 16th, 2019 at 02:11.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Log in

Log in