android
  #1  
Old 10-28-2012, 06:43 PM
jbob182's Avatar
jbob182 jbob182 is offline
X-Fi2 Development Moderator
 
Join Date: Feb 2010
Location: The U.S.A.
Posts: 554
Page ZenFrame - An application framework for the Creative Zen Xfi2

ZenFrame is a framework that allows for cleaner, more organized, and faster application development.

Download/Documentation
Download: https://bitbucket.org/jbob182/zenframe
  • Click the (download) link on the overview page. It is next to the Size entry on the table which is located on the upper-right
  • You can also go to the Downloads tab, and click Branches then the zip link
Wiki : https://bitbucket.org/jbob182/zenframe/wiki/Home
How to use
  • Config.lua stores the application information.
  • Screens are a way to divide up the ui into several files in order to make it more readable and easier to debug and edit.
  • The Resources library will automatically mange images/sound, so there is no need to manually unload them and clean ram when using this framework.
  • Texture Packs can be made using gdx texture packer. Please note that the zen has a height limit on images, (around 512 I believe)
Todo
  • Better documentation
  • Create a collection of user-made libraries
  • Keyboard library

Last edited by jbob182; 10-31-2012 at 03:56 PM.
Reply With Quote

Advertisement [Remove Advertisement]

  #2  
Old 10-29-2012, 10:40 AM
Redwolfhome's Avatar
Redwolfhome Redwolfhome is offline
Junior Member
 
Join Date: Mar 2010
Location: Germany
Posts: 91
Default

This framework looks great. I love the screens, texture packs and all of this small useful functions. Maybe you could include templates for buttons, checkboxes, ... just a few ui elements in the next version. Maybe they can allow me to choose a image and then your franework handles the user input and drawing of my elements...
Reply With Quote

  #3  
Old 10-29-2012, 09:56 PM
jbob182's Avatar
jbob182 jbob182 is offline
X-Fi2 Development Moderator
 
Join Date: Feb 2010
Location: The U.S.A.
Posts: 554
Default

Version 1.1 released. This update includes a UI library, which will automatically manage buttons and other ui elements. See the wiki page for more documentation. If you wish to see a better example on how to use this framework, check out my Graphing Calculator , it uses the newest version of the framework.
Reply With Quote

  #4  
Old 10-30-2012, 07:15 PM
jbob182's Avatar
jbob182 jbob182 is offline
X-Fi2 Development Moderator
 
Join Date: Feb 2010
Location: The U.S.A.
Posts: 554
Default

It seems that the TexturePack parser is crashing, but only on the Zen. As of right now I have no idea why. It might be because of the file path that is used, but I am not sure. If anyone has any theories it would be greatly appreciated (I am running out of ideas).
Reply With Quote

  #5  
Old 10-31-2012, 12:07 PM
Redwolfhome's Avatar
Redwolfhome Redwolfhome is offline
Junior Member
 
Join Date: Mar 2010
Location: Germany
Posts: 91
Default

Hmm I am not sure if this bug causes the crash on the zen but I downloaded your newest version and it crashed for me in Resources.lua in drawImageRegion
because imageArray[imageID][id] was nil.
I fixed this problem for me with
Code:
if (imageArray[imageID][id] ~= nil) then
	imageArray[imageID .. '-file']:draw(...
and then I got this error message from your framework

Code:
Error:
------File:Resources
------Function:getImageRegion
------Reason:The region button does not exist
Lua Run Error : [string ".\ZenFrame/ErrorHandler.lua"]:41: STOP
So your framework can not find the button region but its in the ui.pack file..
I will try to find now the source of this bug..
Reply With Quote

  #6  
Old 10-31-2012, 12:54 PM
Redwolfhome's Avatar
Redwolfhome Redwolfhome is offline
Junior Member
 
Join Date: Mar 2010
Location: Germany
Posts: 91
Default

I fixed my problem. In TexturePack.lua you used an variable in parse() which is called "argument". The content of this variable starts with two spaces. So i just used a trim function:

Code:
function trim (s)
  return (string.gsub(s, "^%s*(.-)%s*$", "%1"))
end
And changed one line:

Code:
local argument = trim(line:sub(0,line:find(':')-1));
And the code runs fine for me (i haven't tested it yet on the Zen)
Reply With Quote

  #7  
Old 10-31-2012, 02:56 PM
jbob182's Avatar
jbob182 jbob182 is offline
X-Fi2 Development Moderator
 
Join Date: Feb 2010
Location: The U.S.A.
Posts: 554
Default

Oh...... The version I uploaded that line was removed for testing purposes (I had it in there originally).

Also, to help avoid these upload issues and to make versions easier to manage, ZenFrame is now hosted on BitBucket through git, along with a wiki and an issue tracker which anyone can post on (https://bitbucket.org/jbob182/zenframe). Currently, I have bit bucket using the ZenFrame folder used by the simulator, so the correct version will always be uploaded (the current version has the trim line).

Also, crashing has been fixed on the Zen, the atlas-image used was too big (Not sure why, it is not too big on the x axis nor the y axis, it could be a combination of both)

Last edited by jbob182; 10-31-2012 at 06:46 PM.
Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 10:26 AM.