
22.05.2019, 15:56
|
|
Участник форума
Регистрация: 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...
|
|
|