Skip to content

Commit

Permalink
Merge pull request #2 from aiekick/sqlite
Browse files Browse the repository at this point in the history
Sqlite
  • Loading branch information
aiekick authored Feb 13, 2023
2 parents 9b3419d + 844ade4 commit fe27826
Show file tree
Hide file tree
Showing 40 changed files with 1,913 additions and 532 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@
/samples
/.PVS-Studio
/res/appicon.aps
/doc/SQLiteSpy.db3
Binary file added doc/SQLiteSpy.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion doc/log_parsing.lua
Original file line number Diff line number Diff line change
@@ -1 +1 @@
--LogInfo(infos_string) -- will log the message in the in app console --LogWarning(warning_string) -- will log the message in the in app console --LogError(error_string) -- will log the message in the in app console --SetScriptDescription(description_string) -- will set the description of your script in app--SetRowBufferName("buffer_row"); -- set the lua string varaible name who will be filled with the content of the row file--SetFunctionForEachRow("eachRow"); -- set the function name who will be called at each row of the file--SetFunctionForEndFile("endFile"); -- set the function name who will be called at the end of the file--GetRowIndex() -- return the row number of the file--GetRowCount() -- return the number of rows of the file--Init() -- is the entry point of the script. this function is needed--will add a signal numerical value --AddSignalValue(signal_category, signal_name, signal_epoch_time, signal_value)function Init() SetInfos("sample script") SetRowBufferName("buffer_row"); SetFunctionForEachRow("eachRow"); SetFunctionForEndFile("endFile"); LogInfo(" --- Start of file parsing ---");endfunction eachRow() _section, _time, _name, _value = string.match(buffer_row, "<profiler section=\"(.*)\" epoch_time=\"(.*)\" name=\"(.*)\" render_time_ms=\"(.*)\">") if _section ~= nil and _time ~= nil and _name ~= nil and _value ~= nil then AddSignalValue(_section, _name, _time, _value) endendfunction endFile() LogInfo(" --- End of file parsing ---");end
--LogInfo(infos_string) -- will log the message in the in app console --LogWarning(warning_string) -- will log the message in the in app console --LogError(error_string) -- will log the message in the in app console --SetScriptDescription(description_string) -- will set the description of your script in app--SetRowBufferName("buffer_row"); -- set the lua string varaible name who will be filled with the content of the row file--SetFunctionForEachRow("eachRow"); -- set the function name who will be called at each row of the file--SetFunctionForEndFile("endFile"); -- set the function name who will be called at the end of the file--GetRowIndex() -- return the row number of the file--GetRowCount() -- return the number of rows of the file--Init() -- is the entry point of the script. this function is needed--GetEpochTime("2023-01-16 15:24:26,464") -- get epoch time from datetime in format "YYYY-MM-DD HH:MM:SS,MS" or "YYYY-MM-DD HH:MM:SS.MS"--will add a signal numerical value --AddSignalValue(signal_category, signal_name, signal_epoch_time, signal_value)--will add a signal string value --AddSignalString(signal_category, signal_name, signal_epoch_time, signal_string)function Init() SetInfos("sample script") SetRowBufferName("buffer_row"); SetFunctionForEachRow("eachRow"); SetFunctionForEndFile("endFile"); LogInfo(" --- Start of file parsing ---");endfunction eachRow() _section, _time, _name, _value = string.match(buffer_row, "<profiler section=\"(.*)\" epoch_time=\"(.*)\" name=\"(.*)\" render_time_ms=\"(.*)\">") if _section ~= nil and _time ~= nil and _name ~= nil and _value ~= nil then AddSignalValue(_section, _name, _time, _value) endendfunction endFile() LogInfo(" --- End of file parsing ---");end
Expand Down
Binary file added doc/wxLuaEdit.exe
Binary file not shown.
2 changes: 2 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,12 @@ int main(int, char**argv)
ImVec2 pos, size;
while (!glfwWindowShouldClose(mainWindow))
{
#ifndef _DEBUG
if (!LuaEngine::Instance()->IsJoinable()) // for not blocking threading progress bar animation
{
glfwWaitEventsTimeout(1.0);
}
#endif
glfwPollEvents();

glfwGetFramebufferSize(mainWindow, &display_w, &display_h);
Expand Down
11 changes: 11 additions & 0 deletions src/Contrib/ImWidgets/ImWidgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,17 @@ bool ImGui::PushStyleColorWithContrast(const ImGuiCol& backGroundColor, const Im
return false;
}

bool ImGui::PushStyleColorWithContrast(const ImU32& backGroundColor, const ImGuiCol& foreGroundColor, const ImU32& invertedColor, const float& maxContrastRatio)
{
const float contrastRatio = CalcContrastRatio(ImGui::GetColorU32(backGroundColor), ImGui::GetColorU32(foreGroundColor));
if (contrastRatio < maxContrastRatio)
{
ImGui::PushStyleColor(foreGroundColor, invertedColor);
return true;
}
return false;
}

bool ImGui::PushStyleColorWithContrast(const ImGuiCol& backGroundColor, const ImGuiCol& foreGroundColor, const ImVec4& invertedColor, const float& maxContrastRatio)
{
const float contrastRatio = CalcContrastRatio(ImGui::GetColorU32(backGroundColor), ImGui::GetColorU32(foreGroundColor));
Expand Down
1 change: 1 addition & 0 deletions src/Contrib/ImWidgets/ImWidgets.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ namespace ImGui

IMGUI_API float CalcContrastRatio(const ImU32& backGroundColor, const ImU32& foreGroundColor);
IMGUI_API bool PushStyleColorWithContrast(const ImGuiCol& backGroundColor, const ImGuiCol& foreGroundColor, const ImU32& invertedColor, const float& minContrastRatio);
IMGUI_API bool PushStyleColorWithContrast(const ImU32& backGroundColor, const ImGuiCol& foreGroundColor, const ImU32& invertedColor, const float& maxContrastRatio);
IMGUI_API bool PushStyleColorWithContrast(const ImGuiCol& backGroundColor, const ImGuiCol& foreGroundColor, const ImVec4& invertedColor, const float& maxContrastRatio);
IMGUI_API bool PushStyleColorWithContrast(const ImU32& backGroundColor, const ImGuiCol& foreGroundColor, const ImVec4& invertedColor, const float& maxContrastRatio);

Expand Down
Loading

0 comments on commit fe27826

Please sign in to comment.