Показать сообщение отдельно

  #3  
Старый 22.05.2019, 15:56
_=Gigant=_
Участник форума
Регистрация: 19.01.2017
Сообщений: 130
С нами: 4901705

Репутация: 98
По умолчанию

C++:





Код:
std
::
ifstream readfile_shet
;
std
::
string shet_filename
;
char
reading_file_get
[
256
]
;
snprintf
(
reading_file_get
,
sizeof
(
reading_file_get
)
,
"%s\\"
M0D_FOLDER
"%s"
,
g_szWorkingDirectory
,
"text.txt"
)
;
readfile_shet
.
open
(
reading_file_get
)
;
while
(
std
::
getline
(
readfile_shet
,
shet_filename
)
)
{
ImGui
::
Text
(
shet_filename
.
c_str
(
)
)
;
ImGui
::
SameLine
(
)
;
if
(
ImGui
::
Button
(
"Say"
,
ImVec2
(
50.0f
,
20.0f
)
)
)
{
say
(
"%s"
,
shet_filename
.
c_str
(
)
)
;
}
}
readfile_shet
.
close
(
)
;


when I click on the first button 'Say' it only shows text which is in the first line when i click on buttons which are on the other lines nothing shows how to make it to go through all lines ? it only gets first line...
 
Ответить с цитированием