LCDInfo.com

http://www.lcdinfo.com
It is currently Sat Dec 21, 2024 16:37

All times are UTC + 2 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject:
PostPosted: Thu Jan 20, 2005 4:22 
Offline
User avatar

Joined: Fri Dec 03, 2004 7:03
Posts: 201
Location: Sydney, Australia
The easiest way would be some sort of priority system with screens given priority values, which the core checks when a flag gets changed.

Is there an interupt system in place for that <requireflag>? or is it only checked on changing to that screen?

To properly implement a sequencing function, I think it should all be done in the screens.xml. Even to the point of removing the current <action> tag in the screens files themselves and moving that function to the screens.xml. This would make the individual screens autonomous, and independant of each other. Where as the current system allows for one screen to call another that isn't actually in the screens.xml file.

Anyway, just tossing some idea's around. Fell free to add, flame, think and reinvent. ;)

Hopefully with some well defined features that need adding, we might get some more programmers interested in volunteering a few hours to implement them. :)

_________________
Syridian,
http://syridian.com


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 20, 2005 16:21 
Offline

Joined: Thu Jan 20, 2005 16:16
Posts: 3
Location: The Netherlands
Syridian wrote:
Fell free to add, flame, think and reinvent. ;)


What about something like this:
(already thinking about future buttonsupport, variables, list ...)
Code:
  <screen>
    <name>Menu</name>
    <layout>128x64\menu.xml</layout>
    <var>                     //idea: use variables in layout file ?? (multiple menu's, 1 layout)
      <name>Caption</name>    //in layout file: %(Caption)
      <value>Main menu</value>//is replaced by this value
    </var>
    <list>
      <listitem>              //maybe future support for lists in layout file????
        <name>CPU</name>
        <text>CPU info</text>
      </listitem>
      <listitem>
        <name>Memory</name>
        <text>Mem info</text>
      </listitem>
      <defaultitem>CPU</defaultitem>
      <visible>true</visible> // support popup menu's ?? first Up/down -> visible
    </list>
    <actions>
       <action button=1>
          <showscreen>Menu</showscreen>
       </action>
       <action button=2>
          <listaction>Up</listaction>
       </action>
       <action button=3>
          <listaction>Down</listaction>
       </action>
       <action button=4>
          <showscreen>%(list.selected)</showscreen>
       </action>
    </actions>
  </screen>
  <screen>
    <name>CPU</name>
    <layout>128x64\cpu.xml</layout>
     ...
</screens>

and ofcourse also something like <action flag=Winamp.playing>


Top
 Profile  
 
 Post subject: More wood?
PostPosted: Thu Jan 20, 2005 23:44 
Offline
User avatar

Joined: Fri Dec 03, 2004 7:03
Posts: 201
Location: Sydney, Australia
I like your thinking...

I would still prefer to use a seperate screens.xml file with all of the screen interaction like you have discribed above, but referancing seperate screen files, like it corrently does. This way each screen file would be a seperate entity and screens could be traded on the forum. You screens file would determin how those screens change and interact.

At the moment the screens.xml file is really just a list of files, with there directories, just to point LCDinfo to where the file is. But expanding this with what you have described above would greatly increase the functionality as well as make it easier for users to trade and offer premade screens for others to download and use.

Anyway... more wood for the fire.... Burn baby burn. ;) Lets stoke this fire until it cannot be ignored. ;)

_________________
Syridian,
http://syridian.com


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 21, 2005 10:06 
Offline

Joined: Sun May 05, 2002 22:05
Posts: 2063
Location: Lappeenranta, Finland
I like your ideas there.

Button support and menus, etc. have been in my mind for future expansion. When the action / event system will be little more complete button support should be easy. Reading buttons shouldn't be a problem even now but there isn't that much that could be attached to the button presses except screen changes.

hd196:
I can already see what you mean with the lists but I can't be sure of everything you thought how it should work. If you'd like to make a little more complete description of your ideas we should be able to line up our minds better and try to figure out possible problems and how to avoid them.

