Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Commit

Permalink
Fixed rendering char numbers.
Browse files Browse the repository at this point in the history
  • Loading branch information
adct-the-experimenter committed Jul 7, 2021
1 parent 4566142 commit 26bda8b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/sound_bank.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ std::array <std::string,10> filepath_textboxes;
char fileNameToLoad[512] = { 0 };
std::uint8_t current_file_button_edit = 0;



void SoundBank::DrawGui_Item()
{
//draw rectangle
Expand All @@ -76,8 +78,9 @@ void SoundBank::DrawGui_Item()
for(std::uint8_t i = 0; i < m_sound_accounts.size(); i++)
{
//draw account number
char num = *(std::to_string(i).c_str());
GuiTextBox((Rectangle){leftX,100 + i*30,20,25}, &num, 20, false);
char num[3];
strncpy ( num, std::to_string(i).c_str(), sizeof(num) );
GuiTextBox((Rectangle){leftX,100 + i*30,20,25}, &num[0], 20, false);
//draw textbox with name of sound and account number
if( GuiTextBox((Rectangle){leftX + 25,100 + i*30,100,25},
name_textboxes[i].char_name, 20, name_textboxes[i].name_box_pressed
Expand Down

0 comments on commit 26bda8b

Please sign in to comment.