Jump to content

[FM21] Auto hide sidebar help


BlueScreen
 Share

Recommended Posts

I need help on making the sidebar auto hide.

Spoiler

 

<container>
                <layout class="stick_to_sides_attachment" alignment="vertical" inset="0" apply_to_children="true" />

                <attachment class="event_relay_attachment" event_id="msen">
                <record id="action_event">
                <flags id="event_id" value="ShSb" />
                <integer id="evfl" value="7" />
                <flags id="evtg" value="root" />
                <boolean id="width" value="160" />
                </record>
                </attachment>
                <attachment class="event_relay_attachment" event_id="msex">
                <record id="action_event">
                <flags id="event_id" value="HiSb" />
                <integer id="evfl" value="7" />
                <flags id="evtg" value="root" />
                <boolean id="width" value="260" />
                </record>
                </attachment>

                <animation class="translate_animation" start_value="-155,0" end_value="-155,0" duration="2" end_mode="hold_end" coord_mode="absolute_to_target" apply_to_mouse="true" />
                <animation class="translate_animation" trigger_start="ShSb" trigger_end="HiSb" end_mode="hold_auto_reverse_hold" coord_mode="absolute_to_target" apply_to_mouse="true">
                <!-- This is really just a normal slide out but some extra waiting is required at the end to compensate for a timing issue when pausing-->
                <list id="storyboard">
                <record interval="0.0" value="0,0" tween="ease_in_out" />
                <record interval="0.3" value="155,0" tween="linear" />
                <record interval="0.4" value="155,0" tween="linear" />
                </list>
                </animation> 
                <widget class="sidebar_menu_table" id="side">   

      <record id="object_property">
      <integer id="get_property" value="objt" />
      <integer id="set_property" value="cotO" />
      </record>
      <attachment class="test_global_attachment" get_property="MnuS" mode="1" value="true" set_property="FoHi" skip_if_null="true"/>
      <attachment class="test_screen_size_attachment" alignment="horizontal" min_value="0" max_value="160" set_property="widt" true_value="45" false_value="160"/>
    </widget>
</container>

 

I think this is the code used, but I don't know in which part of the client object browser.xml to put it.

Can anyone help me with this. I'm using the default skin, by the way.

Link to post
Share on other sites

BIRcJAn.png

Which panel controls the height of this? As you can see i have to scroll down to see the goalkeeper, so I want to make it small so I don't have to.

 

EDIT:

mGxVTtx.png

Also, which file controls the boldness of this? This is in the inbox screen

Edited by BlueScreen
Link to post
Share on other sites

On 24/11/2020 at 13:28, BlueScreen said:

I need help on making the sidebar auto hide.

  Hide contents

 

<container>
                <layout class="stick_to_sides_attachment" alignment="vertical" inset="0" apply_to_children="true" />

                <attachment class="event_relay_attachment" event_id="msen">
                <record id="action_event">
                <flags id="event_id" value="ShSb" />
                <integer id="evfl" value="7" />
                <flags id="evtg" value="root" />
                <boolean id="width" value="160" />
                </record>
                </attachment>
                <attachment class="event_relay_attachment" event_id="msex">
                <record id="action_event">
                <flags id="event_id" value="HiSb" />
                <integer id="evfl" value="7" />
                <flags id="evtg" value="root" />
                <boolean id="width" value="260" />
                </record>
                </attachment>

                <animation class="translate_animation" start_value="-155,0" end_value="-155,0" duration="2" end_mode="hold_end" coord_mode="absolute_to_target" apply_to_mouse="true" />
                <animation class="translate_animation" trigger_start="ShSb" trigger_end="HiSb" end_mode="hold_auto_reverse_hold" coord_mode="absolute_to_target" apply_to_mouse="true">
                <!-- This is really just a normal slide out but some extra waiting is required at the end to compensate for a timing issue when pausing-->
                <list id="storyboard">
                <record interval="0.0" value="0,0" tween="ease_in_out" />
                <record interval="0.3" value="155,0" tween="linear" />
                <record interval="0.4" value="155,0" tween="linear" />
                </list>
                </animation> 
                <widget class="sidebar_menu_table" id="side">   

      <record id="object_property">
      <integer id="get_property" value="objt" />
      <integer id="set_property" value="cotO" />
      </record>
      <attachment class="test_global_attachment" get_property="MnuS" mode="1" value="true" set_property="FoHi" skip_if_null="true"/>
      <attachment class="test_screen_size_attachment" alignment="horizontal" min_value="0" max_value="160" set_property="widt" true_value="45" false_value="160"/>
    </widget>
</container>

 

I think this is the code used, but I don't know in which part of the client object browser.xml to put it.

Can anyone help me with this. I'm using the default skin, by the way.

Client object browser added in later post

Sidebar hidden.png

Sidebar showing.png

Edited by a31632
Link to post
Share on other sites

Thanks, man, I'll give it a try, will report back with the results 👍

Edti: Couldn't make it work. Deleted the parts you told me, but it just gives some sort of error, it doesn't even show anything. Thanks anyway! 