Also that layout system interests me as I think I get the basic idea but most likely I don't understand all details (I know you probably don't either ;) ) of how you thought everything should interact.


Top
 Profile  
 
 Post subject: screens.xml
PostPosted: Fri Jan 21, 2005 19:34 
Offline

Joined: Thu Jan 20, 2005 16:16
Posts: 3
Location: The Netherlands
@Syridian
Hmm, it seems part of my xml has disappeared. At the beginning of it a <screens> tag is missing, that xml should go in the screens.xml file. So, i agree the action tags should be in screens.xml
Another action could be <action timeout=1000> to wait 1 second (f.e. for a intro, i also described that, but i think I forgot to paste that part).

@Henri
What i mean with the layout tag is just a reference to a screen xml file. Could(should?) have used a <screenfile> tag.
My idea of using lists:
- put the list items in the screens.xml file (static list like i described before) or use a list which gets it's data from a plugin(reads xml/database/playlist/unread mail/etc).
- use something like this in the layout xml-file:
Code:
<item type="list"  x=10 y=20 w=50 h=40>
<listid>userlist</listid>
</item>

or

<item type="list" x=10 y=20 w=50 h=40>
<listid>winamp2.playlist</listid>
</item>


and then use the action tags in the screens.xml file to define button/keyboard actions to scroll through and select from the list.

Quote:
Reading buttons shouldn't be a problem even now but there isn't that much that could be attached to the button presses except screen changes.

Not now, but maybe later execute external program's? (f.e. start winamp.exe). Browse playlists? Select a file from a playlist?

And what about:
Code:
<item type="uservariable" x=3 y=5>
<varid>Caption</var>
</item>

for referencing user-defined variables? Or use %(varid)? I prefer the last one, because then
Code:
<item type="image"...><imagebitmap>images/%(mylogonamevar).bmp</...>

could be possible. But i think the first one is more non-programmer friendly.

All actions/variables/lists should in my opinion be defined in screens.xml. The other xml files just describe the screen layout, referencing lists, images and variables (and contain static text tags).

I'm just sharing my :idea:'s. Feel free to do with them what you want.
To clarify things, I'll try to make some more detailed examples.

Now, if I only got my Nokia 3310 lcd to work...


Top
 Profile  
 
 Post subject: screens.xml proposal
PostPosted: Fri Jan 21, 2005 20:11 
Offline

Joined: Thu Jan 20, 2005 16:16
Posts: 3
Location: The Netherlands
This one (screens.xml) explains itself I hope.

Code:
// button 1 = left/escape
// button 2 = Up
// button 3 = Down
// button 4 = right/ok

<screens>

// Introduction screen
  <screen>
    <id>Intro</id>
    <layout>128x64\intro.xml</layout>
    <actions>
      <action timeout=2000>
        <showscreen>MainMenu</showscreen>
      </action>
      <action button=1>
        <showscreen>MainMenu</showscreen>
      </action>
    </actions>
  </screen>

// Main menu
// menu.xml contains a <item type="list"> with a <listid>userlist</listid> tag
// and a <item type="var"> tag with <varid>Caption</varid>
  <screen>
    <id>MainMenu</id>
    <layout>128x64\menu.xml</layout>
    <var>
      <name>Caption</name>
      <value>Main menu</value>
    </var>
    <list>
      <listitem>
        <id>Sysinfomenu</id>
        <text>System info</text>
      </listitem>
      <listitem>
        <id>WinampStatus</id>
        <text>Winamp status</text>
      </listitem>
      <listitem>
        <id>WinampPlaylist</id>
        <text>Select track</text>
      </listitem>
      <defaultitem>Sysinfomenu</defaultitem>
    </list>
    <actions>
       <action button=2>
          <listaction>Up</listaction>
       </action>
       <action button=3>
          <listaction>Down</listaction>
       </action>
       <action button=4>
          <showscreen>%(list.selected)</showscreen>
       </action>
    </actions>
  </screen>


