首页 > 代码库 > CR开发笔记-5主界面GUI的进一步代码完善
CR开发笔记-5主界面GUI的进一步代码完善
新增代码
if (winID == 2) { GUILayout.BeginVertical("box"); GUILayout.Box("日记",GUILayout.Height(fullHeight/8)); GUILayout.BeginHorizontal("box"); if (GUILayout.Button("蓝光隧道I", GUILayout.Height(fullHeight / 5))) { Application.LoadLevel("BlueWayIscene"); } if(GUILayout.Button("蓝光隧道II", GUILayout.Height(fullHeight / 5))) { Application.LoadLevel("BlueWayIIscene"); } if(GUILayout.Button("蓝光隧道III", GUILayout.Height(fullHeight / 5))) { Application.LoadLevel("BlueWayIIIscene"); } if(GUILayout.Button("蓝光隧道IV", GUILayout.Height(fullHeight / 5))) { Application.LoadLevel("BlueWayIVscene"); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal("box"); if(GUILayout.Button("紫光星雨I", GUILayout.Height(fullHeight / 5))) { Application.LoadLevel("PurpleRainIscene"); } if(GUILayout.Button("紫光星雨II", GUILayout.Height(fullHeight / 5))) { Application.LoadLevel("PurpleRainIIscene"); } if(GUILayout.Button("紫光星雨III", GUILayout.Height(fullHeight / 5))) { Application.LoadLevel("PurpleRainIIIscene"); } if(GUILayout.Button("紫光星雨IV", GUILayout.Height(fullHeight / 5))) { Application.LoadLevel("PurpleRainIVscene"); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal("box", GUILayout.Height(fullHeight / 5)); if(GUILayout.Button("红光星河I", GUILayout.Height(fullHeight / 5))) { Application.LoadLevel("RedRainIscene"); } if (GUILayout.Button("红光星河II", GUILayout.Height(fullHeight / 5))) { Application.LoadLevel("RedRainIIscene"); } if(GUILayout.Button("红光星河III", GUILayout.Height(fullHeight / 5))) { Application.LoadLevel("RedRainIIIscene"); } if(GUILayout.Button("红光星河IV", GUILayout.Height(fullHeight / 5))) { Application.LoadLevel("RedRainIVscene"); } GUILayout.EndHorizontal(); GUILayout.EndVertical(); if (GUI.Button(rtLevelWinBtn,"关闭")) { stLevelWin = false; WindowsExist = false; } }
效果图如上
今日梗
众人皆说程序员好,赚得多死得早
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。