Skip to content

Commit

Permalink
Code style take 2
Browse files Browse the repository at this point in the history
  • Loading branch information
moxian committed Nov 19, 2024
1 parent 0312655 commit debbbf0
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/cata_imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1182,8 +1182,12 @@ static void load_imgui_style_file( cata_path style_path )
if( jsarr.has_float( 3 ) ) {
alpha = jsarr.get_float( 3 ) / 255.0;
}
ImVec4 color = ImVec4( jsarr.get_float( 0 ) / 255.0, jsarr.get_float( 1 ) / 255.0,
jsarr.get_float( 2 ) / 255.0, alpha );
ImVec4 color = ImVec4(
jsarr.get_float( 0 ) / 255.0,
jsarr.get_float( 1 ) / 255.0,
jsarr.get_float( 2 ) / 255.0,
alpha
);
style.Colors[imgui_key] = color;
}
}
Expand All @@ -1202,8 +1206,8 @@ void cataimgui::init_colors()
try {
load_imgui_style_file( style_path );
} catch( const JsonError &err ) {
debugmsg( "Failed to load imgui color data from \"%s\": %s", style_path.generic_u8string(),
err.what() );
debugmsg( "Failed to load imgui color data from \"%s\": %s",
style_path.generic_u8string(), err.what() );
}
}

0 comments on commit debbbf0

Please sign in to comment.