// System info menu
// uses the same menu.xml layout as in MainMenu
  <screen>
    <id>Sysinfomenu</id>
    <layout>128x64\menu.xml</layout>
    <var>
      <name>Caption</name>
      <value>System info</value>
    </var>
    <list>
      <listitem>
        <id>CPU</id>
        <text>CPU info</text>
      </listitem>
      <listitem>
        <id>Memory</id>
        <text>Mem info</text>
      </listitem>
      <defaultitem>CPU</defaultitem>
    </list>
    <actions>
       <action button=1>
          <showscreen>MainMenu</showscreen>
       </action>
       <action button=2>
          <listaction>Up</listaction>
       </action>
       <action button=3>
          <listaction>Down</listaction>
       </action>
       <action button=4>
          <showscreen>%(list.selected)</showscreen>
       </action>
    </actions>
  </screen>

// CPU Info
  <screen>
    <id>CPU</id>
    <layout>128x64\cpuinfo.xml</layout>
    <actions>
       <action button=1>
          <showscreen>MainMenu</showscreen>
       </action>
    </actions>
  <screen>

// Memory info
  <screen>
    <id>Memory</id>
    <layout>128x64\meminfo.xml</layout>
    <actions>
       <action button=1>
          <showscreen>MainMenu</showscreen>
       </action>
    </actions>
  <screen>


// Winamp status screen
  <screen>
    <id>WinampStatus</id>
    <layout>128x64\winamp_status.xml</layout>
    <actions>
       <action button=1>
          <showscreen>MainMenu</showscreen>
       </action>
    </actions>
  </screen>

// Winamp playlist browser
// winamp_playlist.xml contains a <item type="list"> with a <listid
>Winamp2.Playlist</listid> tag

  <screen>
    <id>WinampPlaylist</id>
    <layout>128x64\winamp_playlist.xml</layout>
    <actions>
       <action button=1>
          <showscreen>MainMenu</showscreen>
       </action>
       <action button=2>
          <listaction>Up</listaction>
       </action>
       <action button=3>
          <listaction>Down</listaction>
       </action>
       <action button=4>
// TODO, actually I don't like this referencing a plugin from screens.xml ...
          <pluginaction>Winamp.Play</pluginaction>
          <pluginactiondata>%(list.selected)</pluginactiondata>
       </action>
    </actions>
  </screen>

</screens>


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 22, 2005 2:17 
Offline
User avatar

Joined: Fri Dec 03, 2004 7:03
Posts: 201
Location: Sydney, Australia
hd196,

Pretty impressive thinking going on there... I like it. Are you a programmer by any chance? :)

The list item is a great idea, however my non-programming mind tells me that you will need to have Plugins supporting that function for it to work properly, and that therefor requires alot of redevelopment of plugins (however I could be wrong... Henri?).

Maybe we should concentrate more on getting the current 'flags' system working, as Henri suggested, as the natural progression would require this to be functional before your menu system (which I would LOVE) could be implemented. <--- Voice of reason, now back to reality.. ;)

With a menu system in place like the one you have described, the possibilities are greatly expanded. And this would take LCDinfo out of the realm of Hobby/Modders into the whole new realm of serious product development. If in the distant future, it is possible to map buttons out of LCDinfo and control other programs, LCDinfo could become the engine to drive small LCD/button only PCs, allowing configurable network devices and all sorts of other things... But I digress.... Exciting though.. ;)

_________________
Syridian,
http://syridian.com


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 22, 2005 13:16 
Offline

Joined: Sun May 05, 2002 22:05
Posts: 2063
Location: Lappeenranta, Finland
Thanks for the additional example, I think I get it better now as there were few things I wasn't so sure about after your first post. Looking good I think and if there are some problems they probably can be seen when thinking how it exactly should be implemented in the code.


Depending of how the list feature would be implemented there might not need to be changes to the plugins. But might be better if the plugins were aware of this too.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC + 2 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group