Иконка ресурса

FREE GUI : 1.0.0 1.0.0

Нет прав для скачивания
C#:
---
layout: forums
title: 'Community entity UI'
breadcrumbs:
 - "Plugin Development": "/forums/plugin-development.105/"
 - "Rust Development": "/forums/rust-development.4/"
---
<div class="titleBar">
    <h1>
        <a href="{{ '/threads/community-entity-ui.9151/' | prepend: site.baseurl }}">Community entity UI</a>
    </h1>
    <p id="pageDescription" class="muted">Discussion in '<a href="{{ '/forums/rust-development.4/' | prepend: site.baseurl }}">Rust Development</a>' started by <a class="username"
            dir="auto">ShadowEvil</a>, <a href="{{ '/threads/community-entity-ui.9151/' | prepend: site.baseurl }}"><span class="DateTime" title="Jun 5, 2015 at 7:46 AM">Jun 5, 2015</span></a>.
    </p>
</div>
<div class="pageNavLinkGroup">
    <div class="PageNav" data-page="1" data-range="2" data-start="2" data-end="6" data-last="8" data-sentinel="{sentinel}" data-baseurl="page-{sentinel}">
        <nav>
            <a href="{{ '/threads/community-entity-ui.9151/' | prepend: site.baseurl }}" class="currentPage " rel="start">1</a>
            <a class="PageNavPrev hidden">&larr;</a> <span class="scrollable"><span class="items">
                    <a href="{{ '/threads/community-entity-ui.9151/page-2' | prepend: site.baseurl }}" class="">2</a>
                    <a href="{{ '/threads/community-entity-ui.9151/page-3' | prepend: site.baseurl }}" class="">3</a>
                    <a href="{{ '/threads/community-entity-ui.9151/page-4' | prepend: site.baseurl }}" class="">4</a>
                    <a href="{{ '/threads/community-entity-ui.9151/page-5' | prepend: site.baseurl }}" class="">5</a>
                    <a href="{{ '/threads/community-entity-ui.9151/page-6' | prepend: site.baseurl }}" class="">6</a>
                </span></span> <a class="PageNavNext ">&rarr;</a>
            <a href="{{ '/threads/community-entity-ui.9151/page-8' | prepend: site.baseurl }}" class="">8</a>
            <a href="{{ '/threads/community-entity-ui.9151/page-2' | prepend: site.baseurl }}" class="text">Next &gt;</a>
        </nav>
    </div>
