Quantcast
Channel: Questions in topic: "linux"
Viewing all articles
Browse latest Browse all 504

Enter and Return in TextField in Mac Not Working

$
0
0
I created a game which teaches the player how to navigate within the Linux file structure. The game works flawlessly on Windows with the Unity Web Player. (**Issue #1**) However, on a Mac, the commands are never "entered", i.e. although the player can insert a carriage return, it never carries out the command or even prints it in the history console. (**Issue #2**) Additionally, if anyone can offer advice on how to get this game working for Linux natively (WINE is not the best option) and I've done a "universal 32-64" build for Linux which did not work. The students use CentOS as their Linux distro. Play the game here: [File Fishing][1] function OnGUI () { GUI.skin = linuxSkin; GUI.Label (prefaceRect, preface, "command"); GUI.SetNextControlName("CommandLine"); command = GUI.TextField (commandLineRect, command, 30, "command"); GUI.FocusControl("CommandLine"); //create console area GUI.SetNextControlName("History"); scrollPosition = GUI.BeginScrollView (historyLogRect, scrollPosition, scrollViewRect); scrollViewRect.height = 17.5 * linesFed; GUI.Box(scrollBounds, ""); if (scrollViewRect.Contains(Event.current.mousePosition)) { if (Event.current.type == EventType.MouseDrag) { scrollPosition.y = Event.current.mousePosition.y; // Event.current.Use(); } } else { scrollPosition.y = scrollViewRect.height; } GUI.Label(scrollViewRect, history, "command"); previousCommand = command; GUI.EndScrollView (); if (Event.current.type == EventType.KeyUp && (Event.current.keyCode == KeyCode.Return || Event.current.keyCode == KeyCode.KeypadEnter || Event.current.character == '\n')) { scrollPosition.y = scrollViewRect.height; invalidCommand = false; subCommand = null; iter = 0; commandBrokenDown = false; i = 0; for (j=0; j

Viewing all articles
Browse latest Browse all 504


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>