Edited by BlueScreen
Link to post
Share on other sites

2 hours ago, BlueScreen said:

Thanks, man, I'll give it a try, will report back with the results 👍

Edti: Couldn't make it work. Deleted the parts you told me, but it just gives some sort of error, it doesn't even show anything. Thanks anyway! 

It's best you use "Notepad ++" for editing, if you delete wrong code it will give you an error when saving, otherwise, to your point, you will get errors when loading the skin/game.

Send me your file and I will edit it for you properly

Link to post
Share on other sites

1 hora atrás, a31632 disse:

It's best you use "Notepad ++" for editing, if you delete wrong code it will give you an error when saving, otherwise, to your point, you will get errors when loading the skin/game.

Send me your file and I will edit it for you properly

Here's the problem, I'm using Notepad ++ :lol: I basically change things by trail and error, and in this one I can´t seem to make it work, I'm not very  good at this.

Here's the skin, thanks very much for your help :thup:

base21.rar

Link to post
Share on other sites

1 hour ago, BlueScreen said:

Here's the problem, I'm using Notepad ++ :lol: I basically change things by trail and error, and in this one I can´t seem to make it work, I'm not very  good at this.

Here's the skin, thanks very much for your help :thup:

base21.rar 890.85 kB · 0 downloads

Yes, the code for the sidebar was also in the middle portion of the file, I tested it and it's working now with the changes I made.

I changed the header section of the skin in addition, so it is on the full width of the screen, that way when the sidebar goes from hidden to unhidden the top portion stays unchanged (otherwise it looks goofy with the header being covered by the sidebar)

Only need to replace the "client object browser" and reload the skin.

client object browser.xml

Edited by a31632
Link to post
Share on other sites

  • 1 year later...
On 28/11/2020 at 23:33, a31632 said:

Yes, the code for the sidebar was also in the middle portion of the file, I tested it and it's working now with the changes I made.

I changed the header section of the skin in addition, so it is on the full width of the screen, that way when the sidebar goes from hidden to unhidden the top portion stays unchanged (otherwise it looks goofy with the header being covered by the sidebar)

Only need to replace the "client object browser" and reload the skin.

client object browser.xml 13.44 kB · 60 downloads

Mate, I don't suppose you could point me in the right direction with regards to an auto hide sidebar? I have looked at the xml that you have attached, tried adding what I thought was the correct code and ended up with the home screen bootroom and nothing to click. I couldn't even exit the game.

Link to post
Share on other sites

1 minute ago, EnigMattic1 said:

Mate, I don't suppose you could point me in the right direction with regards to an auto hide sidebar? I have looked at the xml that you have attached, tried adding what I thought was the correct code and ended up with the home screen bootroom and nothing to click. I couldn't even exit the game.

The file attached was made for the specific skin only. Send me your client object browser and I will add the code for auto hide to it. the only thing you should know is that it will not work properly if the sidebar extends all the way to the top of the screen.

In that case the sidebar will overlap the header/title bar and will not look good, best way to implement a hidden sidebar is with a sidebar that is like in my screenshot below:

1798812152_Sidebarshowing.png.6071daa5b1e06475523ff77b22d59fd8.png.3890de77a8298b7308063bf47569dfb1.png

Link to post
Share on other sites

8 minutes ago, a31632 said:

The file attached was made for the specific skin only. Send me your client object browser and I will add the code for auto hide to it. the only thing you should know is that it will not work properly if the sidebar extends all the way to the top of the screen.

In that case the sidebar will overlap the header/title bar and will not look good, best way to implement a hidden sidebar is with a sidebar that is like in my screenshot below:

1798812152_Sidebarshowing.png.6071daa5b1e06475523ff77b22d59fd8.png.3890de77a8298b7308063bf47569dfb1.png

I have already extended the header across, that wasn't that difficult. This? Confuses me.

Thanks, I appreciate the help.

client object browser.xml

Link to post
Share on other sites

  • 10 months later...

Time to revive an almost 1 year old thread (sorry)!

@a31632 - would you be able to explain how this works?  I've taken a look at the attached files and come away feeling very confused!!?  I'm wondering if it would be possible to use this technique and apply it elsewhere - specifically, to have a kind of pull-out tab as per the hastily and poorly mocked up image below:

image.thumb.png.8f4439e4e0d7a020f60215ea46b93caf.png

Link to post
Share on other sites

11 hours ago, GIMN said:

Time to revive an almost 1 year old thread (sorry)!

@a31632 - would you be able to explain how this works?  I've taken a look at the attached files and come away feeling very confused!!?  I'm wondering if it would be possible to use this technique and apply it elsewhere - specifically, to have a kind of pull-out tab as per the hastily and poorly mocked up image below:

image.thumb.png.8f4439e4e0d7a020f60215ea46b93caf.png

to my understanding, it basically clips the sidebar out of the viewing window, then when you hover near it, it opens out. 

theres disabled code in one of the selectors that does something similar 

Link to post
Share on other sites

4 hours ago, bluestillidie00 said:

to my understanding, it basically clips the sidebar out of the viewing window, then when you hover near it, it opens out. 

theres disabled code in one of the selectors that does something similar 

Thank you @bluestillidie00

From my understanding, the event_relay_attachments are used to define the triggers, whilst the animation moves the element.  I've managed to get close to what I want by adding the attachment class code into the main screen content area of the client object browser, and the animation code into the player overview (for the container I'm specifically looking to move).  It doesn't seem to work if I have the event_relay_attachments inside the profile panel.

What appears to be happening is that whenever I move the mouse cursor into the "main screen area", it unhides the container.  When I move the cursor into the sidebar, header/titlebar and bottom of the screen, it hides the container.  Ideally I'd like these actions to be targetted onthe container itself, but I've been unable to work out a way to do this.

<!--IN CLIENT OBJECT BROWSER-->
<attachment class="event_relay_attachment" event_id="msen">
  <record id="action_event">
    <flags id="event_id" value="ShSb" />
    <integer id="evfl" value="7" />
    <flags id="evtg" value="root" />
  </record>
</attachment>
<attachment class="event_relay_attachment" event_id="msex">
  <record id="action_event">
    <flags id="event_id" value="HiSb" />
    <integer id="evfl" value="7" />
    <flags id="evtg" value="root" />
  </record>
</attachment>


<!--IN PLAYER OVERVIEW PANEL-->
<animation class="translate_animation" start_value="270,0" end_value="270,0" duration="2" end_mode="hold_end" coord_mode="absolute_to_target" apply_to_mouse="true" />
<animation class="translate_animation" trigger_start="ShSb" trigger_end="HiSb" end_mode="hold_auto_reverse_hold" coord_mode="absolute_to_target" apply_to_mouse="true">
  <list id="storyboard">
    <record interval="0.0" value="270,0" tween="ease_in_out" />
    <record interval="0.7" value="10,0" tween="linear" />
    <record interval="0.9" value="10,0" tween="linear" />
  </list>
</animation>

My biggest concern, however, is that a lot of what I've said above is assumptions.  I have absolutely zero knowledge of what I'm actually doing, and whilst trial and error's got me so far, I think I need an extra nudge to help me understand what is actually going on here!!  I've searched within the base game files for other examples of evfl (it's always "7") and evtg, but that's yielded no help so far.:applause:

Link to post
Share on other sites

3 minutes ago, GIMN said:

Thank you @bluestillidie00

From my understanding, the event_relay_attachments are used to define the triggers, whilst the animation moves the element.  I've managed to get close to what I want by adding the attachment class code into the main screen content area of the client object browser, and the animation code into the player overview (for the container I'm specifically looking to move).  It doesn't seem to work if I have the event_relay_attachments inside the profile panel.

What appears to be happening is that whenever I move the mouse cursor into the "main screen area", it unhides the container.  When I move the cursor into the sidebar, header/titlebar and bottom of the screen, it hides the container.  Ideally I'd like these actions to be targetted onthe container itself, but I've been unable to work out a way to do this.

<!--IN CLIENT OBJECT BROWSER-->
<attachment class="event_relay_attachment" event_id="msen">
  <record id="action_event">
    <flags id="event_id" value="ShSb" />
    <integer id="evfl" value="7" />
    <flags id="evtg" value="root" />
  </record>
</attachment>
<attachment class="event_relay_attachment" event_id="msex">
  <record id="action_event">
    <flags id="event_id" value="HiSb" />
    <integer id="evfl" value="7" />
    <flags id="evtg" value="root" />
  </record>
</attachment>


<!--IN PLAYER OVERVIEW PANEL-->
<animation class="translate_animation" start_value="270,0" end_value="270,0" duration="2" end_mode="hold_end" coord_mode="absolute_to_target" apply_to_mouse="true" />
<animation class="translate_animation" trigger_start="ShSb" trigger_end="HiSb" end_mode="hold_auto_reverse_hold" coord_mode="absolute_to_target" apply_to_mouse="true">
  <list id="storyboard">
    <record interval="0.0" value="270,0" tween="ease_in_out" />
    <record interval="0.7" value="10,0" tween="linear" />
    <record interval="0.9" value="10,0" tween="linear" />
  </list>
</animation>

My biggest concern, however, is that a lot of what I've said above is assumptions.  I have absolutely zero knowledge of what I'm actually doing, and whilst trial and error's got me so far, I think I need an extra nudge to help me understand what is actually going on here!!  I've searched within the base game files for other examples of evfl (it's always "7") and evtg, but that's yielded no help so far.:applause:

Yeah i'm not much help i'm afraid, animations is incredibly weird and not documented at all

Link to post
Share on other sites

3 minutes ago, bluestillidie00 said:

Yeah i'm not much help i'm afraid, animations is incredibly weird and not documented at all

"incredibly weird and not documented" is probably how I'd describe everything with skinning

(that's not a slight on the awesome help from these forums, nor a dig at SI who have absolutely no obligation to provide a neatly documented breakdown of their code, tags, parameters, etc...)

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...