0

I'm Korean Highschool student. I made a game about the rules of Korean spelling. The program that I want is.. [ If you choose the correct answer, the graphic window will show the next question and the text window will say " Great job. " ] Is it impossible?

I want to add my codes. Unfortunately, I don't know how to add codes.

  • Controls.ButtonClicked= whichButton Sub whichButton clickedButton = Controls.LastClickedButton If clickedButton = butQuit Then Program.End() ElseIf clickedButton = butPlayGame then TextWindow.WriteLine("당신은 한국인이 아니군요.") ElseIf clickedButton = butMenu then createGameWindow1() ElseIf clickedButton = butStartGame then createGameWindow() ElseIF clickedButton = butPlayGame1 then TextWindow.WriteLine("한국어 공부에 분발하세요.") ElseIf clickedButton = butMenu1 then TextWindow.WriteLine("당신은 진정한 한국인입니다.") EndIf EndSub – Chay Kim Jul 21 '19 at 15:16
  • Sub setup gww = 1000 gwh = 800 GraphicsWindow.Width = gww GraphicsWindow.Height = gwh EndSub Sub createMainMenu GraphicsWindow.BackgroundColor = "Blue" GraphicsWindow.FontSize = 45 GraphicsWindow.DrawBoundText(350,100,300,"한글 맞춤법 문제") butStartGame = Controls.AddButton("문제풀기", 400,300) butQuit = Controls.AddButton("그만두기", 400, 500) EndSub – Chay Kim Jul 21 '19 at 15:17
  • Sub createGameWindow GraphicsWindow.Clear() GraphicsWindow.BackgroundColor = " Blue " GraphicsWindow.FontSize = 45 GraphicsWindow.DrawBoundText(350,100,300,"문제1") butPlayGame = Controls.AddButton("넌 나에게 뒤치닥거리일 뿐이야.",400,300) butMenu = Controls.AddButton("넌 나에게 뒤치닥꺼리일 뿐이야.", 400, 500) EndSub – Chay Kim Jul 21 '19 at 15:17
  • Sub createGameWindow1 GraphicsWindow.Clear() GraphicsWindow.BackgroundColor= " Green " GraphicsWindow.FontSize = 45 GraphicsWindow.DrawBoundText(350,100,300,"문제2") butPlayGame1 = Controls.AddButton("시답잖은 말은 필요없어요.",400,300) butMenu1 = Controls.AddButton("시덥잖은 말은 필요없어요.",400,500) EndSub setup() createMainMenu() – Chay Kim Jul 21 '19 at 15:17

2 Answers2

1

Yes, it's definitely possible. Just use TextWindow.WriteLine to show the Textwindow whenever.

showButton = Controls.AddButton("Show", 20, 20)
Controls.ButtonClicked = onButtonClicked

Sub onButtonClicked
  if Controls.LastClickedButton = showButton Then
    TextWindow.WriteLine("Button Clicked!")
    Shapes.Move(Shapes.AddText("Button Clicked!"), 20,50)
  EndIf
EndSub
Zock77
  • 951
  • 8
  • 26
0

Yes, I like coding in small basic and it is possible to show the text window and graphics window at the same time. You can use the following code to do this:

GraphicsWindow.Show()
TextWindow.Show()
CodeAlong
  • 1
  • 3