{"id":24440683,"url":"https://github.com/icculusc/kspplugintaskbar","last_synced_at":"2025-03-14T01:44:37.508Z","repository":{"id":6066543,"uuid":"7292379","full_name":"IcculusC/KSPPluginTaskbar","owner":"IcculusC","description":null,"archived":false,"fork":false,"pushed_at":"2012-12-28T09:44:15.000Z","size":148,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-20T20:56:47.561Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IcculusC.png","metadata":{"files":{"readme":"readme.txt","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-12-23T06:06:33.000Z","updated_at":"2013-11-06T23:36:09.000Z","dependencies_parsed_at":"2022-09-10T02:54:06.834Z","dependency_job_id":null,"html_url":"https://github.com/IcculusC/KSPPluginTaskbar","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IcculusC%2FKSPPluginTaskbar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IcculusC%2FKSPPluginTaskbar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IcculusC%2FKSPPluginTaskbar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IcculusC%2FKSPPluginTaskbar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IcculusC","download_url":"https://codeload.github.com/IcculusC/KSPPluginTaskbar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243509164,"owners_count":20302144,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-20T20:57:00.200Z","updated_at":"2025-03-14T01:44:37.484Z","avatar_url":"https://github.com/IcculusC.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\r\n\r\n// Usage instructions:\r\n\r\n// Include the API(PluginTaskbar.cs) in your project.\r\n\r\n// Create a 30x30 icon or set of 30x30 icons\r\n\r\n// Load your icon/icons as Texture2D or the relevant Texture subclass\r\n\r\n\r\n\r\n// use the PluginTaskbar namespace\r\n\tusing PluginTaskbar;\r\n\r\n\r\n\r\n// implement the interface ITaskbarModule\r\n\tExampleClass : Part, ITaskbarModule\r\n\r\n\r\n\r\n// define the functions of the interface\r\n\r\n\tpublic Texture TaskbarIcon()\r\n\t{\r\n\t\treturn yourIcon;\r\n\t}\r\n\r\n\tpublic void TaskbarClicked(bool leftClick)\r\n\t{\r\n\t\tif(leftClick)\r\n\t\t\tDebug.Log(\"LEFT CLICKED!\");\r\n\t\telse\r\n\t\t\tDebug.Log(\"RIGHT CLICKED!\");\r\n\t}\t\r\n\r\n\t// return null if you don't want a tooltip\r\n\tpublic string TaskbarTooltip()\r\n\t{ \r\n\t\treturn yourTooltipText; \r\n\t}\r\n\r\n\tpublic void TaskbarHover(Vector3 mousePosition)\r\n\t{\r\n\t\t// do something on hover if you'd like\r\n\t\treturn;\r\n\t}\r\n\r\n\r\n\t// place any draw calls here, these will be invoked after the taskbar is drawn\r\n\tpublic void TaskbarDraw(Rect buttonRect, bool visible)\r\n\t{\r\n\t\t\r\n\t\t// MUST HAVE RETURN STATEMENT\r\n\t\treturn;\r\n\t}\r\n\r\n\r\n// define a few things\r\n\r\n\t// the key for your module, this needs to be unique per toolbar icon\r\n\tprivate static string yourModuleName = \"yourModuleName\";\r\n\t\r\n\t// the hook class, you must define one of these for each icon\r\n\tprivate TaskbarHooker taskbarHook;\t\t\r\n\r\n\r\n\r\n// create an instance of the TaskbarHooker, use this because your class implements\r\n// the interface ITaskbarModule\r\n\t\r\n\ttaskbarHook = new TaskbarHooker(this, yourModuleName);\r\n\r\n\r\n\r\n// start the hook when your part loads, this returns a boolean so if you have a\r\n// secondary icon or display method you can use it instead\r\n\r\n\t// returns true if taskbar is installed and successfully hooked\r\n\ttaskbarHook.Start();\r\n\r\n\r\n\r\n// stop the hook when the part dies, very important, this also returns a boolean\r\n// so you can handle things alternatively if it fails\r\n\r\n\t// returns true if taskbar is installed and successfully unhooked\r\n\ttaskbarHook.Stop();","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficculusc%2Fkspplugintaskbar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficculusc%2Fkspplugintaskbar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficculusc%2Fkspplugintaskbar/lists"}