</div>
<ol class="messageList" id="messageList">
    <li id="post-96026" class="message" data-author="ShadowEvil">
        <div class="messageUserInfo">
            <div class="messageUserBlock">
                <div class="avatarHolder">
                    <span class="helper"></span>
                    <a class="avatar Avm" data-avatarhtml="true"><img src="{{ '/assets/styles/oxide/logo.og.png' | prepend: site.baseurl }}" width="96" height="96" alt="ShadowEvil" /></a>
                </div>
                <h3 class="userText">
                    <a class="username" dir="auto">ShadowEvil</a>
                </h3>
                <span class="arrow"></span>
            </div>
        </div>
        <div class="messageInfo primaryContent">
            <div class="messageContent">
                <article>
                    <blockquote class="messageText SelectQuoteContainer ugc baseHtml">The dev blog update said that he was working on GUI for plugin usage... And posted his github source... Any idea
                        oh how to use it? <div class="messageTextEndMarker">&nbsp;</div>
                    </blockquote>
                </article>
            </div>
            <div class="messageMeta ToggleTriggerAnchor">
                <div class="privateControls">
                    <span class="item muted">
                        <span class="authorEnd"><a class="username author" dir="auto">ShadowEvil</a>,</span>
                        <a href="{{ '/threads/community-entity-ui.9151/' | prepend: site.baseurl }}" title="Permalink" class="datePermalink"><span class="DateTime" title="Jun 5, 2015 at 7:46 AM">Jun
                                5, 2015</span></a>
                    </span>
                </div>
                <div class="publicControls">
                    <a href="{{ '/threads/community-entity-ui.9151/' | prepend: site.baseurl }}" title="Permalink" class="item muted postNumber hashPermalink OverlayTrigger"
                        data-href="posts/96026/permalink">#1</a>
                </div>
            </div>
        </div>
    </li>
    <li id="post-96060" class="message" data-author="DroneFW">
        <div class="messageUserInfo">
            <div class="messageUserBlock">
                <div class="avatarHolder">
                    <span class="helper"></span>
                    <a class="avatar Avm" data-avatarhtml="true"><img src="{{ '/assets/styles/oxide/logo.og.png' | prepend: site.baseurl }}" width="96" height="96" alt="DroneFW" /></a>
                </div>
                <h3 class="userText">
                    <a class="username" dir="auto">DroneFW</a>
                </h3>
                <span class="arrow"></span>
            </div>
        </div>
        <div class="messageInfo primaryContent">
            <div class="messageContent">
                <article>
                    <blockquote class="messageText SelectQuoteContainer ugc baseHtml">Hi there! I&#039;m refering to the Community Entity that Garry mentioned in his devblog <a
                            href="http://playrust.com/devblog-63/#more-3642" target="_blank" class="externalLink" rel="nofollow">http://playrust.com/devblog-63/#more-3642</a> yesterday:<br />
                        <a href="https://github.com/OxideMod/Oxide/blob/master/Oxide.Game.Rust/RustCore.cs#L115" target="_blank" class="externalLink  rel="
                            nofollow">https://github.com/OxideMod/Oxide/blob/master/Oxide.Game.Rust/RustCore.cs#L115</a><br />
                        <br /> Has anyone played around with it yet? Has someone found out how it works? Found possibilities/limitations?<br /> I was going to look into it in the upcomming days,
                        perhaps someone already spent some time on this. <div class="messageTextEndMarker">&nbsp;</div>
                    </blockquote>
                </article>
            </div>
            <div class="messageMeta ToggleTriggerAnchor">
                <div class="privateControls">
                    <span class="item muted">
                        <span class="authorEnd"><a class="username author" dir="auto">DroneFW</a>,</span>
                        <a href="{{ '/threads/community-entity-ui.9151/#post-96060' | prepend: site.baseurl }}" title="Permalink" class="datePermalink"><span class="DateTime"
                                title="Jun 5, 2015 at 10:48 AM">Jun 5, 2015</span></a>
                    </span>
                </div>
                <div class="publicControls">
                    <a href="{{ '/threads/community-entity-ui.9151/#post-96060' | prepend: site.baseurl }}" title="Permalink" class="item muted postNumber hashPermalink OverlayTrigger"
                        data-href="posts/96060/permalink">#2</a>
                </div>
            </div>
        </div>
    </li>
    <li id="post-96115" class="message" data-author="Bombardir">
        <div class="messageUserInfo">
            <div class="messageUserBlock">
                <div class="avatarHolder">
                    <span class="helper"></span>
                    <a class="avatar Avm" data-avatarhtml="true"><img src="{{ '/assets/styles/oxide/logo.og.png' | prepend: site.baseurl }}" width="96" height="96" alt="Bombardir" /></a>
                </div>
                <h3 class="userText">
                    <a class="username" dir="auto">Bombardir</a>
                </h3>
                <span class="arrow"></span>
            </div>
        </div>
        <div class="messageInfo primaryContent">
            <div class="messageContent">
                <article>
                    <blockquote class="messageText SelectQuoteContainer ugc baseHtml">Maybe<br />
                        <div class="bbCodeBlock bbCodeCode">
                            <div class="type">Code:</div>
                            {% raw %}<pre>CommunityEntity.ServerInstance.ClientRPCEx( new Network.SendInfo() { connection = args.connection }, null, &quot;AddUI&quot;, json );</pre>{% endraw %}
                        </div>Json u can find at <a href="https://github.com/Facepunch/rust-community/blob/master/CommunityEntity.UI.cs" target="_blank" class="externalLink  rel="
                            nofollow">https://github.com/Facepunch/rust-community/blob/master/CommunityEntity.UI.cs</a><br /> [DOUBLEPOST=1433519476][/DOUBLEPOST]Wow, it&#039;s working perfect! <a
                            href="http://savepic.ru/7216319.png" target="_blank" class="externalLink" rel="nofollow">http://savepic.ru/7216319.png</a><br /> Test code (copy from github):<br />
                        <div class="bbCodeBlock bbCodeCode">
                            <div class="type">Code:</div>
                            {% raw %}<pre>using UnityEngine;
