Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: foo_looks 2.0 (RC1) (Read 286484 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

foo_looks 2.0 (RC1)

Reply #475
Quote
New look available: Carbon by DocUK



DocUK

Many thanks DocUK, I made a little modification of font, silkscreen looks good but lacks unicode support .

foo_looks 2.0 (RC1)

Reply #476
I can't figure out how to get rid of all decimals that is returned from
look_measureTextAbs(sprite).width
I want a number without decimals, would that mean turning it into an "int"?

Anyone?

foo_looks 2.0 (RC1)

Reply #477
Quote
I can't figure out how to get rid of all decimals that is returned from
look_measureTextAbs(sprite).width
I want a number without decimals, would that mean turning it into an "int"?

Anyone?

post that section of your code please

when coding my textscroll script, i rounded up to the next whole number

Code: [Select]
wholeNumber = ceil(1.2354364)


that results in 2

you can also use floor() to round down

foo_looks 2.0 (RC1)

Reply #478
@tk32: Thanks, I'll try that.

Btw: Where can I find info about ceil(), floor() and all the other such things I don't know about? I know what ceil() and floor() do, but I don't know what is supported by foo_looks...

foo_looks 2.0 (RC1)

Reply #479
Quote
@tk32: Thanks, I'll try that.

Btw: Where can I find info about ceil(), floor() and all the other such things I don't know about? I know what ceil() and floor() do, but I don't know what is supported by foo_looks...

ceil & floor are part of the math library that is included with LUA

http://lua-users.org/wiki/TutorialDirectory

here are some general tutorials [span style='font-size:8pt;line-height:100%'](check the math library tut for more like ceil & floor)[/span]

note that these tutorials are meant for LUA 5, whereas we use 4.0

however, most things work

---
i found a list of all the supported functions in lua 4.0 (although i can't find a list of definitions)

[span style='font-size:8pt;line-height:100%']arg, self, PI, _ALERT, _ERRORMESSAGE, _INPUT, _OUTPUT, _STDERR, _STDIN, _STDOUT, _VERSION, abs, acos, appendto, ascii, asin, assert, atan, atan2, call, ceil, clock, closefile, collectgarbage, copytagmethods, cos, date, debug, deg, dofile, dostring, error, execute, exit, exp, floor, flush, foreach, foreachi, foreachvar, format, frexp, gcinfo, getargs, getenv, getglobal, getinfo, getlocal, getn, gettagmethod, globals, gsub, ldexp, log, log10, max, min, mod, newtag, next, nextvar, openfile, print, rad, random, randomseed, rawget, rawgetglobal, rawgettable, rawset, rawsetglobal, rawsettable, read, readfrom, remove, rename, seek, setcallhook, setglobal, setlinehook, setlocal, setlocale, settag, settagmethod, sin, sort, sqrt, strbyte, strchar, strfind, strlen, strlower, strrep, strsub, strupper, tag, ,tan ,tinsert, tmpname, tonumber, tostring, tremove, type, write, writeto[/span]

foo_looks 2.0 (RC1)

Reply #480
Quote
i found a list of all the supported functions in lua 4.0 (although i can't find a list of definitions)

Reference manuals for all released versions of Lua can be found here: http://www.lua.org/manual/

foo_looks 2.0 (RC1)

Reply #481
Quote
Quote
@tk32: Thanks, I'll try that.

Btw: Where can I find info about ceil(), floor() and all the other such things I don't know about? I know what ceil() and floor() do, but I don't know what is supported by foo_looks...

ceil & floor are part of the math library that is included with LUA

http://lua-users.org/wiki/TutorialDirectory

here are some general tutorials [span style='font-size:8pt;line-height:100%'](check the math library tut for more like ceil & floor)[/span]

note that these tutorials are meant for LUA 5, whereas we use 4.0

however, most things work

---
i found a list of all the supported functions in lua 4.0 (although i can't find a list of definitions)

[span style='font-size:8pt;line-height:100%']arg, self, PI, _ALERT, _ERRORMESSAGE, _INPUT, _OUTPUT, _STDERR, _STDIN, _STDOUT, _VERSION, abs, acos, appendto, ascii, asin, assert, atan, atan2, call, ceil, clock, closefile, collectgarbage, copytagmethods, cos, date, debug, deg, dofile, dostring, error, execute, exit, exp, floor, flush, foreach, foreachi, foreachvar, format, frexp, gcinfo, getargs, getenv, getglobal, getinfo, getlocal, getn, gettagmethod, globals, gsub, ldexp, log, log10, max, min, mod, newtag, next, nextvar, openfile, print, rad, random, randomseed, rawget, rawgetglobal, rawgettable, rawset, rawsetglobal, rawsettable, read, readfrom, remove, rename, seek, setcallhook, setglobal, setlinehook, setlocal, setlocale, settag, settagmethod, sin, sort, sqrt, strbyte, strchar, strfind, strlen, strlower, strrep, strsub, strupper, tag, ,tan ,tinsert, tmpname, tonumber, tostring, tremove, type, write, writeto[/span]

Lua 4.0 Official Reference Manual

Chapter 4 for general language syntax (operators, structures, etc)

Chapter 6 for function reference (math, strings, etc)

foo_looks 2.0 (RC1)

Reply #482
Quote
Quote
New look available: Carbon by DocUK



DocUK

Many thanks DocUK, I made a little modification of font, silkscreen looks good but lacks unicode support . 

How many people speak Spanish anyways? I think we both know the answer is negligible

Font settings are all collected under globals for easy modification.

 

foo_looks 2.0 (RC1)

Reply #483
i've made a jumbo demo skin that demonstates:
  • basic albumart support
  • sliding panels
since both of these subjects have been raised by users recently

i also included a script called toggleMeta which is like the one i advised bogsnarth to attempt

NOTE:
this is not a proper skin - just a demonstration of some features that some users have been confused about.
--



i have a few challenges for you budding new designers that are of varying difficulty [span style='font-size:8pt;line-height:100%'](pick the one that seems most fun)[/span]:

easy
  • add some play buttons to the frame
  • add a progress bar of some kind to the skin [span style='font-size:8pt;line-height:100%'](using existing code is not cheating)[/span]
medium
  • rewrite the slidePanel script to be reusable [span style='font-size:8pt;line-height:100%'](think about how you will tell the script the min/max Y values for the panel)[/span]
  • add a new button and try making a different slidePanel script (slidePanel2?) that slides the panel when the user presses the new button [span style='font-size:8pt;line-height:100%'](you can use the same graphics as the button that's there already)[/span]
  • after completing the above challenges, add another sliding panel that slides down from the top of the frame
hard
  • add playback buttons that slide into view on top of the sliding panel [span style='font-size:8pt;line-height:100%'](this will require big changes to the slidePanel script in order to get it to also slide the buttons. you will also need to think how to disable the buttons when they are out of view)[/span]

foo_looks 2.0 (RC1)

Reply #484
Quote
Quote
New look available: Carbon by DocUK



DocUK

Many thanks DocUK, I made a little modification of font, silkscreen looks good but lacks unicode support . 

where can i find the latest version?

thx docuk, i tried out ur skin b4 on foo looks 1 but it wasnt compatible so i switched to coal hehe
btw can u make it so that right click closes foobar2000 on the close button like in coal?
also is it possible for user to fix the crash problem with foobar2000 with the old gui if they still want to use the old skins?
also dockuk is there a way to make it display the amount of time its been playing instead of remaining time? whenever i load the skin it always starts displaying remaining time

foo_looks 2.0 (RC1)

Reply #485
Quote
Quote
Is there a way to script a look to be activated (brought to front) together with fb2k?

There are no main UI callbacks/notifications of any kind to speak of in the foobar SDK so the only option is as tk32 suggested - to poll the main UI window status and then bringing the look window to the top.


Thanks danZ & tk32. Beginning to understand foo_looks more now. However, I can't seem to find suitable functions to 1) poll the main UI window's status and 2) bring to look window to top.

For 1) the best I could find was fb2k_uiIsActivated(). This only detects if fb2k is minimised to tray or not. Are there any other related functions that will allow me to detect if the main window is in focus?

For 2) I could only use look_hide() to de-activate a look but not a look_show() or something similar to activate it?

Anyway, just like to mention that you guys are doing a great job with foo_looks. Really appreciate it

foo_looks 2.0 (RC1)

Reply #486
Quote
Quote
Quote
New look available: Carbon by DocUK



DocUK

Many thanks DocUK, I made a little modification of font, silkscreen looks good but lacks unicode support . 

where can i find the latest version?

thx docuk, i tried out ur skin b4 on foo looks 1 but it wasnt compatible so i switched to coal hehe
btw can u make it so that right click closes foobar2000 on the close button like in coal?
also is it possible for user to fix the crash problem with foobar2000 with the old gui if they still want to use the old skins?
also dockuk is there a way to make it display the amount of time its been playing instead of remaining time? whenever i load the skin it always starts displaying remaining time

Download the skin here.

It wasn't compatible? You probably didn't install the font correctly.

I will change it so left button causes it to close foobar2000, and right button just closes the look. I will post here when I release the new version.

To show playing time instead of remaining time, just click the time indicator - It toggles between the two

Finally, I don't understand what you mean by fixing crash problems? foo_looks version 1 should work just fine with foobar2000.

foo_looks 2.0 (RC1)

Reply #487
Quote
also is it possible for user to fix the crash problem with foobar2000 with the old gui if they still want to use the old skins?


old skins are not compatible with foo_looks 2.0

they have to be updated, like docuk has done with carbon, for them to work

foo_looks 2.0 (RC1)

Reply #488
Quote
Quote
Quote
Is there a way to script a look to be activated (brought to front) together with fb2k?

There are no main UI callbacks/notifications of any kind to speak of in the foobar SDK so the only option is as tk32 suggested - to poll the main UI window status and then bringing the look window to the top.


Thanks danZ & tk32. Beginning to understand foo_looks more now. However, I can't seem to find suitable functions to 1) poll the main UI window's status and 2) bring to look window to top.

For 1) the best I could find was fb2k_uiIsActivated(). This only detects if fb2k is minimised to tray or not. Are there any other related functions that will allow me to detect if the main window is in focus?

