Community Forum

Menu creation textBoxField

Forum Overview >> Scripting

Created28.08.2015 14:18

Dirk Peeters (Unknown) 28.08.2015 14:45
- i was wondering if its posible true script to create a input text field to be linked to a string variable.
same when you first run the game and need to insert the productkey.

also witch files best use as a example as the video tutorial seems to not work, outputs nil all the time

i got a menu created in photoshop that i want to load in the game as menu not hud, same as when hitting esc.
but i'm missing some elements i think. and could not directly find examples

- tutorial
self.overlay = path to the file and prints correct output
overlayId = createOverlay("overlay", self.overlay); for example

- teststuff
this works but pictures are shown very bad, blurry size used 1024/512(panel) and 64/64 (buttons)
self.medium = createImageOverlay(mediumFile); = Overlay:new(nil,fbs, 0.220, 0.220, 1/2, 1/2);; -- guiDir = nil, self.panelHud = ok
for i = 1 , self.buttonsCount do
renderOverlay(self.small, self.buttonsPos[i].x, self.buttonsPos[i].y, self.buttonWidth, self.buttonHeight);
- is missing elements, player still moves

if then = false;
InputBinding.wrapMousePositionEnabled = false; -- was false
g_currentMission.ingameMap.isVisible = false;
if (g_currentMission.player.isEntered) then
g_currentMission.player.isFrozen = true;
else = true;
g_currentMission.ingameMap.isVisible = true;
if (g_currentMission.player.isEntered) then
g_currentMission.player.isFrozen = false;


Emil Drefers (Unknown) 31.08.2015 07:56

creating GUI element which can handle "text input" is defenitely possible, just like in the setup menu where you can yourr player/nick name.

But, you're right the tutorials don't cover that topic - they also do not cover scripting for obvious reasons.

Well, I can't help that much because this is a larger task ... first you would have to think about a way to handle and display the input when the user presses/activates the text input.
But before you should get conformtable with the overlay stuff (I think you did already, just mentioning it ;) )


Dirk Peeters (Unknown) 31.08.2015 08:53
Hi Emil,
i understand, and its complete normal not all is public. thats wy i got a question directly to you, could i contact you privated, outter this forum. also for the same reason to keep the project a bit private.

a complete new animalSystem, i'm working on it very hard to let the player do more with the animals.
but i could not say to mutch on the public forums.

ps: the menu stuff is only option, not a must have in my mod.


Emil Drefers (Unknown) 01.09.2015 06:53

well, in general i would have to say that any question might be interesting for other modders too.
So it should be put/asked in a forum to let more people take advantage of it.

Also I can't tell you more in private about the other scripts in FS than right here.

But if you're not willing to give up, just write me a pm on the official forum ... I guess you know my modding nick name already ;)


Note: Log in to post. Create a new account here.