| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
hpl3:community:scripting:terminal_basics [2015/11/10 06:12] valetheimpaler |
hpl3:community:scripting:terminal_basics [2015/11/10 07:15] (current) valetheimpaler |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Setting up a simple Terminal (Getting there) ====== | + | ====== Setting up a simple Station Terminal ====== |
| + | |||
| + | Check here >>[[https://www.frictionalgames.com/forum/thread-31645.html|www.frictionalgames.com/forum/thread-31645.html]]<< | ||
| To the people who actually have been waiting for this page's completion, I AM SO SORRY. I only recently got an actual internet connection so expect things to speed up in terms of page completion. Again, sorry for the wait, but the page has been expanded enough for you to add a text box! Check the 'Terminal still isnt shiny' section for details, and I'll add more later. | To the people who actually have been waiting for this page's completion, I AM SO SORRY. I only recently got an actual internet connection so expect things to speed up in terms of page completion. Again, sorry for the wait, but the page has been expanded enough for you to add a text box! Check the 'Terminal still isnt shiny' section for details, and I'll add more later. | ||
| Line 152: | Line 154: | ||
| </code> | </code> | ||
| - | The first line, ImGui_SetTransCategory sets the category used in your language file. If you use _fckg_QUOT__fckg_QUOT_ as the input which I have done, it will directly take string input for your functions. The next line actually initiates our window; it sets up its title, location, and sizing, while using our windowData class as a base. The ImGui_NrmPos(cVector3f()) and ImGui_NrmSize(cVector2f()) functions I will explain momentarily. The following line , ImGui_DoTextFrameExt, draws in a text box within our window. If your language category was set to _fckg_QUOT__fckg_QUOT_, then whatever you write in quotations will be the text displayed in the text box. If you set the language category to an actual category within your mod's lang file, then write the entry name within the quotes instead. The 3 0's I still need to look into, but the following textFrame value is the class we created earlier for our textbox. The ImGui_NrmPos and the ImGui_NrmSizeGroup I will now note on. | + | The first line, ImGui_SetTransCategory sets the category used in your language file. If you use " " as the input which I have done, it will directly take string input for your functions. The next line actually initiates our window; it sets up its title, location, and sizing, while using our windowData class as a base. The ImGui_NrmPos(cVector3f()) and ImGui_NrmSize(cVector2f()) functions I will explain momentarily. The following line , ImGui_DoTextFrameExt, draws in a text box within our window. If your language category was set to " ", then whatever you write in quotations will be the text displayed in the text box. If you set the language category to an actual category within your mod's lang file, then write the entry name within the quotes instead. The 3 0's I still need to look into, but the following textFrame value is the class we created earlier for our textbox. The ImGui_NrmPos and the ImGui_NrmSizeGroup I will now note on. |
| As mentioned above, there are some values inputted into the program named ImGui_NrmPos, ImGui_NrmSize, etc. NrmPos is the item's postion on the screen using a 3d vector input. Simply put, the first value, in a range of 0-1, is how offset the object's x coordinate is, with 0.5 being centered, 0 being at the exact left side, and 1 being at the very right edge. The second value within the is the object's y offset, with 0 at the top, 0.5 centered, and 1.0 at the bottom of the display. The third value is the layer; object with a value of 1 here draw in first, and object with a value of 2 second, and so on. (Keeping in mind that objects draw on top of each other, so drawing in second means the image will appear on top of whatever drew in first.) ImGui_NrmSize is the object's scaling relative to the screen, with the first value being how large it's x value will be and the second it's y. If you use NrmPosGroup or NrmSizeGroup, than the objects positioning or scale will be relative to whatever it is drawn to; so, if drawn within a window, it's size is based off of it's parent window instead of the overall screen. | As mentioned above, there are some values inputted into the program named ImGui_NrmPos, ImGui_NrmSize, etc. NrmPos is the item's postion on the screen using a 3d vector input. Simply put, the first value, in a range of 0-1, is how offset the object's x coordinate is, with 0.5 being centered, 0 being at the exact left side, and 1 being at the very right edge. The second value within the is the object's y offset, with 0 at the top, 0.5 centered, and 1.0 at the bottom of the display. The third value is the layer; object with a value of 1 here draw in first, and object with a value of 2 second, and so on. (Keeping in mind that objects draw on top of each other, so drawing in second means the image will appear on top of whatever drew in first.) ImGui_NrmSize is the object's scaling relative to the screen, with the first value being how large it's x value will be and the second it's y. If you use NrmPosGroup or NrmSizeGroup, than the objects positioning or scale will be relative to whatever it is drawn to; so, if drawn within a window, it's size is based off of it's parent window instead of the overall screen. | ||