mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-20 01:11:18 +00:00
add Pic and CenterPic views
This commit is contained in:
parent
e472364f51
commit
e3a393dd52
4 changed files with 53 additions and 2 deletions
|
@ -27,7 +27,7 @@ EXTRA_LIBRARIES= $(gui_libs)
|
|||
$(QFCC) $(QCFLAGS) $(QCPPFLAGS) -c -o $@ $<
|
||||
|
||||
libgui_a_SOURCES= \
|
||||
Group.r InputLine.r Point.r Rect.r Size.r Slider.r Text.r View.r
|
||||
Group.r InputLine.r Pic.r Point.r Rect.r Size.r Slider.r Text.r View.r
|
||||
libgui_a_AR= $(PAK) -cf
|
||||
|
||||
CLEANFILES= *.qfo *.o
|
||||
|
|
33
ruamoko/gui/Pic.r
Normal file
33
ruamoko/gui/Pic.r
Normal file
|
@ -0,0 +1,33 @@
|
|||
#include "draw.h"
|
||||
#include "string.h"
|
||||
#include "gui/Pic.h"
|
||||
|
||||
@implementation Pic
|
||||
-(id)init
|
||||
{
|
||||
pic_name = str_new ();
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)dealloc
|
||||
{
|
||||
str_free (pic_name);
|
||||
}
|
||||
|
||||
-(void)setPic:(string)pic
|
||||
{
|
||||
str_copy (pic_name, pic);
|
||||
}
|
||||
|
||||
-(void)draw
|
||||
{
|
||||
Draw_Pic (xabs, yabs, Draw_CachePic (pic_name, 1));
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation CenterPic
|
||||
-(void)draw
|
||||
{
|
||||
Draw_CenterPic (xabs, yabs, Draw_CachePic (pic_name, 1));
|
||||
}
|
||||
@end
|
|
@ -10,5 +10,5 @@ nobase_include_HEADERS= \
|
|||
cbuf.h cmd.h cvar.h file.h gib.h hash.h plist.h \
|
||||
Object.h AutoreleasePool.h Array.h Entity.h List.h ListNode.h Stack.h \
|
||||
\
|
||||
gui/Group.h gui/InputLine.h gui/Point.h gui/Rect.h gui/Size.h \
|
||||
gui/Group.h gui/InputLine.h gui/Pic.h gui/Point.h gui/Rect.h gui/Size.h \
|
||||
gui/Slider.h gui/Text.h gui/View.h
|
||||
|
|
18
ruamoko/include/gui/Pic.h
Normal file
18
ruamoko/include/gui/Pic.h
Normal file
|
@ -0,0 +1,18 @@
|
|||
#ifndef __ruamoko_gui_Pic_h
|
||||
#define __ruamoko_gui_Pic_h
|
||||
|
||||
#include "gui/View.h"
|
||||
|
||||
@interface Pic : View
|
||||
{
|
||||
string pic_name;
|
||||
}
|
||||
-(void)setPic:(string)pic;
|
||||
-(void)draw;
|
||||
@end
|
||||
|
||||
@interface CenterPic : Pic
|
||||
-(void)draw;
|
||||
@end
|
||||
|
||||
#endif//__ruamoko_gui_Pic_h
|
Loading…
Reference in a new issue