Бранимир Караџић 6 年之前
父節點
當前提交
7b01a4dc9a
共有 1 個文件被更改,包括 8 次插入1 次删除
  1. 8 1
      examples/common/example-glue.cpp

+ 8 - 1
examples/common/example-glue.cpp

@@ -143,10 +143,17 @@ void showExampleDialog(entry::AppI* _app, const char* _errorText)
 	bx::StringView url = _app->getUrl();
 	if (!url.isEmpty() )
 	{
-		if (ImGui::Button("Documentation") )
+		ImGui::SameLine();
+		if (ImGui::SmallButton(ICON_FA_LINK) )
 		{
 			openUrl(url);
 		}
+		else if (ImGui::IsItemHovered() )
+		{
+			char tmp[1024];
+			bx::snprintf(tmp, BX_COUNTOF(tmp), "Documentation: %.*s", url.getLength(), url.getPtr() );
+			ImGui::SetTooltip(tmp);
+		}
 	}
 
 	ImGui::Separator();