For 2) I could only use look_hide() to de-activate a look but not a look_show() or something similar to activate it?

Anyway, just like to mention that you guys are doing a great job with foo_looks. Really appreciate it 

i think i discussed this with danZ before, and he said that PeterP didn't put any features into the API that told the plugin developers if the fb2k window was in focus or not

at the moment, we just have the bool you discovered: fb2k_isUiActivated

perhaps there is something in the new 0.8 sdk that will help

you'll need to wait for a reply from danZ first though.

foo_looks 2.0 (RC1)

Reply #489
Quote
i think i discussed this with danZ before, and he said that PeterP didn't put any features into the API that told the plugin developers if the fb2k window was in focus or not

at the moment, we just have the bool you discovered: fb2k_isUiActivated

perhaps there is something in the new 0.8 sdk that will help

you'll need to wait for a reply from danZ first though.

Alright, actually fb2k_UIisActivated() works fine for the moment. But what about activating a hidden look? As mentioned, I can do a look_hide() to hide a look, but can't find a function to activate it.

---
Edit: You can disregard this question. I've found that it is more efficient to use look_setVisible(sprites,[true/false]), where sprites is an array of sprites I wish to show/hide.

I'm saying this because I've found that CPU usage remains high if I use look_hide() to 'un-activate' a look that uses the CPU intensively. However, if I use look_setVisible(sprites,[true/false]), the CPU usage actually decreases.

