Skip to content

Commit fe27826

Browse files
authored
Merge pull request #2 from aiekick/sqlite
Sqlite
2 parents 9b3419d + 844ade4 commit fe27826

40 files changed

+1913
-532
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@
1818
/samples
1919
/.PVS-Studio
2020
/res/appicon.aps
21+
/doc/SQLiteSpy.db3

doc/SQLiteSpy.exe

3.51 MB
Binary file not shown.

doc/log_parsing.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +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
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--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

doc/wxLuaEdit.exe

5.95 MB
Binary file not shown.

main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,12 @@ int main(int, char**argv)
153153
ImVec2 pos, size;
154154
while (!glfwWindowShouldClose(mainWindow))
155155
{
156+
#ifndef _DEBUG
156157
if (!LuaEngine::Instance()->IsJoinable()) // for not blocking threading progress bar animation
157158
{
158159
glfwWaitEventsTimeout(1.0);
159160
}
161+
#endif
160162
glfwPollEvents();
161163

162164
glfwGetFramebufferSize(mainWindow, &display_w, &display_h);

src/Contrib/ImWidgets/ImWidgets.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,17 @@ bool ImGui::PushStyleColorWithContrast(const ImGuiCol& backGroundColor, const Im
157157
return false;
158158
}
159159

160+
bool ImGui::PushStyleColorWithContrast(const ImU32& backGroundColor, const ImGuiCol& foreGroundColor, const ImU32& invertedColor, const float& maxContrastRatio)
161+
{
162+
const float contrastRatio = CalcContrastRatio(ImGui::GetColorU32(backGroundColor), ImGui::GetColorU32(foreGroundColor));
163+
if (contrastRatio < maxContrastRatio)
164+
{
165+
ImGui::PushStyleColor(foreGroundColor, invertedColor);
166+
return true;
167+
}
168+
return false;
169+
}
170+
160171
bool ImGui::PushStyleColorWithContrast(const ImGuiCol& backGroundColor, const ImGuiCol& foreGroundColor, const ImVec4& invertedColor, const float& maxContrastRatio)
161172
{
162173
const float contrastRatio = CalcContrastRatio(ImGui::GetColorU32(backGroundColor), ImGui::GetColorU32(foreGroundColor));

src/Contrib/ImWidgets/ImWidgets.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ namespace ImGui
7474

7575
IMGUI_API float CalcContrastRatio(const ImU32& backGroundColor, const ImU32& foreGroundColor);
7676
IMGUI_API bool PushStyleColorWithContrast(const ImGuiCol& backGroundColor, const ImGuiCol& foreGroundColor, const ImU32& invertedColor, const float& minContrastRatio);
77+
IMGUI_API bool PushStyleColorWithContrast(const ImU32& backGroundColor, const ImGuiCol& foreGroundColor, const ImU32& invertedColor, const float& maxContrastRatio);
7778
IMGUI_API bool PushStyleColorWithContrast(const ImGuiCol& backGroundColor, const ImGuiCol& foreGroundColor, const ImVec4& invertedColor, const float& maxContrastRatio);
7879
IMGUI_API bool PushStyleColorWithContrast(const ImU32& backGroundColor, const ImGuiCol& foreGroundColor, const ImVec4& invertedColor, const float& maxContrastRatio);
7980

0 commit comments

Comments
 (0)