stillwwater / command_terminal

Unity Command Terminal: In-Game Console
MIT License
445 stars 60 forks source link

Mobile Device Support? #10

Open ofusion opened 6 years ago

Wokarol commented 6 years ago

I've just tested few things and it looks like it supports mobile very well, with just one exception... buttons for showing console are almost unclickable on FHD 5.1'' phone.

Wokarol commented 6 years ago

And some kind of auto-completion button for mobiles would be cool addition too

ofusion commented 6 years ago

I see all controls use KeyboradEvents, how it is usable on mobile device?

Wokarol commented 6 years ago

Simply tapping on input field brings up keyboard.

ofusion commented 6 years ago

Yes, I know that, but you should open terminal first, Normally I would like a special tap action on some specified screen position to open terminal rather then keep terminal showing all the time using "ShowGUIButtons" option.

stillwwater commented 5 years ago

I can't add a special tap action as it might interfere with controls on some games. You can implement custom functionality for enabling the console using Terminal.SetState:

void Start() {
    var terminal = GetComponent<Terminal>(); // Reference to terminal component

    terminal.SetState(TerminalState.OpenSmall); // Open small terminal window
    terminal.SetState(TerminalState.OpenFull);  // Open full terminal window
    terminal.SetState(TerminalState.Close);     // Close terminal window

    terminal.ToggleState(); // Shortcut for switching between opened and closed windows
}

And some kind of auto-completion button for mobiles would be cool addition too

I agree I'll look into this.

Wokarol commented 5 years ago

I think that adding GUI scaling for terminal would be good because on FHD Phone everything is small, and on QHD Phone (1440p) everything is barely readable