I tested by using 'sprite spectrum', which uses a considerable amount of CPU which can be monitored using Task Manager.

However, this only works if a look is 'Always on top'. If not, there is always the possibility that the look is hidden behind other windows. So my first question still remains (through this discussion, I got confused between showing a look and bring it to the top): is there a function to bring a look to the top?

If it interests you danZ, perhaps you might want to look into ignoring all drawing when a look is 'un-activated'; it doesn't seem efficient to use CPU cycles when a look is un-activated.
---

As an aside I've been looking at components such as the console window, and foosion's foo_vis_simple_spectrum (http://www.stud.uni-karlsruhe.de/~uzbs/fb2k/html/#simple_spectrum). These components's show/hide status seem to be tied to the main UI window somehow. Tried looking at foo_vis_simple_spectrum's source to see if a similar polling technique is done to achieve this effect, but my programming skills aren't good enough to answer my own question

foo_looks 2.0 (RC1)

Reply #490
Quote
As an aside I've been looking at components such as the console window, and foosion's foo_vis_simple_spectrum (http://www.stud.uni-karlsruhe.de/~uzbs/fb2k/html/#simple_spectrum). These components's show/hide status seem to be tied to the main UI window somehow. Tried looking at foo_vis_simple_spectrum's source to see if a similar polling technique is done to achieve this effect, but my programming skills aren't good enough to answer my own question

These are so called child windows of the main window, they are shown and hidden with the main window by the operating system.

foo_looks 2.0 (RC1)

Reply #491
Quote
To show playing time instead of remaining time, just click the time indicator - It toggles between the two

it shows the -2:30 as the default, i would like to change it so it shows 0:30 as the default

to tk32 wut im wondering is, is it possible for me to fix the playlist crash error that foo_looks 1.2 has with foobar2000 because there are some older skins that i would like to use

foo_looks 2.0 (RC1)

Reply #492
Quote
Quote
To show playing time instead of remaining time, just click the time indicator - It toggles between the two

it shows the -2:30 as the default, i would like to change it so it shows 0:30 as the default

just open carbon.ski in notepad, and change this part

Code: [Select]
sprite songtime
list rect int { 385 2 30 10 }
int halign align.Center
string fspec "$ifgreater(%_istoggled%,0,%et%,-%rt%)"
list scripts string { "toggle" }


swap place of %et% & -%rt%

so it looks like this:

Code: [Select]
string fspec "$ifgreater(%_istoggled%,0,-%rt%,%et%)"


that will make elapsed time default

edit:
Quote
to tk32 wut im wondering is, is it possible for me to fix the playlist crash error that foo_looks 1.2 has with foobar2000 because there are some older skins that i would like to use


remind me about this crash - i thought 1.2 worked fine (maybe it's a 0.8 problem)

foo_looks 2.0 (RC1)

Reply #493
thx for the code
playlist_format_title_ex crash its fixed in foo looks 2.0 not in 1.2

foo_looks 2.0 (RC1)

Reply #494
To DANZ.

My suggest is:

1. In Looks preferences we must select only looks folder and main looks.

2. Change looks by command in tray - Looks/swap/submenu (list of all availables looks in selected folder).

foo_looks 2.0 (RC1)

Reply #495
Quote
Quote
To show playing time instead of remaining time, just click the time indicator - It toggles between the two

it shows the -2:30 as the default, i would like to change it so it shows 0:30 as the default

I will add a preset in the next version so the default mode can be changed easier.

foo_looks 2.0 (RC1)

Reply #496
Quote
thx for the code
playlist_format_title_ex crash its fixed in foo looks 2.0 not in 1.2

ok

my only advice is to use foo_looks 1.05 for the old skins until somebody chooses to update them

1.05 didn't have any of the LUA present in 1.2 - and none of the old skins use LUA

so i guess no crashes either

foo_looks 2.0 (RC1)

Reply #497
when are we gonna get to see screenshots of all these lovely skins in development




EDIT:
if there is anything that is holding you back then let me know

i am happy to provide some graphics for anyone who isn't confident with graphics software

..or happy to provide large chunks of ski/lua code


btw, check your email bogsnarth

foo_looks 2.0 (RC1)

Reply #498
hey tk, thanks for the work you've done on my look
there are still some bugs i need to talk with you about.. i'll write you an email and give you all the gory details

thanks to your work, the skin is now getting close to a point where i can pass it along to others..

here's a screenshot



jealous of my leet music collection? 

notes:
  • the play/pause button is blue because the mouse is hovering over it.. (i guess the mouse pointer disappears when making screenshots) normally it's black like the << and >> buttons..
  • the volume knob has 15 positions (that ought to be enough for anyone's needs, and i'm simply not going through the process of making more positions ) and the little blue led on it changes brightness accordingly..[span style='font-size:8pt;line-height:100%'] (small bug here.. the skin seems to start with the volume knob w/o the led.. turning it up from this point puts the led in the first position, turning it down does nothing.. is this just a matter of foo looks not remembering settings?)[/span]
  • the vis and time are toggle-able
  • the arrow between the "hide look" and "exit fb2k" buttons is for a compact/winshade mode that i will design after this version is fully functional
,
bogs

edit: changed pic to link to spare bandwidth

foo_looks 2.0 (RC1)

Reply #499
Quote
If it interests you danZ, perhaps you might want to look into ignoring all drawing when a look is 'un-activated'; it doesn't seem efficient to use CPU cycles when a look is un-activated.

Good point, I'll change it to ignore the vis data when the look is not active (hidden).

As far as I know though Windows should not be attempting to draw a hidden window and I don't need to ignore any drawing because their shouldn't be any drawing occuring.