mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-08 02:13:29 +00:00
merge git PR #3
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@468 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -22,8 +22,7 @@ static void draw(MwWidget handle) {
|
||||
r.width = MwGetInteger(handle, MwNwidth);
|
||||
r.height = MwGetInteger(handle, MwNheight);
|
||||
|
||||
MwDrawFrame(handle, &r, base, handle->pressed);
|
||||
MwDrawRect(handle, &r, base);
|
||||
MwDrawWidgetBack(handle, &r, base, handle->pressed, MwTRUE);
|
||||
|
||||
if(px != NULL) {
|
||||
int ow = r.width;
|
||||
|
||||
@@ -18,8 +18,7 @@ static void draw(MwWidget handle) {
|
||||
r.width = MwGetInteger(handle, MwNwidth);
|
||||
r.height = MwGetInteger(handle, MwNheight);
|
||||
|
||||
MwDrawFrame(handle, &r, base, (handle->pressed || MwGetInteger(handle, MwNchecked)) ? 1 : 0);
|
||||
MwDrawRect(handle, &r, base);
|
||||
MwDrawWidgetBack(handle, &r, base, (handle->pressed || MwGetInteger(handle, MwNchecked)) ? 1 : 0, MwTRUE);
|
||||
if(handle->pressed || MwGetInteger(handle, MwNchecked)) {
|
||||
/* TODO: write check mark */
|
||||
}
|
||||
|
||||
@@ -32,8 +32,7 @@ static void draw(MwWidget handle) {
|
||||
r.width = MwGetInteger(handle, MwNwidth) - t->right;
|
||||
r.height = MwGetInteger(handle, MwNheight);
|
||||
|
||||
MwDrawFrame(handle, &r, base, (handle->pressed || MwGetInteger(handle, MwNchecked)) ? 1 : 0);
|
||||
MwDrawRect(handle, &r, base);
|
||||
MwDrawWidgetBack(handle, &r, base, (handle->pressed || MwGetInteger(handle, MwNchecked)) ? 1 : 0, MwTRUE);
|
||||
if(str != NULL) {
|
||||
int w = MwTextWidth(handle, "M");
|
||||
int h = MwTextHeight(handle, "M");
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include <Mw/Milsko.h>
|
||||
|
||||
#include "../../external/stb_ds.h"
|
||||
#include "Mw/TypeDefs.h"
|
||||
|
||||
static void set_xywh(MwWidget handle) {
|
||||
int height = 0;
|
||||
@@ -101,14 +102,13 @@ static void draw(MwWidget handle) {
|
||||
MwLLColor text = MwParseColor(handle, MwGetText(handle, MwNforeground));
|
||||
MENU_LOOP_DECL;
|
||||
|
||||
MwDrawFrame(handle, &r, base, 0);
|
||||
MwDrawRect(handle, &r, base);
|
||||
MwDrawWidgetBack(handle, &r, base, 0, MwTRUE);
|
||||
|
||||
BEGIN_MENU_LOOP;
|
||||
if(m->sub[i]->wsub != NULL) {
|
||||
MwDrawFrame(handle, &r, base, 0);
|
||||
MwDrawWidgetBack(handle, &r, base, 0, MwFALSE);
|
||||
} else if(in_area && handle->pressed) {
|
||||
MwDrawFrame(handle, &r, base, 0);
|
||||
MwDrawWidgetBack(handle, &r, base, 0, MwFALSE);
|
||||
}
|
||||
|
||||
MwDrawText(handle, &p, m->sub[i]->name + incr, 1, MwALIGNMENT_BEGINNING, text);
|
||||
|
||||
@@ -34,8 +34,7 @@ static void draw(MwWidget handle) {
|
||||
r.y = 0;
|
||||
r.width = e->right;
|
||||
r.height = h / 2;
|
||||
MwDrawFrame(handle, &r, base, pr);
|
||||
MwDrawRect(handle, &r, base);
|
||||
MwDrawWidgetBack(handle, &r, base, pr, MwTRUE);
|
||||
|
||||
if(r.width > r.height) {
|
||||
r.width = r.height;
|
||||
@@ -51,8 +50,7 @@ static void draw(MwWidget handle) {
|
||||
r.y = h / 2;
|
||||
r.width = e->right;
|
||||
r.height = h / 2;
|
||||
MwDrawFrame(handle, &r, base, pr);
|
||||
MwDrawRect(handle, &r, base);
|
||||
MwDrawWidgetBack(handle, &r, base, pr, MwTRUE);
|
||||
|
||||
if(r.width > r.height) {
|
||||
r.width = r.height;
|
||||
|
||||
@@ -78,8 +78,7 @@ static void draw(MwWidget handle) {
|
||||
ux = r.height;
|
||||
dx = r.width - r.height;
|
||||
|
||||
MwDrawFrame(handle, &r, dark, 1);
|
||||
MwDrawRect(handle, &r, dark);
|
||||
MwDrawWidgetBack(handle, &r, dark, 1, MwTRUE);
|
||||
|
||||
rt = r;
|
||||
|
||||
@@ -124,15 +123,14 @@ static void draw(MwWidget handle) {
|
||||
}
|
||||
}
|
||||
|
||||
MwDrawFrame(handle, &rbar, base, 0);
|
||||
MwDrawRect(handle, &rbar, base);
|
||||
MwDrawWidgetBack(handle, &rbar, base, 0, MwTRUE);
|
||||
|
||||
MwLLFreeColor(dark);
|
||||
MwLLFreeColor(base);
|
||||
}
|
||||
|
||||
static void mouse_move(MwWidget handle) {
|
||||
int or = MwGetInteger(handle, MwNorientation);
|
||||
int or = MwGetInteger(handle, MwNorientation);
|
||||
scrollbar_t* scr = handle->internal;
|
||||
|
||||
if(!handle->pressed) return;
|
||||
@@ -160,9 +158,9 @@ static void mouse_move(MwWidget handle) {
|
||||
}
|
||||
|
||||
static void mouse_down(MwWidget handle, void* ptr) {
|
||||
int ww = MwGetInteger(handle, MwNwidth);
|
||||
int wh = MwGetInteger(handle, MwNheight);
|
||||
int or = MwGetInteger(handle, MwNorientation);
|
||||
int ww = MwGetInteger(handle, MwNwidth);
|
||||
int wh = MwGetInteger(handle, MwNheight);
|
||||
int or = MwGetInteger(handle, MwNorientation);
|
||||
scrollbar_t* scr = handle->internal;
|
||||
MwLLMouse* m = ptr;
|
||||
|
||||
|
||||
@@ -37,8 +37,7 @@ static void draw(MwWidget handle) {
|
||||
r.width = MwGetInteger(handle, MwNwidth);
|
||||
r.height = MwGetInteger(handle, MwNheight);
|
||||
|
||||
MwDrawFrame(handle, &r, base, 0);
|
||||
MwDrawRect(handle, &r, base);
|
||||
MwDrawWidgetBack(handle, &r, base, 0, MwTRUE);
|
||||
|
||||
if(menu != NULL) {
|
||||
MwPoint p;
|
||||
@@ -56,7 +55,7 @@ static void draw(MwWidget handle) {
|
||||
r.y = p.y - 3;
|
||||
r.width = tw + 15 + 5 * 2;
|
||||
r.height = th + 3 * 2;
|
||||
MwDrawFrame(handle, &r, base, 0);
|
||||
MwDrawWidgetBack(handle, &r, base, 0, MwTRUE);
|
||||
}
|
||||
|
||||
p.x = 5 + tw / 2;
|
||||
|
||||
Reference in New Issue
Block a user