Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Terminal doesn't like to show up.
mysteryman141 Offline
Junior Member

Posts: 17
Threads: 9
Joined: Nov 2015
Reputation: 0
#1
Terminal doesn't like to show up.

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".
11-28-2015, 01:13 AM
Find
Abion47 Offline
Senior Member

Posts: 369
Threads: 22
Joined: Oct 2015
Reputation: 46
#2
RE: Terminal doesn't like to show up.

What is the wording in the terminals' respective OnGui callback fields in the level editor, and what is the code for your GUI functions?
11-28-2015, 05:07 PM
Find
mysteryman141 Offline
Junior Member

Posts: 17
Threads: 9
Joined: Nov 2015
Reputation: 0
#3
RE: Terminal doesn't like to show up.

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));

}
11-29-2015, 03:12 AM
Find
Abion47 Offline
Senior Member

Posts: 369
Threads: 22
Joined: Oct 2015
Reputation: 46
#4
RE: Terminal doesn't like to show up.

Running that code results in two working terminals on my end.
Spoiler below!
[Image: ?interpolation=lanczos-none&output-forma...olor=black]

Check your other terminal settings. These are the values I have as default:

OnGuiFunction: "security_terminal_OnGui"
EnterCallback: ""
LeaveCallback: ""

ShowMouse: Checked
AllowInteraction: Unchecked
UpdateWhenOutOfView: Unchecked
GuiActive: Checked

CacheAtScreenSize: 0.05f
PlayerPosEntity: ""
FPSWhenIdle: 30

TerminalColorMul: White
TerminalBrightness: 1
VerticalFOV: 70

Is there any other code interacting with your terminal entities?
11-29-2015, 07:23 PM
Find
mysteryman141 Offline
Junior Member

Posts: 17
Threads: 9
Joined: Nov 2015
Reputation: 0
#5
RE: Terminal doesn't like to show up.

(11-29-2015, 07:23 PM)Abion47 Wrote: Running that code results in two working terminals on my end.
Spoiler below!
[Image: ?interpolation=lanczos-none&output-forma...olor=black]

Check your other terminal settings. These are the values I have as default:

OnGuiFunction: "security_terminal_OnGui"
EnterCallback: ""
LeaveCallback: ""

ShowMouse: Checked
AllowInteraction: Unchecked
UpdateWhenOutOfView: Unchecked
GuiActive: Checked

CacheAtScreenSize: 0.05f
PlayerPosEntity: ""
FPSWhenIdle: 30

TerminalColorMul: White
TerminalBrightness: 1
VerticalFOV: 70

Is there any other code interacting with your terminal entities?

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
(This post was last modified: 11-29-2015, 11:28 PM by mysteryman141.)
11-29-2015, 11:26 PM
Find
Abion47 Offline
Senior Member

Posts: 369
Threads: 22
Joined: Oct 2015
Reputation: 46
#6
RE: Terminal doesn't like to show up.

(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:

void panel_OnGui(const tString&in asEntityName, float afTimeStep)
{
    cLux_AddDebugMessage("screen");
    cImGuiLabelData labelText;
        
    labelText.mFont.mvSize = cVector2f(50, 50);

    ImGui_SetTransCategory("");
    ImGui_DoLabelExt("test", labelText, cVector3f(160, 180, 0));
}
(This post was last modified: 11-30-2015, 02:08 AM by Abion47.)
11-30-2015, 01:26 AM
Find
mysteryman141 Offline
Junior Member

Posts: 17
Threads: 9
Joined: Nov 2015
Reputation: 0
#7
RE: Terminal doesn't like to show up.

(11-30-2015, 01:26 AM)Abion47 Wrote:
(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:

void panel_OnGui(const tString&in asEntityName, float afTimeStep)
{
    cLux_AddDebugMessage("screen");
    cImGuiLabelData labelText;
        
    labelText.mFont.mvSize = cVector2f(50, 50);

    ImGui_SetTransCategory("");
    ImGui_DoLabelExt("test", labelText, cVector3f(160, 180, 0));
}
Hey it works! Thanks so much for your help!
11-30-2015, 11:05 PM
Find




Users browsing this thread: 1 Guest(s)