mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-16 14:14:07 +00:00
things
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@36 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
26
src/button.c
26
src/button.c
@@ -1,32 +1,32 @@
|
||||
/* $Id$ */
|
||||
#include <Milsko/Milsko.h>
|
||||
#include <Mw/Mw.h>
|
||||
|
||||
static void create(MilskoWidget handle) {
|
||||
MilskoSetDefault(handle);
|
||||
static void create(MwWidget handle) {
|
||||
MwSetDefault(handle);
|
||||
}
|
||||
|
||||
static void draw(MilskoWidget handle) {
|
||||
MilskoRect r;
|
||||
static void draw(MwWidget handle) {
|
||||
MwRect r;
|
||||
|
||||
r.x = 0;
|
||||
r.y = 0;
|
||||
r.width = MilskoGetInteger(handle, MilskoNwidth);
|
||||
r.height = MilskoGetInteger(handle, MilskoNheight);
|
||||
r.width = MwGetInteger(handle, MwNwidth);
|
||||
r.height = MwGetInteger(handle, MwNheight);
|
||||
|
||||
MilskoDrawFrame(handle, &r, MilskoParseColor(handle, MilskoGetText(handle, MilskoNbackground)), handle->pressed);
|
||||
MwDrawFrame(handle, &r, MwParseColor(handle, MwGetText(handle, MwNbackground)), handle->pressed);
|
||||
|
||||
MilskoDrawRect(handle, &r, MilskoParseColor(handle, MilskoGetText(handle, MilskoNbackground)));
|
||||
MwDrawRect(handle, &r, MwParseColor(handle, MwGetText(handle, MwNbackground)));
|
||||
}
|
||||
|
||||
static void click(MilskoWidget handle) {
|
||||
MilskoDispatchUserHandler(handle, MilskoNactivateHandler, NULL);
|
||||
static void click(MwWidget handle) {
|
||||
MwDispatchUserHandler(handle, MwNactivateHandler, NULL);
|
||||
}
|
||||
|
||||
MilskoClassRec MilskoButtonClassRec = {
|
||||
MwClassRec MwButtonClassRec = {
|
||||
NULL, /* opaque */
|
||||
create, /* create */
|
||||
NULL, /* destroy */
|
||||
draw, /* draw */
|
||||
click /* click */
|
||||
};
|
||||
MilskoClass MilskoButtonClass = &MilskoButtonClassRec;
|
||||
MwClass MwButtonClass = &MwButtonClassRec;
|
||||
|
||||
Reference in New Issue
Block a user