I need to add the names of the players in of my game in my gui.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Okay so I am trying to use the input function.......
%x=input('Put the name of player 1:')
and then
set(handles.uipanel1,'title','x')
%assuming I want to change panel 1's title to the players name..... When I enter the name for player 1 in the comand window it says undefined function or variable......
Any suggestions??
0 Kommentare
Akzeptierte Antwort
Paulo Silva
am 8 Sep. 2011
x=input('Put the name of player 1:','s'); %choose input as string
set(handles.uipanel1,'title',x) %set the value of x as title
3 Kommentare
Paulo Silva
am 8 Sep. 2011
If one axes is on hold you can add many objects to it, they become children of that axes, use the line function to draw something
h=line(...
if you want to just move the line
set(h,'XData',newXdata,'YData',newYdata)
Walter Roberson
am 8 Sep. 2011
As this is image on image, to move one of the images, set() the XData and YData property for it. See the documentation for the image() function.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Strategy & Logic finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!