c# - Is there a function that waits for a button to be clicked instead of using the event function -
in windows forms, there function waits button clicked instead of using event function?
basically want continue piece of code in function after enter button has been clicked instead of taking me start of click event function. or there way tackle this?
okay sorry, edit: haven't written code story yet, have base classes , such, think of more interactive story, has linear style of game play follows story, have different functions control different parts of story, want every time enter button clicked continue story left of last. input
i build class called gamestate.
this state keep items displayed on single screen. graphics, text, title, etc.
then find way sequence multiple instances of gamestate object, simple option list<gamestate> read in textfile/database/config @ startup.
each time user presses button, move global counter forward 1 increment, , refresh game state screen.
this way button "does same thing" every time, because stored in separate class.
this separation of ui , data simplify many more things proceed.
Comments
Post a Comment