PDA

View Full Version : Reload, show console, and save by code



Tommycore
March 27th, 2020, 10:23
Hi!

I'm working on a little extension to ease live for us developers. The minimum viable product is a basic window with three buttons: Reload, Console, and Save. Each button can be clicked and/or drag and dropped onto the hotbar. I got the window and drag and drop functionality so far. Works like a charm. But I can't, for the live of me, find a way to execute these functions by code. Calling for the execution of a slashhandler doesn't work, and I found forum posts supporting that it's impossible. I also can't find functions to call via code to do those things. It seems the slashhandlers call some function within the FG app. And thanks to autosaving there doesn't seem to be a button for manual saving, which I could look at to reproduce.

Been searching the forums, the reference, the dev guide, and CoreRPG to no avail, so now I want to ask the experts.

Also -is there a way to structure dragdata for the hotkeybar to set a command with a different label text? If I drag /reload from the chat window onto the hotkeybar, rightclick the slot, and click "Edit Label", I can rename the slot, while clicking it still calls the slash command. I want to achieve that. Not as important as getting the buttons to work, but would be nice.


Thank you all!

damned
March 27th, 2020, 10:33
I have f1, f2 and f3 setup for those three /handlers

Tommycore
March 27th, 2020, 10:49
I know. I watched your videos. Which were my entry point for getting into modifying FG btw. Thank you. Unfortunately this doesn't help me in the development of the extension. I mean, it's not like that's a huge deal, after all you can just put the commands manually into the hotkeybar. But I thought it would be nice to have something for making it easier.