Currently there is no programmatic way of toggling on / off. Note that Insert key while the default, may not be the actual. You can obtain the current key by calling the ssegui_control_key (int* dik); function accessible through the standard interface (look at the source code of ImGui for example how to obtain that interface).
Also note that the purpose of that key is to toggle on/off the capturing of Keyboard/Mouse events. Which means that if your mod don't need to handle any kind of input, for example you want to use ImGUI for HUD (health, stamina, etc.) you don't need to use it. Just register your render listener and it will be always drawn.
That's a shame, my mod idea requires getting user input for specific events and at some quest stages. I need to be able to pop up the GUI, get their input (not just text, but some file selection as well), and then continue on.
Guess I will be punishing myself trying to do that in the normal UI
As you wish! In any case, in order to use this mod UI you need a C++/SKSE plugin - MapTrack, Journal and Console are examples of using it. And if you are already in that domain, as you said, you can easily simulate a press key - that's the smallest of the problems (moreover this can be a feature to add to this mod).
I have an plugin that acts as a standard SKSE plugin and uses this library. Connecting the two code paths is the pain point.
I could select an "unusual" key and manually trigger it, but it's not an elegant solution, and it's not a solution that will scale to many mods using this plugin.
Perhaps I will do this and hope it motivates you to add a way to do this via the API Imagine 20 plugins all trying to use this library and having to fight each other over how to trigger the GUI >_<
Haha... certainly it will motivate me to enable programming capture. However, note that you do not need to set a custom control key (neither these hundred future plugins, lol), with that function you can read it only without setting it, see its comment - just pass a value outside the acceptable range, like -1 for example.
This is very cool. I'm making a mod that needs a custom UI and I REALLY don't want to work with Flash / Scaleform. This looks so much better. My only issue is that I need the UI to work in VR as well.
Do you think there will ever be the possibility of rendering the imgui menu inside the VR HMD in the 3D space? I briefly tried running this in SkyrimVR, but the insert key was only toggling the mouse on and off, no menu was displayed on either the HMD screens or the mirrored display.
It looks like some people have managed to render imgui in VR: https://github.com/ocornut/imgui/issues/1627. MageVR (https://www.nexusmods.com/skyrimspecialedition/mods/21297?tab=description) is the one Skyrim mod I know of that has displayed overlays in the HMD screen. The author said they used https://github.com/benotter/OVRLay to draw overlays in VR.
This is interesting problem, but I don't think I can help much with it. There is clearly few examples that use ImGui for rendering, but it seems they are using OpenGL and/or swapping the backend rendering. I think it is possible to be done, but I don't have headset to know what is going on even. A better approach would be to jump in that mod you linked.
You might want to consider adding adding Address Library for SKSE Plugins (https://www.nexusmods.com/skyrimspecialedition/mods/32444) to this and it's related requirements so that you don't go crazy with people asking about updates when the game inevitably gets updated.
Yeah, I was considering to add support to it in the upstream mod (SSE Hooks). See how it fits. So far, there are only 4 addresses sniffed in (world space, time and location) down the MapTrack and are optional in the Journal. Gladly for the last year and something these were not changed.
Looking to see if this mod is still active and if so, would I be able to create a follower stats gump for constant stat tracking?
Also wondering how flummoxed doing so would make someone who writes stories for fun so would constantly be tripping themselves up with grammar syntax instead of coding syntax?
"create a follower stats gump for constant stat tracking" - I understand this as an way to programatically access the follower's data and visualise it with this mod. Of this, I know only about the latter. Hence the bottleneck in your goal would be how to be able to access follower's data. If you are using C++/SKSE approach, it would be easier to visualise with this mod. If you are going with pure Papyrus approach - harder.
"syntax vs grammar" - does that mean you are not familiar with C++? If so, but you are familiar with programming in general you better use a template/example for your work. If you are not familiar with programming at all, you will need a good deal of patience and work. It would mean basically you have an idea, but no knowledge of how to achieve it.
Thanks for the info and quick reply! You're right, barely familiar with any coding so know it will be a headache to do. And since I write stories I have problems remembering not to do things like put spaces in console commands as well. Admit to trying to be humorous.
Thought it might be easier than it seems your answer indicates since mods like Floating Healthbars exist. But that only works while in combat which be another roadblock as well.
Look at that, ImGUI! I work at a major studio and a tier 1 AAA franchise and we use ImGUI for internal debugging lol... I use this everyday. Lots of potential running it over engine... I'm surprised it was uploaded in 2019 and it didn't get traction.
Haha... Aye, its a good GUI, I would use it too, if gonna dev my own renderer toy. I think it can be useful in a myriad of ways, but few things come to mind which are obstructions: the whole system I did is kinda of too modular/split and multiplied which is seen as bother by less familiar users, and its C++ (which I love), but many modders out there would like to avoid. Maybe it needs just a better examples, I did like two - a Journal book and a Map. There are 1-2 issues currently wrt the shader enhancers hookers and multiple screens, but nothing too major. The Map can be enhanced further with features. The source is open. So... there is a space for growing :)
I wonder if any crazy creations will be made. Like dynamically applying blood decals on your on some menus or just being able to edit the UI to your liking, it's annoying when I'm using 21:9 aspect ratio and 16:9 .swf files have to be converted to appear properly. Though it's probably not something that can be done right now.
Heya o/ Actually this mod is mostly transparent gateway to the ImGui land i.e. what you can do depends on that library itself. I mean read its docs, talk with its devs and stuff (I still learn it too btw). Saying that, it seems to work mostly with TGA files or pre-loaded textures and similar DX11 stuff. Currently in Skyrim you can hide the HUD, so if you have some ImGui widgets to replace/enhance them - would be great. Of course, the data to be put on these widgets has to be taken from somewhere, maybe native hooks or communication with Papyrus? I have one idea which I want to implement with that framework, not something big but can be nice starting point. So far my impression is good, hence I shared it here :) Also I wonder whether not to invest some effort and enable some weird scripting which can be used from within Papyrus, I know many people are not comfortable with writting SKSE plugins...
P.S. I should correct myself, the framework is texture agnostic, in our case as Skyrim is DX11, it uses ID3D11ShaderResourceView for pre-loaded textures. Good news is that I found a nice small utility to load DDS files and it seems working. I will add it later as extension to the API.
20 comments
Is it possible to trigger the GUI programmatically from a plugin? If so do you have an example of how to do this?
I have the demo working and have modified it to export functions for use in Papyrus, but I am stuck getting those functions to trigger sse-imgui.
I could fake an insert key press but I would rather avoid that :)
Currently there is no programmatic way of toggling on / off. Note that Insert key while the default, may not be the actual. You can obtain the current key by calling the ssegui_control_key (int* dik); function accessible through the standard interface (look at the source code of ImGui for example how to obtain that interface).
Also note that the purpose of that key is to toggle on/off the capturing of Keyboard/Mouse events. Which means that if your mod don't need to handle any kind of input, for example you want to use ImGUI for HUD (health, stamina, etc.) you don't need to use it. Just register your render listener and it will be always drawn.
Good luck!
Guess I will be punishing myself trying to do that in the normal UI
I could select an "unusual" key and manually trigger it, but it's not an elegant solution, and it's not a solution that will scale to many mods using this plugin.
Perhaps I will do this and hope it motivates you to add a way to do this via the API
Do you think there will ever be the possibility of rendering the imgui menu inside the VR HMD in the 3D space? I briefly tried running this in SkyrimVR, but the insert key was only toggling the mouse on and off, no menu was displayed on either the HMD screens or the mirrored display.
It looks like some people have managed to render imgui in VR: https://github.com/ocornut/imgui/issues/1627. MageVR (https://www.nexusmods.com/skyrimspecialedition/mods/21297?tab=description) is the one Skyrim mod I know of that has displayed overlays in the HMD screen. The author said they used https://github.com/benotter/OVRLay to draw overlays in VR.
You might want to consider adding adding Address Library for SKSE Plugins (https://www.nexusmods.com/skyrimspecialedition/mods/32444) to this and it's related requirements so that you don't go crazy with people asking about updates when the game inevitably gets updated.
So far, there are only 4 addresses sniffed in (world space, time and location) down the MapTrack and are optional in the Journal.
Gladly for the last year and something these were not changed.
Looking to see if this mod is still active and if so, would I be able to create a follower stats gump for constant stat tracking?
Also wondering how flummoxed doing so would make someone who writes stories for fun so would constantly be tripping themselves up with grammar syntax instead of coding syntax?
"create a follower stats gump for constant stat tracking" - I understand this as an way to programatically access the follower's data and visualise it with this mod. Of this, I know only about the latter. Hence the bottleneck in your goal would be how to be able to access follower's data. If you are using C++/SKSE approach, it would be easier to visualise with this mod. If you are going with pure Papyrus approach - harder.
"syntax vs grammar" - does that mean you are not familiar with C++? If so, but you are familiar with programming in general you better use a template/example for your work. If you are not familiar with programming at all, you will need a good deal of patience and work. It would mean basically you have an idea, but no knowledge of how to achieve it.
Regards.
You're right, barely familiar with any coding so know it will be a headache to do. And since I write stories I have problems remembering not to do things like put spaces in console commands as well. Admit to trying to be humorous.
Thought it might be easier than it seems your answer indicates since mods like Floating Healthbars exist. But that only works while in combat which be another roadblock as well.
Thanks for answering =]
I work at a major studio and a tier 1 AAA franchise and we use ImGUI for internal debugging lol... I use this everyday.
Lots of potential running it over engine... I'm surprised it was uploaded in 2019 and it didn't get traction.
Nearly limitlessssssssssss potential.
I wonder if any crazy creations will be made. Like dynamically applying blood decals on your on some menus or just being able to edit the UI to your liking, it's annoying when I'm using 21:9 aspect ratio and 16:9 .swf files have to be converted to appear properly. Though it's probably not something that can be done right now.
I remember Morrowind and S.T.A.L.K.E.R, and how they allowed for configuration of the UI in realtime, in game.
You might want to post what kind of image and element formats are supported to be imported?
P.S. I should correct myself, the framework is texture agnostic, in our case as Skyrim is DX11, it uses ID3D11ShaderResourceView for pre-loaded textures. Good news is that I found a nice small utility to load DDS files and it seems working. I will add it later as extension to the API.