It is currently March 28th, 2024, 9:54 am

Image inside VisBubble

Get help with creating, editing & fixing problems with skins
Post Reply
vizualz
Posts: 1
Joined: December 30th, 2016, 1:19 am

Image inside VisBubble

Post by vizualz »

Hi there!
I've just recently decided to start using Rainmeter to give my desktop a fresh and clean look. I've stumbled upon undefinists' VisBubble, and as much as I am loving it, I'd really like to have the ability to put a picture inside it, so that it stays fixed in the middle of the visualizer no matter if I'll move or resize it. So far I've managed to place it inside manually using trial & error method.
Image

I am completely blue when it comes to any type of coding and such, and reading other threads hasn't helped me that much.
I would be grateful if someone could write the code and explain what does what and why so I can learn, although it'd be enough if someone could just write the code.

Thanks in advance!

VisBubble code:

Code: Select all

[Metadata]
Name=VisBubble
Author=undefinist
Version=3.1
License=CC BY-NC-SA 3.0
Information=The default | Double-click for settings.

[Rainmeter]
Update=25
ContextTitle=SETTINGS (double-click)
ContextAction=[!ActivateConfig "#ROOTCONFIG#\SettingsWindow"]
ContextTitle2=SETTINGS FILE
ContextAction2=["#ROOTCONFIGPATH#Settings.inc"]

[Variables]
@Include=Settings.inc
FORMULA_SUM=([mBand%%]+(#Smoothing#=0?0:(%%={#NumOfItems#-1}?0:[mBand{(%%+1)%#NumOfItems#}])+(%%=0?0:[mBand{%%=0?#NumOfItems#-1:%%-1}])))
FORMULA_SUM_FULL=([mBand%%]+(#Smoothing#=0?0:[mBand{(%%+1)%#NumOfItems#}]+[mBand{%%=0?#NumOfItems#-1:%%-1}]))
FORMULA_AVG_NUM=((%%={#NumOfItems#-1}||%%=0)?2:3)
FORMULA_AVG_NUM_FULL=3
FORMULA_AVG=#FORMULA_SUM_FULL#/#FORMULA_AVG_NUM_FULL#
FORMULA_THETA=(#AngleTotal#-#AngleTotal#/#NumOfItems#*(#ClockWise#=0?%%:#NumOfItems#-%%-1)+#AngleStart#)
@Include2=#INC#Common.inc

[mFullCircle]
Measure=Calc
IfCondition=#AngleTotal# >= PI * 2
IfTrueAction=[!WriteKeyValue Variables FORMULA_AVG "#*FORMULA_SUM_FULL*#/#*FORMULA_AVG_NUM_FULL*#"]
IfFalseAction=[!WriteKeyValue Variables FORMULA_AVG "#*FORMULA_SUM*#/#*FORMULA_AVG_NUM*#"]
UpdateDivider=-1

;=
; base measures
;============================

[mAudioOut]
Bands=(#NumOfItems#+4)

;=
; meterstyles
;============================

[styleLine]
LineColor=#ItemColor#
LineWidth=(#ItemWidth#/2)
RotationAngle=(#Inward#*PI)
ControlAngle=0
AntiAlias=1
DynamicVariables=1

;=
; meters + scripts + includes
;============================

[sFactoryBandMeasures]
Measure=Script
ScriptFile=#SCRIPT#Factory.lua
IncFile=#INC#BandMeasures.inc
Number=#NumOfItems#
SectionName=mBand%%
Option0=Measure
Value0=Plugin
Option1=Plugin
Value1=AudioLevel
Option2=Parent
Value2=mAudioOut
Option3=Type
Value3=Band
Option4=BandIdx
Value4={%%+1}
UpdateDivider=-1
@Include=#INC#BandMeasures.inc

[sFactoryBars]
Measure=Script
ScriptFile=#SCRIPT#Factory.lua
IncFile=#INC#Lines.inc
Number=#NumOfItems#
SectionName=%%
Option0=Meter
Value0=Roundline
Option1=MeterStyle
Value1=styleLine
Option2=StartAngle
Value2={#FORMULA_THETA#}
Option3=X
Value3={#Radius#*Cos(#FORMULA_THETA#%(PI*2))+#Radius#+#ExtrudeMax#}
Option4=Y
Value4={#RadiusY#*Sin(#FORMULA_THETA#%(PI*2))+#RadiusY#+#ExtrudeMax#}
Option5=LineLength
Value5=((#FORMULA_AVG#=0)?{#ExtrudeMin#=0?-1:#ExtrudeMin#}:((#FORMULA_AVG#-[mBand%%])*{#Smoothing#}+[mBand%%])*{#ExtrudeMax#-#ExtrudeMin#}+#ExtrudeMin#)
Option6=DynamicVariables
Value6=1
UpdateDivider=-1
@Include=#INC#Lines.inc

; Helper script to always refresh skin twice instead of once
; This is so that it loads the updated .inc files
[sRefresher]
Measure=Script
ScriptFile=#SCRIPT#Refresher.lua
UpdateDivider=-1
Refreshed=0

[sColor]
Measure=Script
ScriptFile=#SCRIPT#Color.lua
UpdateDivider=-1
NumOfItems=#NumOfItems#
Color=#ItemColor#
;C4FB7200:0|C4FB72cc:30|85ECF099:60|85ECF099:80|85ECF000
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Image inside VisBubble

Post by balala »

This code, as you've posted it, is not enough. It's not complete, don't has meters at all, but it uses many included files (like Settings.inc, Common.inc, BandMeasures.inc or Lines.inc) and two lua scripts (Factory.lua, Refresher.lua and Color.lua). Probably many of the needed variables are defined in the included files, but we don't have them, without those files.
So, best would be to pack the whole config and upload it.
Post Reply