Author Topic: Reset/Reload layout  (Read 6650 times)

liquid8d

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 442
    • View Profile
Reset/Reload layout
« on: August 04, 2015, 02:12:03 PM »
Trying to see if there is a way to re-initialize the layout. As far as I can tell, the only related signal I could see might be "reset_window", but that just seems to refresh the AM window, not the layout contents itself.

Any idea if this possible via fe.signal() or some hack?

tomek

  • Full Member
  • ***
  • Posts: 29
    • View Profile
    • About Me
Re: Reset/Reload layout
« Reply #1 on: August 04, 2015, 03:01:06 PM »
That would be an awesome feature for working with layouts, especially if it was possible to send that signal to a running instance of AM. In the UNIX world many programs are designed to react in a particular way to the signals they are sent. For example, many programs reload their config when sent SIGHUP (even though the original meaning of that signal was something different).


It would be cool to start up AM and then occasionally send "kill -HUP" to get it to reread the config in stead of having to quit and restart it. This would be an easy change to implement for any UNIX-like OS. I have no idea how you'd implement this for Windows.

liquid8d

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 442
    • View Profile
Re: Reset/Reload layout
« Reply #2 on: August 04, 2015, 03:07:03 PM »
Yep, since the layouts are read once to add objects and objects can't be removed -  I want to be able to reload the layout at certain times ( to implement per display/system/game layouts).

Technically I could add multiple layout surfaces and show/hide them, but I'd rather not load every possible layout scenario at once.

It already reloads the layout when exiting the screensaver, I just want a way to force it.

raygun

  • Administrator
  • Sr. Member
  • *****
  • Posts: 393
    • View Profile
Re: Reset/Reload layout
« Reply #3 on: August 05, 2015, 10:43:15 PM »
good idea, and easy to add.  I'll put this in for the next version.

liquid8d

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 442
    • View Profile
Re: Reset/Reload layout
« Reply #4 on: August 06, 2015, 08:00:10 AM »
That would be great! It looks like we can switch filters and lists already with the same layout, so just need a way to change the actual layout when necessary. Technically you could use the multi-layouts (layout-*.nut) and toggle through them, but this would allow for it to programmatically change.

My goal is for my theme module (WIP) to allow for something similar to Hyperspin - different themes/layouts based on current game, current list or current filter or even other properties (like year, category, etc)
« Last Edit: August 06, 2015, 08:02:25 AM by liquid8d »