working on scrollbar, wip
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@163 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
parent
c2246783f8
commit
4452531d90
18 changed files with 140 additions and 36 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/* $Id$ */
|
||||
#include <Mw/Milsko.h>
|
||||
#include <Mw/OpenGL.h>
|
||||
#include <Mw/Widget/OpenGL.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
/* nothing */
|
||||
|
|
|
|||
38
src/widget/scrollbar.c
Normal file
38
src/widget/scrollbar.c
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/* $Id $*/
|
||||
#include <Mw/Milsko.h>
|
||||
|
||||
static int create(MwWidget handle) {
|
||||
MwSetDefault(handle);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void draw(MwWidget handle) {
|
||||
MwRect r, rt;
|
||||
MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground));
|
||||
MwLLColor dark = MwLightenColor(handle, base, -64, -64, -64);
|
||||
|
||||
r.x = 0;
|
||||
r.y = 0;
|
||||
r.width = MwGetInteger(handle, MwNwidth);
|
||||
r.height = MwGetInteger(handle, MwNheight);
|
||||
|
||||
MwDrawFrame(handle, &r, dark, 1);
|
||||
MwDrawRect(handle, &r, dark);
|
||||
|
||||
rt = r;
|
||||
rt.height = rt.width;
|
||||
MwDrawTriangle(handle, &r, base, 0, MwNORTH);
|
||||
|
||||
MwLLFreeColor(dark);
|
||||
MwLLFreeColor(base);
|
||||
}
|
||||
|
||||
MwClassRec MwScrollBarClassRec = {
|
||||
create, /* create */
|
||||
NULL, /* destroy */
|
||||
draw, /* draw */
|
||||
NULL, /* click */
|
||||
NULL /* parent_resize */
|
||||
};
|
||||
MwClass MwScrollBarClass = &MwScrollBarClassRec;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
/* $Id$ */
|
||||
#include <Mw/Milsko.h>
|
||||
#include <Mw/Vulkan.h>
|
||||
#include <Mw/Widget/Vulkan.h>
|
||||
|
||||
#include "../error_internal.h"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue