cmm: big font for morelessbox, captioned button, minor fix for mouse_cfg

git-svn-id: svn://kolibrios.org@6198 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2016-02-12 19:54:29 +00:00
parent d7af065a2b
commit 5ecdf8246d
3 changed files with 11 additions and 10 deletions

View File

@ -1,4 +1,4 @@
#ifndef INCLUDE_GUI_H #ifndef INCLUDE_GUI_H
#define INCLUDE_GUI_H #define INCLUDE_GUI_H
#print "[include <gui.h>]\n" #print "[include <gui.h>]\n"
@ -43,11 +43,11 @@
:void DrawCaptButton(dword x,y,w,h,id,color_b, color_t,text) :void DrawCaptButton(dword x,y,w,h,id,color_b, color_t,text)
{ {
word tx = -strlen(text)*6+w/2+x+1; word tx = -strlen(text)*9+w/2+x+1;
word ty = h/2-3+y; word ty = h/2-7+y;
if (id>0) DefineButton(x,y,w,h,id,color_b); if (id>0) DefineButton(x,y,w,h,id,color_b);
WriteText(tx+1,ty+1,0x80,MixColors(color_b,0,200),text); WriteText(tx+1,ty+1,0x90,MixColors(color_b,0,230),text);
WriteText(tx,ty,0x80,color_t,text); WriteText(tx,ty,0x90,color_t,text);
} }
:void WriteTextCenter(dword x,y,w,color_t,text) :void WriteTextCenter(dword x,y,w,color_t,text)
@ -128,13 +128,14 @@ unsigned char checkbox_flag[507] = {
:void MoreLessBox(dword x,y, bt_id_more, bt_id_less, value, text) :void MoreLessBox(dword x,y, bt_id_more, bt_id_less, value, text)
{ {
#define VALUE_FIELD_W 26 #define VALUE_FIELD_W 34
#define SIZE 18 #define SIZE 18
dword value_text = itoa(value);
DrawRectangle(x, y, VALUE_FIELD_W, SIZE, system.color.work_graph); DrawRectangle(x, y, VALUE_FIELD_W, SIZE, system.color.work_graph);
DrawRectangle3D(x+1, y+1, VALUE_FIELD_W-2, SIZE-2, 0xDDDddd, 0xffffff); DrawRectangle3D(x+1, y+1, VALUE_FIELD_W-2, SIZE-2, 0xDDDddd, 0xffffff);
DrawBar(x+2, y+2, VALUE_FIELD_W-3, SIZE-3, 0xffffff); DrawBar(x+2, y+2, VALUE_FIELD_W-3, SIZE-3, 0xffffff);
WriteText(x+6, SIZE / 2 + y -3, 0x80, 0x000000, itoa(value)); WriteText( -strlen(value_text)+3*8 + x+6, SIZE / 2 + y -6, 0x90, 0x000000, value_text);
DrawCaptButton(VALUE_FIELD_W + x, y, SIZE, SIZE, bt_id_more, system.color.work_button, system.color.work_button_text, "+"); DrawCaptButton(VALUE_FIELD_W + x, y, SIZE, SIZE, bt_id_more, system.color.work_button, system.color.work_button_text, "+");
DrawCaptButton(VALUE_FIELD_W + x + SIZE, y, SIZE, SIZE, bt_id_less, system.color.work_button, system.color.work_button_text, "-"); DrawCaptButton(VALUE_FIELD_W + x + SIZE, y, SIZE, SIZE, bt_id_less, system.color.work_button, system.color.work_button_text, "-");

View File

@ -5,10 +5,10 @@
:struct COLORS { :struct COLORS {
dword dword
nonset1, nonset1,
nonset2, taskbar_color,
work_dark, work_dark,
work_light, work_light,
nonset3, window_title,
work, work,
work_button, work_button,
work_button_text, work_button_text,

View File

@ -162,7 +162,7 @@ void DrawMouseImage() {
} }
void DrawControls() { void DrawControls() {
DrawBar(pos_x, mouse_frame.start_y + 142, Form.cwidth - pos_x, 120, system.color.work); DrawBar(pos_x, mouse_frame.start_y + 142, Form.cwidth - pos_x, 285-142, system.color.work);
MoreLessBox(pos_x, mouse_frame.start_y + 142, 120, 121, mouse_cfg.pointer_speed, POINTER_SPEED); MoreLessBox(pos_x, mouse_frame.start_y + 142, 120, 121, mouse_cfg.pointer_speed, POINTER_SPEED);
MoreLessBox(pos_x, mouse_frame.start_y + 172, 122, 123, mouse_cfg.acceleration, ACCELERATION_TEXT); MoreLessBox(pos_x, mouse_frame.start_y + 172, 122, 123, mouse_cfg.acceleration, ACCELERATION_TEXT);
MoreLessBox(pos_x, mouse_frame.start_y + 202, 124, 125, mouse_cfg.double_click_delay, DOUBLE_CLICK_TEXT); MoreLessBox(pos_x, mouse_frame.start_y + 202, 124, 125, mouse_cfg.double_click_delay, DOUBLE_CLICK_TEXT);