Terminal doesn't like to show up. - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: SOMA (https://www.frictionalgames.com/forum/forum-55.html) +--- Forum: User created content (https://www.frictionalgames.com/forum/forum-79.html) +---- Forum: Technical Support (https://www.frictionalgames.com/forum/forum-80.html) +---- Thread: Terminal doesn't like to show up. (/thread-32416.html) |
Terminal doesn't like to show up. - mysteryman141 - 11-28-2015 So i've tried to create a terminal (the second one in my map) and the first one works fine but the second one flat out doesn't render anything. Sometimes it renders the text for about a millisecond and then goes back no nothing. My code is the exact same except for the method title. I can't figure this out. I'm using the model "computer_panel_medium_GUI.ent". RE: Terminal doesn't like to show up. - Abion47 - 11-28-2015 What is the wording in the terminals' respective OnGui callback fields in the level editor, and what is the code for your GUI functions? RE: Terminal doesn't like to show up. - mysteryman141 - 11-29-2015 Working Gui computer_structurecontrol_1_OnGui void computer_structurecontrol_1_OnGui(const tString&in asEntityName, float afTimeStep) { cImGuiLabelData labelText; cImGuiLabelData labelNumber; labelText.mFont.mvSize = cVector2f(50, 50); labelNumber.mFont.mvSize = cVector2f(50, 50); //labelNumber.mColorText = cColor(0.9, 0.25, 0.15, 1.0); ImGui_DoLabelExt("Air Quality", labelText, cVector3f(160, 180, 0)); ImGui_DoLabelExt("86%", labelNumber, cVector3f(220, 230, 0)); } Non working security_terminal_OnGui void security_terminal_OnGui(const tString&in asEntityName, float afTimeStep) { cImGuiLabelData labelText; labelText.mFont.mvSize = cVector2f(50, 50); ImGui_DoLabelExt("test", labelText, cVector3f(160, 180, 0)); } RE: Terminal doesn't like to show up. - Abion47 - 11-29-2015 Running that code results in two working terminals on my end. Spoiler below!
Check your other terminal settings. These are the values I have as default: Code: OnGuiFunction: "security_terminal_OnGui" Is there any other code interacting with your terminal entities? RE: Terminal doesn't like to show up. - mysteryman141 - 11-29-2015 (11-29-2015, 07:23 PM)Abion47 Wrote: Running that code results in two working terminals on my end. I made sure the settings were the same and I put a debug message in the method and it prints to the debug console many times a second. I guess I should mention the working terminal use the model computer_structurecontrol.ent and the non-working one uses computer_panel_medium_GUI.ent RE: Terminal doesn't like to show up. - Abion47 - 11-30-2015 (11-29-2015, 11:26 PM)mysteryman141 Wrote: I made sure the settings were the same and I put a debug message in the method and it prints to the debug console many times a second. I guess I should mention the working terminal use the model computer_structurecontrol.ent and the non-working one uses computer_panel_medium_GUI.ent That shouldn't really matter, but in this case for my demo I used computer_panel_medium_GUI for both terminals, so the issue isn't with the entity itself. (Unless you've tried to edit the entity file, that is.) Would you mind sending me a PM with a zip of the whole map file? I'm running out of ideas of what it could possibly be, and I'm starting to suspect that it might be a simple error with how the map files were saved or something. Okay, I think I know what's going on. Something in either your script or in one of the world entities is overriding your TransCategory and not resetting it back. When I changed the terminal code to the following it started working for me: Code: void panel_OnGui(const tString&in asEntityName, float afTimeStep) RE: Terminal doesn't like to show up. - mysteryman141 - 11-30-2015 (11-30-2015, 01:26 AM)Abion47 Wrote:Hey it works! Thanks so much for your help!(11-29-2015, 11:26 PM)mysteryman141 Wrote: I made sure the settings were the same and I put a debug message in the method and it prints to the debug console many times a second. I guess I should mention the working terminal use the model computer_structurecontrol.ent and the non-working one uses computer_panel_medium_GUI.ent |