Skip to content

Commit

Permalink
ui changes part 1
Browse files Browse the repository at this point in the history
  • Loading branch information
NarrikSynthfox committed Apr 12, 2024
1 parent a8a3e96 commit 23a796b
Show file tree
Hide file tree
Showing 5 changed files with 700 additions and 576 deletions.
Binary file added Encore/Assets/fonts/Rubik-Regular.ttf
Binary file not shown.
5 changes: 5 additions & 0 deletions Encore/include/game/assets.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ class Assets {
Texture2D emitTextureOD;
Model liftModel;
Model liftModelOD;

Font rubik;

//Sound clapOD;
void loadAssets(std::filesystem::path directory) {
smasherReg = LoadModel((directory / "Assets/highway/smasher.obj").string().c_str());
Expand Down Expand Up @@ -133,6 +136,8 @@ class Assets {
liftModel.materials[0].maps[MATERIAL_MAP_ALBEDO].color = Color{ 172,82,217,127 };
liftModelOD = LoadModel((directory / "Assets/notes/lift.obj").string().c_str());
liftModelOD.materials[0].maps[MATERIAL_MAP_ALBEDO].color = Color{ 217, 183, 82 ,127 };

rubik = LoadFontEx((directory / "Assets/fonts/Rubik-Regular.ttf").string().c_str(), 100, 0, 0);
//clapOD = LoadSound((directory / "Assets/highway/clap.ogg").string().c_str());
//SetSoundVolume(clapOD, 0.375);
}
Expand Down
2 changes: 2 additions & 0 deletions Encore/include/game/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,8 @@ class Settings {
overdriveControllerMember->value.SetInt(controllerOverdrive);
rapidjson::Value::MemberIterator overdriveControllerDirMember = settings["controllerbinds"].FindMember("overdrive_direction");
overdriveControllerDirMember->value.SetInt(controllerOverdriveAxisDirection);
rapidjson::Value::MemberIterator controllerTypeMember = settings["controllerbinds"].FindMember("type");
controllerTypeMember->value.SetInt(controllerType);

char writeBuffer[8192];
FILE* fp = fopen(settingsFile.string().c_str(), "wb");
Expand Down
10 changes: 7 additions & 3 deletions Encore/include/song/song.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,13 @@ class Song
public:
bool midiParsed=false;
std::string title;

float titleXOffset = 0;
float titleTextWidth = 0;
double titleScrollTime = 0.0;
std::string artist;

float artistXOffset = 0;
float artistTextWidth = 0;
double artistScrollTime = 0.0;
Texture albumArt;

int length = 0;
Expand Down Expand Up @@ -141,7 +145,7 @@ class Song
}

std::string jsonString((std::istreambuf_iterator<char>(ifs)), std::istreambuf_iterator<char>());

rapidjson::Document document;
document.Parse(jsonString.c_str());

Expand Down
Loading

0 comments on commit 23a796b

Please sign in to comment.