using Rust;namespace Oxide.Plugins
{
    [Info(&quot;GUI&quot;, &quot;Bombardir&quot;, &quot;0.0.1&quot;)]
    class GUI : RustPlugin
    {
        #region JSON
        const string json = @&quot;[  
                        {
                            &quot;&quot;parent&quot;&quot;: &quot;&quot;Overlay&quot;&quot;,
                            &quot;&quot;components&quot;&quot;:
                            [
                                {
                                    &quot;&quot;type&quot;&quot;:&quot;&quot;UnityEngine.UI.Text&quot;&quot;,
                                    &quot;&quot;text&quot;&quot;:&quot;&quot;Is it from plugin?&quot;&quot;,
                                    &quot;&quot;fontSize&quot;&quot;:32,
                                    &quot;&quot;align&quot;&quot;: &quot;&quot;MiddleCenter&quot;&quot;,
                                },
                                {
                                    &quot;&quot;type&quot;&quot;:&quot;&quot;RectTransform&quot;&quot;,
                                    &quot;&quot;anchormin&quot;&quot;: &quot;&quot;0 0.5&quot;&quot;,
                                    &quot;&quot;anchormax&quot;&quot;: &quot;&quot;1 0.9&quot;&quot;
                                }
                            ]
                        },
                        {
                            &quot;&quot;name&quot;&quot;: &quot;&quot;Button88&quot;&quot;,
                            &quot;&quot;parent&quot;&quot;: &quot;&quot;Overlay&quot;&quot;,
                            &quot;&quot;components&quot;&quot;:
                            [
                                {
                                    &quot;&quot;type&quot;&quot;:&quot;&quot;UnityEngine.UI.Button&quot;&quot;,
                                    &quot;&quot;close&quot;&quot;:&quot;&quot;TestPanel7766&quot;&quot;,
                                    &quot;&quot;command&quot;&quot;:&quot;&quot;status&quot;&quot;,
                                    &quot;&quot;color&quot;&quot;: &quot;&quot;0.9 0.8 0.3 0.8&quot;&quot;,
                                    &quot;&quot;imagetype&quot;&quot;: &quot;&quot;Tiled&quot;&quot;
                                },
                                {
                                    &quot;&quot;type&quot;&quot;:&quot;&quot;RectTransform&quot;&quot;,
                                    &quot;&quot;anchormin&quot;&quot;: &quot;&quot;0.3 0.15&quot;&quot;,
                                    &quot;&quot;anchormax&quot;&quot;: &quot;&quot;0.7 0.2&quot;&quot;
                                }
                            ]
                        },
                        {
                            &quot;&quot;parent&quot;&quot;: &quot;&quot;Button88&quot;&quot;,
                            &quot;&quot;components&quot;&quot;:
                            [
                                {
                                    &quot;&quot;type&quot;&quot;:&quot;&quot;UnityEngine.UI.Text&quot;&quot;,
                                    &quot;&quot;text&quot;&quot;:&quot;&quot;YES!!!!&quot;&quot;,
                                    &quot;&quot;fontSize&quot;&quot;:20,
                                    &quot;&quot;align&quot;&quot;: &quot;&quot;MiddleCenter&quot;&quot;
                                }
                            ]
                        }
                    ]
                    &quot;;
        #endregion        [ChatCommand(&quot;gui&quot;)]
        void gui_test(BasePlayer player, string command, string[] args)
        {
            CommunityEntity.ServerInstance.ClientRPCEx(new Network.SendInfo() { connection = player.net.connection }, null, &quot;AddUI&quot;, json);
        }
    }
}</pre>{% endraw %}
                        </div>
                        <div class="messageTextEndMarker">&nbsp;</div>
                    </blockquote>
                </article>
            </div>
            <div class="editDate">Last edited by a moderator: <span class="DateTime" title="Jun 5, 2015 at 4:51 PM">Jun 5, 2015</span>
            </div>
            <div class="messageMeta ToggleTriggerAnchor">
                <div class="privateControls">
                    <span class="item muted">
                        <span class="authorEnd"><a class="username author" dir="auto">Bombardir</a>,</span>
                        <a href="{{ '/threads/community-entity-ui.9151/#post-96115' | prepend: site.baseurl }}" title="Permalink" class="datePermalink"><span class="DateTime"
                                title="Jun 5, 2015 at 4:23 PM">Jun 5, 2015</span></a>
                    </span>
                </div>
                <div class="publicControls">
                    <a href="{{ '/threads/community-entity-ui.9151/#post-96115' | prepend: site.baseurl }}" title="Permalink" class="item muted postNumber hashPermalink OverlayTrigger"
                        data-href="posts/96115/permalink">#3</a>
                </div>
            </div>
        </div>
    </li>
    <li id="post-96122" class="message" data-author="Comand">
        <div class="messageUserInfo">
            <div class="messageUserBlock">
                <div class="avatarHolder">
                    <span class="helper"></span>
                    <a class="avatar Avm" data-avatarhtml="true"><img src="{{ '/assets/styles/oxide/logo.og.png' | prepend: site.baseurl }}" width="96" height="96" alt="Comand" /></a>
                </div>
                <h3 class="userText">
                    <a class="username" dir="auto">Comand</a>
                </h3>
                <span class="arrow"></span>
            </div>
        </div>
        <div class="messageInfo primaryContent">
            <div class="messageContent">
                <article>
                    <blockquote class="messageText SelectQuoteContainer ugc baseHtml">I was trying it, and it is working.<br /> You only need to call the line of Bombardir´s post with an json string
                        like in the example on the github.<br /> the &quot;args.connection&quot; must be an instance of Network.Connection.<br />
                        <br /> You get this object, in example, in the &quot;OnUserApprove&quot; hook. <br /> Not really sure how to get this connection object from an BasePlayer object, therefore i
                        was assigning it to an internal array of my plugin class to be able to acccess it later in an other hooks where i only have the BasePlayer object.<br />
                        <br /> But i still need a list of &quot;parent&quot; Panels, and some example how to define the size and possition of the elements.<br /> For now parent &quot;Overlay&quot;
                        looks like the the main Window/Area (visibile in all cases), i was also trying some other names and found &quot;Inventory&quot;.<br /> But i like to know the name of the Panel
                        of the complete Window after using tab ( where Inventory, Player and Craftmenu is ) to add some new buttons... <div class="messageTextEndMarker">&nbsp;</div>
                    </blockquote>
                </article>
            </div>
            <div class="messageMeta ToggleTriggerAnchor">
                <div class="privateControls">
                    <span class="item muted">
                        <span class="authorEnd"><a class="username author" dir="auto">Comand</a>,</span>
                        <a href="{{ '/threads/community-entity-ui.9151/#post-96122' | prepend: site.baseurl }}" title="Permalink" class="datePermalink"><span class="DateTime"
                                title="Jun 5, 2015 at 4:59 PM">Jun 5, 2015</span></a>
                    </span>
                </div>
                <div class="publicControls">
                    <a href="{{ '/threads/community-entity-ui.9151/#post-96122' | prepend: site.baseurl }}" title="Permalink" class="item muted postNumber hashPermalink OverlayTrigger"
                        data-href="posts/96122/permalink">#4</a>
                </div>
            </div>
        </div>
    </li>
    <li id="post-96093" class="message" data-author="VVoid">
        <div class="messageUserInfo">
            <div class="messageUserBlock">
                <div class="avatarHolder">
                    <span class="helper"></span>
                    <a class="avatar Avm" data-avatarhtml="true"><img src="{{ '/assets/styles/oxide/logo.og.png' | prepend: site.baseurl }}" width="96" height="96" alt="VVoid" /></a>
                </div>
                <h3 class="userText">
                    <a class="username" dir="auto">VVoid</a>
                </h3>
                <span class="arrow"></span>
            </div>
        </div>
        <div class="messageInfo primaryContent">
            <div class="messageContent">
                <article>
                    <blockquote class="messageText SelectQuoteContainer ugc baseHtml">I played a bit .. and all i can say at the moment it is tooo-o much pain in positioning of the components <img
                            src="{{ '/assets/styles/default/xenforo/clear.png' | prepend: site.baseurl }}" class="mceSmilieSprite mceSmilie3" alt=":(" title="Frown    :(" /><br /> [DOUBLEPOST=1433520410,1433510521][/DOUBLEPOST]EDIT:<br />
                        Spent some time and created this small panel (online/sleepers/time).<br /> Good thing that Garry decided to advance the client modding, but currently possibilities is very and
                        very limited.<br />
                        <img src="proxy.php?image=http%3A%2F%2Fi.imgur.com%2FaKLBVFK.jpg&amp;hash=a1b1dd613149a36a8410444a9f74b0d5" class="bbCodeImage LbImage" alt="[&#x200B;IMG]"
                            data-url="http://i.imgur.com/aKLBVFK.jpg" />
                        <div class="messageTextEndMarker">&nbsp;</div>
                    </blockquote>
                </article>
            </div>
            <div class="messageMeta ToggleTriggerAnchor">
                <div class="privateControls">
                    <span class="item muted">
                        <span class="authorEnd"><a class="username author" dir="auto">VVoid</a>,</span>
                        <a href="{{ '/threads/community-entity-ui.9151/#post-96093' | prepend: site.baseurl }}" title="Permalink" class="datePermalink"><span class="DateTime"
                                title="Jun 5, 2015 at 5:06 PM">Jun 5, 2015</span></a>
                    </span>
                </div>
                <div class="publicControls">
                    <a href="{{ '/threads/community-entity-ui.9151/#post-96093' | prepend: site.baseurl }}" title="Permalink" class="item muted postNumber hashPermalink OverlayTrigger"
                        data-href="posts/96093/permalink">#5</a>
                </div>
            </div>
        </div>
    </li>
    <li id="post-96199" class="message" data-author="Bombardir">
        <div class="messageUserInfo">
            <div class="messageUserBlock">
                <div class="avatarHolder">
                    <span class="helper"></span>
                    <a class="avatar Avm" data-avatarhtml="true"><img src="{{ '/assets/styles/oxide/logo.og.png' | prepend: site.baseurl }}" width="96" height="96" alt="Bombardir" /></a>
                </div>
                <h3 class="userText">
                    <a class="username" dir="auto">Bombardir</a>
                </h3>
                <span class="arrow"></span>
            </div>
        </div>
        <div class="messageInfo primaryContent">
            <div class="messageContent">
                <article>
                    <blockquote class="messageText SelectQuoteContainer ugc baseHtml">It&#039;s not so hard after some tests)<br />
                        <img src="proxy.php?image=http%3A%2F%2Fsavepic.ru%2F7255254.png&amp;hash=f9e6f7ea63d8d8520471adc59296e5f8" class="bbCodeImage LbImage" alt="[&#x200B;IMG]"
                            data-url="http://savepic.ru/7255254.png" /> [DOUBLEPOST=1433536961][/DOUBLEPOST] <div class="bbCodeBlock bbCodeQuote" data-author="VVoid">
                            <aside>
                                <div class="attribution type">VVoid said: <a href="#post-96093" class="AttributionLink">&uarr;</a>
                                </div>
                                <blockquote class="quoteContainer">
                                    <div class="quote">I played a bit .. and all i can say at the moment it is tooo-o much pain in positioning of the components <img
                                            src="{{ '/assets/styles/default/xenforo/clear.png' | prepend: site.baseurl }}" class="mceSmilieSprite mceSmilie3" alt=":(" title="Frown    :(" /><br />
                                        [DOUBLEPOST=1433520410,1433510521][/DOUBLEPOST]EDIT:<br /> Spent some time and created this small panel (online/sleepers/time).<br /> Good thing that Garry
                                        decided to advance the client modding, but currently possibilities is very and very limited.<br />
                                        <img src="proxy.php?image=http%3A%2F%2Fi.imgur.com%2FaKLBVFK.jpg&amp;hash=a1b1dd613149a36a8410444a9f74b0d5" class="bbCodeImage LbImage" alt="[&#x200B;IMG]"
                                            data-url="http://i.imgur.com/aKLBVFK.jpg" />
                                    </div>
                                    <div class="quoteExpand">Click to expand...</div>
                                </blockquote>
                            </aside>
                        </div>I don&#039;t think so. We can do a lot of good plugins with it since we can use buttons that will call console commands (console cmds will call other gui stuff etc)...
                        <div class="messageTextEndMarker">&nbsp;</div>
                    </blockquote>
                </article>
            </div>
            <div class="messageMeta ToggleTriggerAnchor">
                <div class="privateControls">
                    <span class="item muted">
                        <span class="authorEnd"><a class="username author" dir="auto">Bombardir</a>,</span>
                        <a href="{{ '/threads/community-entity-ui.9151/#post-96199' | prepend: site.baseurl }}" title="Permalink" class="datePermalink"><span class="DateTime"
                                title="Jun 5, 2015 at 9:17 PM">Jun 5, 2015</span></a>
                    </span>
                </div>
                <div class="publicControls">
                    <a href="{{ '/threads/community-entity-ui.9151/#post-96199' | prepend: site.baseurl }}" title="Permalink" class="item muted postNumber hashPermalink OverlayTrigger"
                        data-href="posts/96199/permalink">#6</a>
                </div>
            </div>
        </div>
    </li>
    <li id="post-96210" class="message" data-author="VVoid">
        <div class="messageUserInfo">
            <div class="messageUserBlock">
                <div class="avatarHolder">
                    <span class="helper"></span>
                    <a class="avatar Avm" data-avatarhtml="true"><img src="{{ '/assets/styles/oxide/logo.og.png' | prepend: site.baseurl }}" width="96" height="96" alt="VVoid" /></a>
                </div>
                <h3 class="userText">
                    <a class="username" dir="auto">VVoid</a>
                </h3>
                <span class="arrow"></span>
            </div>
        </div>
        <div class="messageInfo primaryContent">
            <div class="messageContent">
                <article>
                    <blockquote class="messageText SelectQuoteContainer ugc baseHtml">
                        <div class="bbCodeBlock bbCodeQuote" data-author="Bombardir">
                            <aside>
                                <div class="attribution type">Bombardir said: <a href="#post-96199" class="AttributionLink">&uarr;</a>
                                </div>
                                <blockquote class="quoteContainer">
                                    <div class="quote">It&#039;s not so hard after some tests)<br />
                                        <img src="proxy.php?image=http%3A%2F%2Fsavepic.ru%2F7255254.png&amp;hash=f9e6f7ea63d8d8520471adc59296e5f8" class="bbCodeImage LbImage" alt="[&#x200B;IMG]"
                                            data-url="http://savepic.ru/7255254.png" /> [DOUBLEPOST=1433536961][/DOUBLEPOST]<br /> I don&#039;t think so. We can do a lot of good plugins with it since
                                        we can use buttons that will call console commands (console cmds will call other gui stuff etc)...</div>
                                    <div class="quoteExpand">Click to expand...</div>
                                </blockquote>
                            </aside>
                        </div>Maybe you&#039;re right. This panel is centered?<br /> Been trying to do this, can i look at the definition? <div class="messageTextEndMarker">&nbsp;</div>
                    </blockquote>
                </article>
            </div>
            <div class="messageMeta ToggleTriggerAnchor">
                <div class="privateControls">
                    <span class="item muted">
                        <span class="authorEnd"><a class="username author" dir="auto">VVoid</a>,</span>
                        <a href="{{ '/threads/community-entity-ui.9151/#post-96210' | prepend: site.baseurl }}" title="Permalink" class="datePermalink"><span class="DateTime"
                                title="Jun 5, 2015 at 10:27 PM">Jun 5, 2015</span></a>
                    </span>
                </div>
                <div class="publicControls">
                    <a href="{{ '/threads/community-entity-ui.9151/#post-96210' | prepend: site.baseurl }}" title="Permalink" class="item muted postNumber hashPermalink OverlayTrigger"
                        data-href="posts/96210/permalink">#7</a>
                </div>
            </div>
        </div>
    </li>
    <li id="post-96220" class="message" data-author="ShadowEvil">
        <div class="messageUserInfo">
            <div class="messageUserBlock">
                <div class="avatarHolder">
                    <span class="helper"></span>
                    <a class="avatar Avm" data-avatarhtml="true"><img src="{{ '/assets/styles/oxide/logo.og.png' | prepend: site.baseurl }}" width="96" height="96" alt="ShadowEvil" /></a>
                </div>
                <h3 class="userText">
                    <a class="username" dir="auto">ShadowEvil</a>
                </h3>
                <span class="arrow"></span>
            </div>
        </div>
        <div class="messageInfo primaryContent">
            <div class="messageContent">
                <article>
                    <blockquote class="messageText SelectQuoteContainer ugc baseHtml">How do I get out of using that dreaded string bullcrap with the json? I tried formatting it, and it was the same
                        every which way... But it still does NOT like my formatting... I can&#039;t insert non-static information like the Level of the character and such....<br />
                        <br />
                        <br /> Nevermind... Fixed it... Stupid string... Who uses @ anymore anyway...<br /> [DOUBLEPOST=1433565571,1433542584][/DOUBLEPOST]Anybody figure out how to make it refresh
                        information on the screen? Or is it still static? <div class="messageTextEndMarker">&nbsp;</div>
                    </blockquote>
                </article>
            </div>
            <div class="messageMeta ToggleTriggerAnchor">
                <div class="privateControls">
                    <span class="item muted">
                        <span class="authorEnd"><a class="username author" dir="auto">ShadowEvil</a>,</span>
                        <a href="{{ '/threads/community-entity-ui.9151/#post-96220' | prepend: site.baseurl }}" title="Permalink" class="datePermalink"><span class="DateTime"
                                title="Jun 6, 2015 at 5:39 AM">Jun 6, 2015</span></a>
                    </span>
                </div>
                <div class="publicControls">
                    <a href="{{ '/threads/community-entity-ui.9151/#post-96220' | prepend: site.baseurl }}" title="Permalink" class="item muted postNumber hashPermalink OverlayTrigger"
                        data-href="posts/96220/permalink">#8</a>
                </div>
            </div>
        </div>
    </li>
    <li id="post-96327" class="message" data-author="VVoid">
        <div class="messageUserInfo">
            <div class="messageUserBlock">
                <div class="avatarHolder">
                    <span class="helper"></span>
                    <a class="avatar Avm" data-avatarhtml="true"><img src="{{ '/assets/styles/oxide/logo.og.png' | prepend: site.baseurl }}" width="96" height="96" alt="VVoid" /></a>
                </div>
                <h3 class="userText">
                    <a class="username" dir="auto">VVoid</a>
                </h3>
                <span class="arrow"></span>
            </div>
        </div>
        <div class="messageInfo primaryContent">
            <div class="messageContent">
                <article>
                    <blockquote class="messageText SelectQuoteContainer ugc baseHtml">
                        <div class="bbCodeBlock bbCodeQuote" data-author="ShadowEvil">
                            <aside>
                                <div class="attribution type">ShadowEvil said: <a href="#post-96220" class="AttributionLink">&uarr;</a>
                                </div>
                                <blockquote class="quoteContainer">
                                    <div class="quote">How do I get out of using that dreaded string bullcrap with the json? I tried formatting it, and it was the same every which way... But it still
                                        does NOT like my formatting... I can&#039;t insert non-static information like the Level of the character and such....<br />
                                        <br />
                                        <br /> Nevermind... Fixed it... Stupid string... Who uses @ anymore anyway...<br /> [DOUBLEPOST=1433565571,1433542584][/DOUBLEPOST]Anybody figure out how to
                                        make it refresh information on the screen? Or is it still static?</div>
                                    <div class="quoteExpand">Click to expand...</div>
                                </blockquote>
                            </aside>
                        </div>Refresh possible only through complete UI redrawing. Use DestroyUI RPC. <div class="messageTextEndMarker">&nbsp;</div>
                    </blockquote>
                </article>
            </div>
            <div class="messageMeta ToggleTriggerAnchor">
                <div class="privateControls">
                    <span class="item muted">
                        <span class="authorEnd"><a class="username author" dir="auto">VVoid</a>,</span>
                        <a href="{{ '/threads/community-entity-ui.9151/#post-96327' | prepend: site.baseurl }}" title="Permalink" class="datePermalink"><span class="DateTime"
                                title="Jun 6, 2015 at 1:06 PM">Jun 6, 2015</span></a>
                    </span>
                </div>
                <div class="publicControls">
                    <a href="{{ '/threads/community-entity-ui.9151/#post-96327' | prepend: site.baseurl }}" title="Permalink" class="item muted postNumber hashPermalink OverlayTrigger"
                        data-href="posts/96327/permalink">#9</a>
                </div>
            </div>
        </div>
    </li>
    <li id="post-96383" class="message" data-author="ShadowEvil">
        <div class="messageUserInfo">
            <div class="messageUserBlock">
                <div class="avatarHolder">
                    <span class="helper"></span>
                    <a class="avatar Avm" data-avatarhtml="true"><img src="{{ '/assets/styles/oxide/logo.og.png' | prepend: site.baseurl }}" width="96" height="96" alt="ShadowEvil" /></a>
                </div>
                <h3 class="userText">
                    <a class="username" dir="auto">ShadowEvil</a>
                </h3>
                <span class="arrow"></span>
            </div>
        </div>
        <div class="messageInfo primaryContent">
            <div class="messageContent">
                <article>
                    <blockquote class="messageText SelectQuoteContainer ugc baseHtml">Yeah, but it&#039;s horribly refreshed. it doesn&#039;t destroy very quickly... Takes about 100ms to actually do
                        anything on the client&#039;s screen... The way I had to do it was this...<br />
                        <div class="bbCodeBlock bbCodeCode">
                            <div class="type">Code:</div>
                            {% raw %}<pre>            PluginTimers t = new PluginTimers(this);
            if (gui != null)
                gui.ProfileGUI_remove(player);
            if (args != null &amp;&amp; args.Length &gt;= 1 &amp;&amp; args[0].ToLower() == &quot;hide&quot;) return;
            t.Once(0.100f, () =&gt; InsertNewGUI(PanelName, player));</pre>{% endraw %}
                        </div>
                        <div class="messageTextEndMarker">&nbsp;</div>
                    </blockquote>
                </article>
            </div>
            <div class="messageMeta ToggleTriggerAnchor">
                <div class="privateControls">
                    <span class="item muted">
                        <span class="authorEnd"><a class="username author" dir="auto">ShadowEvil</a>,</span>
                        <a href="{{ '/threads/community-entity-ui.9151/#post-96383' | prepend: site.baseurl }}" title="Permalink" class="datePermalink"><span class="DateTime"
                                title="Jun 6, 2015 at 5:28 PM">Jun 6, 2015</span></a>
                    </span>
                </div>
                <div class="publicControls">
                    <a href="{{ '/threads/community-entity-ui.9151/#post-96383' | prepend: site.baseurl }}" title="Permalink" class="item muted postNumber hashPermalink OverlayTrigger"
                        data-href="posts/96383/permalink">#10</a>
                </div>
            </div>
        </div>
    </li>
    <li id="post-96390" class="message" data-author="VVoid">
        <div class="messageUserInfo">
            <div class="messageUserBlock">
                <div class="avatarHolder">
                    <span class="helper"></span>
                    <a class="avatar Avm" data-avatarhtml="true"><img src="{{ '/assets/styles/oxide/logo.og.png' | prepend: site.baseurl }}" width="96" height="96" alt="VVoid" /></a>
                </div>
                <h3 class="userText">
                    <a class="username" dir="auto">VVoid</a>
                </h3>
                <span class="arrow"></span>
            </div>
        </div>
        <div class="messageInfo primaryContent">
            <div class="messageContent">
                <article>
                    <blockquote class="messageText SelectQuoteContainer ugc baseHtml">I have attempted to create an UI builder extension for my needs (instead of working with json by hands, hate
                        it).<br /> Here is some result for the moment:<br />
                        <span style="text-decoration: underline"><a href="https://gist.github.com/virtyvoid/5967185f1df5486e6bc6" target="_blank" class="externalLink" rel="nofollow">Sample Plugin
                                (Usage)</a><br />
                        </span><br />
                        <img src="proxy.php?image=http%3A%2F%2Fi.imgur.com%2FEudCNtR.jpg&amp;hash=835164dac7d466812a7f060b603b20cd" class="bbCodeImage LbImage" alt="[&#x200B;IMG]"
                            data-url="http://i.imgur.com/EudCNtR.jpg" /><br />
                        <br /> The code of extension is a bit complicated, but seems now easier to maintain the UI.<br /> Will this have any interest or pure json is better? <img
                            src="{{ '/assets/styles/default/xenforo/clear.png' | prepend: site.baseurl }}" class="mceSmilieSprite mceSmilie1" alt=":)" title="Smile    :)" />
                        <div class="messageTextEndMarker">&nbsp;</div>
                    </blockquote>
                </article>
            </div>
            <div class="messageMeta ToggleTriggerAnchor">
                <div class="privateControls">
                    <span class="item muted">
                        <span class="authorEnd"><a class="username author" dir="auto">VVoid</a>,</span>
                        <a href="{{ '/threads/community-entity-ui.9151/#post-96390' | prepend: site.baseurl }}" title="Permalink" class="datePermalink"><span class="DateTime"
                                title="Jun 6, 2015 at 6:17 PM">Jun 6, 2015</span></a>
                    </span>
                </div>
                <div class="publicControls">
                    <a href="{{ '/threads/community-entity-ui.9151/#post-96390' | prepend: site.baseurl }}" title="Permalink" class="item muted postNumber hashPermalink OverlayTrigger"
                        data-href="posts/96390/permalink">#11</a>
                </div>
            </div>
        </div>
    </li>
    <li id="post-96397" class="message staff" data-author="Wulf">
        <div class="messageUserInfo">
            <div class="messageUserBlock">
                <div class="avatarHolder">
                    <span class="helper"></span>
                    <a class="avatar Avm" data-avatarhtml="true"><img src="{{ '/assets/styles/oxide/logo.og.png' | prepend: site.baseurl }}" width="96" height="96" alt="Wulf" /></a>
                </div>
                <h3 class="userText">
                    <a class="username" dir="auto" itemprop="name">Wulf</a>
                    <em class="userBanner bannerRed wrapped" itemprop="title"><span class="before"></span><strong>Community Admin</strong><span class="after"></span></em>
                </h3>
                <span class="arrow"></span>
            </div>
        </div>
        <div class="messageInfo primaryContent">
            <div class="messageContent">
                <article>
                    <blockquote class="messageText SelectQuoteContainer ugc baseHtml">
                        <div class="bbCodeBlock bbCodeQuote" data-author="VVoid">
                            <aside>
                                <div class="attribution type">VVoid said: <a href="#post-96390" class="AttributionLink">&uarr;</a>
                                </div>
                                <blockquote class="quoteContainer">
                                    <div class="quote">I have attempted to create an UI builder extension for my needs (instead of working with json by hands, hate it).<br /> Here is some result for
                                        the moment:<br />
                                        <span style="text-decoration: underline"><a href="https://gist.github.com/virtyvoid/5967185f1df5486e6bc6" target="_blank" class="externalLink">Sample Plugin
                                                (Usage)</a><br />
                                        </span><br />
                                        <img src="proxy.php?image=http%3A%2F%2Fi.imgur.com%2FEudCNtR.jpg&amp;hash=835164dac7d466812a7f060b603b20cd" class="bbCodeImage LbImage" alt="[&#x200B;IMG]"
                                            data-url="http://i.imgur.com/EudCNtR.jpg" /><br />
                                        <br /> The code of extension is a bit complicated, but seems now easier to maintain the UI.<br /> Will this have any interest or pure json is better? <img
                                            src="{{ '/assets/styles/default/xenforo/clear.png' | prepend: site.baseurl }}" class="mceSmilieSprite mceSmilie1" alt=":)" title="Smile    :)" />
                                    </div>
                                    <div class="quoteExpand">Click to expand...</div>
                                </blockquote>
                            </aside>
                        </div>Instead of making an extension that everyone may not be able to install, you could create a CuiHelper.cs plugin and then let authors decide how to use that. <div
                            class="messageTextEndMarker">&nbsp;</div>
                    </blockquote>
                </article>
            </div>
            <div class="messageMeta ToggleTriggerAnchor">
                <div class="privateControls">
                    <span class="item muted">
                        <span class="authorEnd"><a class="username author" dir="auto">Wulf</a>,</span>
                        <a href="{{ '/threads/community-entity-ui.9151/#post-96397' | prepend: site.baseurl }}" title="Permalink" class="datePermalink"><span class="DateTime"
                                title="Jun 6, 2015 at 6:40 PM">Jun 6, 2015</span></a>
                    </span>
                </div>
                <div class="publicControls">
                    <a href="{{ '/threads/community-entity-ui.9151/#post-96397' | prepend: site.baseurl }}" title="Permalink" class="item muted postNumber hashPermalink OverlayTrigger"
                        data-href="posts/96397/permalink">#12</a>
                </div>
            </div>
        </div>
    </li>
    <li id="post-96398" class="message" data-author="ShadowEvil">
        <div class="messageUserInfo">
            <div class="messageUserBlock">
                <div class="avatarHolder">
                    <span class="helper"></span>
                    <a class="avatar Avm" data-avatarhtml="true"><img src="{{ '/assets/styles/oxide/logo.og.png' | prepend: site.baseurl }}" width="96" height="96" alt="ShadowEvil" /></a>
                </div>
                <h3 class="userText">
                    <a class="username" dir="auto">ShadowEvil</a>
                </h3>
                <span class="arrow"></span>
            </div>
        </div>
        <div class="messageInfo primaryContent">
            <div class="messageContent">
                <article>
                    <blockquote class="messageText SelectQuoteContainer ugc baseHtml">
                        <div class="bbCodeBlock bbCodeQuote" data-author="VVoid">
                            <aside>
                                <div class="attribution type">VVoid said: <a href="#post-96390" class="AttributionLink">&uarr;</a>
                                </div>
                                <blockquote class="quoteContainer">
                                    <div class="quote">I have attempted to create an UI builder extension for my needs (instead of working with json by hands, hate it).<br /> Here is some result for
                                        the moment:<br />
                                        <span style="text-decoration: underline"><a href="https://gist.github.com/virtyvoid/5967185f1df5486e6bc6" target="_blank" class="externalLink  rel="
                                                nofollow">Sample Plugin (Usage)</a><br />
                                        </span><br />
                                        <img src="proxy.php?image=http%3A%2F%2Fi.imgur.com%2FEudCNtR.jpg&amp;hash=835164dac7d466812a7f060b603b20cd" class="bbCodeImage LbImage" alt="[&#x200B;IMG]"
                                            data-url="http://i.imgur.com/EudCNtR.jpg" /><br />
                                        <br /> The code of extension is a bit complicated, but seems now easier to maintain the UI.<br /> Will this have any interest or pure json is better? <img
                                            src="{{ '/assets/styles/default/xenforo/clear.png' | prepend: site.baseurl }}" class="mceSmilieSprite mceSmilie1" alt=":)" title="Smile    :)" />
                                    </div>
                                    <div class="quoteExpand">Click to expand...</div>
                                </blockquote>
                            </aside>
                        </div>It really depends in how intuitive Rust gets with it&#039;s Custom UI... Right now making a builder for the UI might be pointless... Since it&#039;s so early thing&#039;s
                        will change. Honestly idk why he is using Json... Xml would be better honestly. Lol<br /> [DOUBLEPOST=1433612730][/DOUBLEPOST]And the use of PluginTimer to refresh information
                        is a pain in the ass... Having to reload the information by destroying it and rewriting it is a horrible method :/ but it&#039;s what works right now... And the only way I
                        could get it to refresh was to add a slight delay on when it redraw&#039;s itself <div class="messageTextEndMarker">&nbsp;</div>
                    </blockquote>
                </article>
            </div>
            <div class="messageMeta ToggleTriggerAnchor">
                <div class="privateControls">
                    <span class="item muted">
                        <span class="authorEnd"><a class="username author" dir="auto">ShadowEvil</a>,</span>
                        <a href="{{ '/threads/community-entity-ui.9151/#post-96398' | prepend: site.baseurl }}" title="Permalink" class="datePermalink"><span class="DateTime"
                                title="Jun 6, 2015 at 6:43 PM">Jun 6, 2015</span></a>
                    </span>
                </div>
                <div class="publicControls">
                    <a href="{{ '/threads/community-entity-ui.9151/#post-96398' | prepend: site.baseurl }}" title="Permalink" class="item muted postNumber hashPermalink OverlayTrigger"
                        data-href="posts/96398/permalink">#13</a>
                </div>
            </div>
        </div>
    </li>
    <li id="post-96710" class="message" data-author="Zuen">
        <div class="messageUserInfo">
            <div class="messageUserBlock">
                <div class="avatarHolder">
                    <span class="helper"></span>
                    <a class="avatar Avm" data-avatarhtml="true"><img src="{{ '/assets/styles/oxide/logo.og.png' | prepend: site.baseurl }}" width="96" height="96" alt="Zuen" /></a>
                </div>
                <h3 class="userText">
                    <a class="username" dir="auto">Zuen</a>
                </h3>
                <span class="arrow"></span>
            </div>
        </div>
        <div class="messageInfo primaryContent">
            <div class="messageContent">
                <article>
                    <blockquote class="messageText SelectQuoteContainer ugc baseHtml">Well, I think I might actually work on some library/class to help simplify the json crap. it should be fairly easy
                        once the basics is written up. It&#039;s an Alpha game and the UI is very early but possesses a lot of potential. F
// ... [Code preview truncated due to length. Full source in attached file] ...

Автор
15FPS
Скачиваний
0
Просмотры
1
Первый выпуск
Обновление
Оценка
0.00 звёзд 0 оценок
Сверху