-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
Changelog: Allows the user to make their own board. Please report any problems you have to me.
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
using UnityEngine; | ||
using UnityEngine.UI; | ||
using System.Collections; | ||
|
||
public class ButtonNameChanger : MonoBehaviour { | ||
|
||
public ButtonTextHolder buttonTextHolder; | ||
public InputField[] inputField = new InputField[16]; | ||
int i = 0; | ||
bool finishedNames = false; | ||
// Use this for initialization | ||
void Start () { | ||
while (!finishedNames) | ||
{ | ||
if (i < 15) | ||
{ | ||
inputField[i].text = buttonTextHolder.buttontexts[i]; | ||
i++; | ||
} | ||
else if (i == 15) | ||
{ | ||
inputField[i].text = buttonTextHolder.buttontexts[i]; | ||
break; | ||
} | ||
} | ||
} | ||
public void ChangeTheText() | ||
{ | ||
i = 0; | ||
while(!finishedNames) | ||
{ | ||
if (i < 15) | ||
{ | ||
buttonTextHolder.buttontexts[i] = inputField[i].text; | ||
i++; | ||
} | ||
else if (i == 15) | ||
{ | ||
buttonTextHolder.buttontexts[i] = inputField[i].text; | ||
break; | ||
} | ||
} | ||
} | ||
// Update is called once per frame | ||
void Update () { | ||
|
||
} | ||
|
||
public void OnValueChanged(int idOfOption) | ||
{ | ||
if (idOfOption == 1) | ||
{ | ||
Application.Quit(); | ||
|
||
} | ||
if (idOfOption == 2) | ||
{ | ||
Application.LoadLevel(2); | ||
|
||
} | ||
if (idOfOption == 3) | ||
{ | ||
Reset(); | ||
|
||
} | ||
} | ||
public void Reset() | ||
{ | ||
/** | ||
bool resetDone = false; | ||
int i = 0; | ||
while (!resetDone) | ||
{ | ||
buttons[i].enabled = true; | ||
buttons[i].interactable = true; | ||
i++; | ||
if(i > 16) | ||
{ | ||
resetDone = true; | ||
} | ||
}*/ | ||
Application.LoadLevel(0); | ||
} | ||
|
||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using UnityEngine; | ||
using System.Collections; | ||
|
||
public class ButtonTextHolder : MonoBehaviour { | ||
public string[] buttontexts = new string[16]; | ||
// Use this for initialization | ||
void Start () { | ||
|
||
} | ||
|
||
// Update is called once per frame | ||
void Update () { | ||
|
||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[buttontext] | ||
0=Do One Thing | ||
1=Wirus | ||
2=Doublu Doublu Doublu | ||
3=Stopped Services | ||
4=Seure Server | ||
5=Sir/Ma'm | ||
6=firewall | ||
7=One Time Charge | ||
8=Network Security | ||
9=Microsoft Certified | ||
10=Level 3/5/10 technician | ||
11=Windows + R | ||
12=cmd | ||
13=hh h | ||
14=Errors and Warnings | ||
15=Notepad |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
25;0;131073;-1 | ||
5;0;6;-1 |