Who's Online
21 user(s) are online (
6 user(s) are browsing
Forums )
Members: 0
Guests: 21
more...
Headlines
arabic_console_devicepro2.lha - driver/input
Jun 14, 2025
igame.lha - utility/misc
Jun 14, 2025
mencoder.lha - video/edit
Jun 14, 2025
amiarcadia.lha - emulation/gamesystem
Jun 13, 2025
smb2fs.lha - network/samba
Jun 13, 2025
acuario.lha - graphics/screenblanker
Jun 10, 2025
sdl2.lha - library/misc
Jun 10, 2025
sdl3.lha - library/misc
Jun 10, 2025
retroarch_cores_installer.lha - emulation/gamesystem
Jun 9, 2025
deepl.lha - utility/text
Jun 7, 2025
Topic options
View mode
Newest First
listbrowser & fuelgauge?
Posted on:
2012/8/17 18:29
#1
Home away from home
Joined: 2006/11/30 18:43Last Login
: 5/1 20:20
From Norway
Group:
Registered Users
Is it possible to use a fuelgauge inside a listbrowser using reaction?
X5000
Re: listbrowser & fuelgauge?
Posted on:
2012/8/17 19:49
#2
Just popping in
Joined: 2007/7/30 21:55Last Login
: 6/3 20:56
From Sweden
Group:
Registered Users
I *think* a listbrowser can only contain either text or boopsi objects based on the image class (as set by LBN_Text and LBN_Image, respectively). I guess fuelgauge doesn't extend image? If you find a solution I'd be all ears, though.
Re: listbrowser & fuelgauge?
Posted on:
2012/8/17 20:07
#3
Just can't stay away
Joined: 2007/2/23 13:49Last Login
: 1/28 0:19
From Finland, the land of Santa, sauna, sisu and salmiakki
Group:
Registered Users
Use a rendering hook and draw the gauge "yourself".
uint32 RenderMyGaugeFunc ( register struct Hook * hook , register struct Node * node , register struct LBDrawMsg * msg )
{
if ( msg -> lbdm_MethodID != LV_DRAW ) return( LBCB_UNKNOWN );
IGraphics -> SetAPen ( msg -> lbdm_RastPort , 3 );
IGraphics -> RectFill ( msg -> lbdm_RastPort , msg -> lbdm_Bounds . MinX , msg -> lbdm_Bounds . MinY , msg -> lbdm_Bounds . MaxX , msg -> lbdm_Bounds . MaxY );
return( LVCB_OK );
}
IExec -> AddTail ( MyLBContent , IListBrowser -> AllocListBrowserNode ( 1 ,
LBNA_Column , 0 ,
LBNCA_RenderHook , MyGaugeHook , TAG_DONE );
struct Hook * MyGaugeHook = IExec -> AllocSysObjectTags ( ASOT_HOOK , ASOHOOK_Entry , RenderMyGaugeFunc , TAG_DONE );
Rock lobster bit me - so I'm here forever X1000 + AmigaOS 4.1 FE "Anyone can build a fast CPU. The trick is to build a fast system." - Seymour Cray
Re: listbrowser & fuelgauge?
Posted on:
2012/8/17 20:38
#4
Amigans Defender
Joined: 2006/11/17 22:40Last Login
: Yesterday 22:28
From England
Group:
Registered Users Moderators
Quote:
jaokim wrote: I *think* a listbrowser can only contain either text or boopsi objects based on the image class (as set by LBN_Text and LBN_Image, respectively). I guess fuelgauge doesn't extend image?the built-in gaugeiclass is an imageclass object.
Re: listbrowser & fuelgauge?
Posted on:
2012/8/18 13:10
#5
Just can't stay away
Joined: 2007/2/23 13:49Last Login
: 1/28 0:19
From Finland, the land of Santa, sauna, sisu and salmiakki
Group:
Registered Users
@Chris I couldn't find gauge.h from the SDK/images.
Rock lobster bit me - so I'm here forever X1000 + AmigaOS 4.1 FE "Anyone can build a fast CPU. The trick is to build a fast system." - Seymour Cray
Re: listbrowser & fuelgauge?
Posted on:
2012/8/18 14:22
#6
Amigans Defender
Joined: 2006/11/17 22:40Last Login
: Yesterday 22:28
From England
Group:
Registered Users Moderators
@TSK
Correct. It's a built-in class. Ad-libbing a bit here, but something like this should work:
struct Image * gauge = ( struct Image *) NewObject ( NULL , "gaugeiclass" , IA_Label , "Gauge label" , GAUGEIA_Level , 50 , TAG_DONE );
blah , blah , blah , whatever your creation function is , with LBN_Image , gauge ,
The available tags are documented in the gaugeiclass Autodoc.
Re: listbrowser & fuelgauge?
Posted on:
2012/8/18 19:03
#7
Just can't stay away
Joined: 2007/2/23 13:49Last Login
: 1/28 0:19
From Finland, the land of Santa, sauna, sisu and salmiakki
Group:
Registered Users
@Chris Thanks ! I was trying to use NewObject(NULL, "gauge.image", ... With "gaugeiclass" it works. I was wondering what "being built-in class" means. Do you know how table.image works ?
Rock lobster bit me - so I'm here forever X1000 + AmigaOS 4.1 FE "Anyone can build a fast CPU. The trick is to build a fast system." - Seymour Cray
Re: listbrowser & fuelgauge?
Posted on:
2012/8/18 20:10
#8
Amigans Defender
Joined: 2009/5/1 17:57Last Login
: Yesterday 15:32
From Czech Republic
Group:
Registered Users Staff members Moderators
@TSK
Quote:
I was trying to use NewObject(NULL, "gauge.image" It couldn't have worked because the public class ID is "gaugeiclass", not "gauge.image".
Quote:
I was wondering what "being built-in class" means It means that the class is part of the Intuition module and does not reside in SYS:Classes/ just like most other BOOPSI classes.
The
Rear Window blog
AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
Re: listbrowser & fuelgauge?
Posted on:
2012/8/18 21:12
#9
Amigans Defender
Joined: 2006/11/17 22:40Last Login
: Yesterday 22:28
From England
Group:
Registered Users Moderators
Quote:
TSK wrote: Do you know how table.image works ?No, because we haven't had an SDK update since it was released, so there's no documentation.
Currently Active Users Viewing This Thread:
1
(
0 members
and 1 Anonymous Users
)