Jump to content


Photo

GUI - Creating guicode for login screen


4 replies to this topic

#1 freyk

freyk

    Member

  • Member
  • PipPip
  • 463 posts

Posted 29 May 2017 - 03:25 PM

As you maybe know, I am working on several GUIs for a scifi fm for the dark mod.
At this moment I am working on a loginscreen.
I would like that the player input is a word-string, instead of numbers.

So I would like to find a way to compare strings.
Is there a way to compare a string using an if-statement, instead of using a float (or a gui_param)?
Or do i have to use a script? please give an example.
Or do i just have to use numbers, floats and gui_param?
 
code in the spoiler
Spoiler

Edited by freyk, 29 May 2017 - 03:25 PM.


#2 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5149 posts

Posted 29 May 2017 - 03:58 PM

I guess you will need a script for this, as the gui does not provide a native implementation for this feature. I could take a look at this (if I don't forget it :) ).


FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#3 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5149 posts

Posted 01 June 2017 - 05:37 AM

So I have taken a look at it. It is possible to run a script when the OK button is pressed to compare the input to the desired password. The problem is that you can't use your keyboard to directly type the password. Unfortunately I haven't found a way to bypass this. It is possible in the menu (see savegame name field for example) and you can type if you call the gui via testgui, but it seems not possible ingame. :(


FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#4 freyk

freyk

    Member

  • Member
  • PipPip
  • 463 posts

Posted 05 June 2017 - 02:00 PM

Thanks for looking in to it.

 

I have not tested the gui ingame and not tested the keyboardinput correctly.

So i did not noticed that the keyboardinput not work. because the keys are used for playermovement.

Is there a way to disable them using a script?

And how does a script that compares editdef-text looks like?

 

As a workarounds

  • I can create a touchkeyboard, but touching in the credentials will take long.
  • i can  display the logininterface fullscreen (like the ingame mainmenu),
    but then the player loses the ingame atmosphere. (when like reading letters in Thief 1 til 3)

Or use two nummeric editdefs, 1 for the username and 1 for the password.


Edited by freyk, 05 June 2017 - 02:20 PM.


#5 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5149 posts

Posted 05 June 2017 - 03:36 PM

Touchkeyboard is fine. Fullscreen is not needed.

 

The text gets written to a gui parameter which can be accessed via script. Comparision is done using the script. If you need a demo I can set it up for you.


FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users