mirror of
https://github.com/Drezil/imgui.git
synced 2025-03-31 00:12:44 +00:00
Settings: Internals: Renaming.
This commit is contained in:
parent
2e1013a0c6
commit
52e475230f
@ -2470,7 +2470,7 @@ void ImGui::NewFrame()
|
|||||||
ImGui::Begin("Debug##Default");
|
ImGui::Begin("Debug##Default");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void* SettingsHandlerWindow_ReadOpenEntry(ImGuiContext&, const char* name)
|
static void* SettingsHandlerWindow_ReadOpen(ImGuiContext&, const char* name)
|
||||||
{
|
{
|
||||||
ImGuiWindowSettings* settings = ImGui::FindWindowSettings(ImHash(name, 0));
|
ImGuiWindowSettings* settings = ImGui::FindWindowSettings(ImHash(name, 0));
|
||||||
if (!settings)
|
if (!settings)
|
||||||
@ -2533,7 +2533,7 @@ void ImGui::Initialize()
|
|||||||
ImGuiSettingsHandler ini_handler;
|
ImGuiSettingsHandler ini_handler;
|
||||||
ini_handler.TypeName = "Window";
|
ini_handler.TypeName = "Window";
|
||||||
ini_handler.TypeHash = ImHash("Window", 0, 0);
|
ini_handler.TypeHash = ImHash("Window", 0, 0);
|
||||||
ini_handler.ReadOpenEntryFn = SettingsHandlerWindow_ReadOpenEntry;
|
ini_handler.ReadOpenFn = SettingsHandlerWindow_ReadOpen;
|
||||||
ini_handler.ReadLineFn = SettingsHandlerWindow_ReadLine;
|
ini_handler.ReadLineFn = SettingsHandlerWindow_ReadLine;
|
||||||
ini_handler.WriteAllFn = SettingsHandlerWindow_WriteAll;
|
ini_handler.WriteAllFn = SettingsHandlerWindow_WriteAll;
|
||||||
g.SettingsHandlers.push_front(ini_handler);
|
g.SettingsHandlers.push_front(ini_handler);
|
||||||
@ -2689,7 +2689,7 @@ static void LoadIniSettingsFromMemory(const char* buf_readonly)
|
|||||||
}
|
}
|
||||||
const ImGuiID type_hash = ImHash(type_start, 0, 0);
|
const ImGuiID type_hash = ImHash(type_start, 0, 0);
|
||||||
entry_handler = ImGui::FindSettingsHandler(type_hash);
|
entry_handler = ImGui::FindSettingsHandler(type_hash);
|
||||||
entry_data = entry_handler ? entry_handler->ReadOpenEntryFn(g, name_start) : NULL;
|
entry_data = entry_handler ? entry_handler->ReadOpenFn(g, name_start) : NULL;
|
||||||
}
|
}
|
||||||
else if (entry_handler != NULL && entry_data != NULL)
|
else if (entry_handler != NULL && entry_data != NULL)
|
||||||
{
|
{
|
||||||
|
@ -386,7 +386,7 @@ struct ImGuiSettingsHandler
|
|||||||
{
|
{
|
||||||
const char* TypeName; // Short description stored in .ini file. Disallowed characters: '[' ']'
|
const char* TypeName; // Short description stored in .ini file. Disallowed characters: '[' ']'
|
||||||
ImGuiID TypeHash; // == ImHash(TypeName, 0, 0)
|
ImGuiID TypeHash; // == ImHash(TypeName, 0, 0)
|
||||||
void* (*ReadOpenEntryFn)(ImGuiContext& ctx, const char* name);
|
void* (*ReadOpenFn)(ImGuiContext& ctx, const char* name);
|
||||||
void (*ReadLineFn)(ImGuiContext& ctx, void* entry, const char* line);
|
void (*ReadLineFn)(ImGuiContext& ctx, void* entry, const char* line);
|
||||||
void (*WriteAllFn)(ImGuiContext& ctx, ImGuiTextBuffer* out_buf);
|
void (*WriteAllFn)(ImGuiContext& ctx, ImGuiTextBuffer* out_buf);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user