-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is ImGuiStyle.WindowFillAlphaDefault necessary? #337
Comments
You are right it is just a remnant of pre-1.0 version. I'll look into removing it. -omar Sent from my fax machine
|
Thanks. The added visibility in the demo window will help a lot in terms of self-documentation. Loving the red color theme, btw. :) |
So, I could remove it and flatten in into the WindowBg values. Default value for WindowFillAlphaDefault is 0.7f and default value for Colors[ImGuiCol_WindowBg].a = 1.0f; so that alpha would become 0.7f. If I change Colors[ImGuiCol_WindowBg].a to 0.7f then what do we do with the "historical" bg_alpha parameter of Begin() ?
|
…nt, baked into WindowBg color. Renamed TooltipBg > PopupBG. (#337) bg_alpha parameter of 5-parameters version of Begin() is an override, however that function may become obsolete someday.
Done, removed
|
----- - d3dx9 -> d3d9 にデグレードして d3dx を使わない生々しい実装に切り替えられた。 - 最小化状態での描画回避による高効率化が図られた。 - SDLウィンドウコンテキストを外部から提供される形にしてこのソースからは除外した。 - コーディングルールを`type *value` から `type* value` に変更した。 - フレームバッファーのサイズ計算で零除算が発生する可能性があったので排除した。 - `ImTextureID` についてインソースコメントドキュメントに追加。 - ImGui のウィンドウコンテキストを使わずに `ImDrawList API` で ImGui を使う方法をインソースコメントドキュメントに追記。 - コーディングルールを`type *value` から `type* value` に変更した。 - インソースコメントドキュメントを若干わかりやすく修正した。 - 2016-03-21 (1.48の途中) から 2016-05-12 (1.49の途中) までにあった APIの 破壊的変更についてインソースコメントドキュメントに追記。 - `GetWindowFont` -> `GetFont` 但し、旧APIはリダイレクトを定義しているが廃止予定 - `GetWindowFontSize` -> `GetFontSize` 但し、旧APIはリダイレクトを定義しているが廃止予定 - ImGuiCol_TooltipBg -> ImGuiCol_PopupBg ポップアップとメニューはこのAPIを事前に必要とするようになった ocornut#337 - style.WindowFillAlphaDefault 削除 style.Colors[ImGuiCol_WindowBg] を使えばいい。 ocornut#337 - `ImDrawList::PushClipRect(ImVec4 rect)` -> `ImDraw::PushClipRect(Imvec2 min,ImVec2 max,bool intersect_with_current_clip_rect=false)` - `CollapsingHeader(const char* label, const char* str_id = NULL, bool display_frame = true, bool default_open = false)` 廃止 -> `default_open` が `true` の `CollapsingHeader(label, ImGuiTreeNodeFlags_DefaultOpen)` を使えばいい。 - `SetNextTreeNodeOpened()` -> `SetNextTreeNodeOpen()` 但し旧APIからのリダイレクトは定義していない。 - `GetInternalState()`, `GetInternalStateSize()`, `SetInternalState()` は意味がわからないから `CreateContext()`, `DestroyContext()`, `GetCurrentContext()`, `SetCurrentContext()` にした。 - タイトルバーがウィンドウ背景に重ねて描画されないように変更した。 - MSVC++ で `snprintf` の代わりに `_snprintf` をCPPで使ってたのをやめた。 - GCC で `-Wformat` `-Wdouble-promotion` `-Wconversion` で警告を出すようにした。 - OSX でキーバインディングのデフォルトをそれっい感じになるようにした。 - `IM_INT_MIN` `IM_INT_MAX` CPP を廃止して IM_F32_TO_INT8_UNBOUND` と `IM_F32_TO_INT8_SAT` CPP にかえた。 - `void ImStrncpy(char* dst, const char* src, int count)` API を追加した。 - `bool ImGuiStorage::GetBool(ImU32 key, bool default_val) const` API を追加した。 - `bool* ImGuiStorage::GetBoolRef(ImGuiID key, bool default_val)` API を追加した。 - `void ImGuiStorage::SetBool(ImU32 key, bool val)` API を追加した。 - `ImGuiListClipper` 系のAPI を追加した。 - 実装詳細の CamelCase コーディングルールの徹底を図った。 - 実装詳細の不要なブロックスコープを廃止しコーディングルールの徹底を図った。 - 実装詳細のリファクタリングにより動作効率の向上と論理構造の見直しによる可読性の向上などを図った。 - `unsigned long long int` -> `int64_t` など処理系の実装依存による想定外の型挙動が起こらないよう修正した。 - `void ImGui::RenderBullet(ImVec2 pos)` API 追加。 - `bool ImGui::IsItemClicked(int mouse_button)` API 追加。 - `static void ApplySizeFullWithConstraint(ImGuiWindow* window, ImVec2 new_size)` API 追加。 - `void ImGui::SetNextWindowSizeConstraints(const ImVec2& size_min, const ImVec2& size_max, ImGuiSizeConstraintCallback custom_callback, void* custom_callback_user_data)` API 追加。 - `void ImGui::Bullet()` API 追加。 - `void ImGui::TreePushRawID(ImGuiID id)` API 追加。 -----
Is there a specific use case for
WindowFillAlphaDefault
, or is it a remnant of the evolution of the API?You can already control the window background alpha on a per-window basis using
ImGui::PushStyleColor(ImGuiCol_WindowBg, ...)
and globally usingImGui::GetStyle().Colors[ImGuiCol_WindowBg] = ...
.WindowFillAlphaDefault
makes things confusing, because unlike all other colors, there is this "secret" additional variable that controls window background alpha.Can we just remove
WindowFillAlphaDefault
?The text was updated successfully, but these errors were encountered: