From 3b51130cb366eed36d70ea5bd6c296f0b27f8757 Mon Sep 17 00:00:00 2001 From: Kenny Shields Date: Mon, 14 Jul 2014 01:59:09 -0400 Subject: [PATCH] Various changes to radiobutton drawing --- skins/Blue/images/circle-fill.png | Bin 220 -> 0 bytes skins/Blue/skin.lua | 29 +++++++++++++--------------- skins/Orange/images/circle-fill.png | Bin 218 -> 0 bytes skins/Orange/skin.lua | 7 +++++++ 4 files changed, 20 insertions(+), 16 deletions(-) delete mode 100644 skins/Blue/images/circle-fill.png delete mode 100644 skins/Orange/images/circle-fill.png diff --git a/skins/Blue/images/circle-fill.png b/skins/Blue/images/circle-fill.png deleted file mode 100644 index 36bb700f4b664c3cd3625064258dae55e4289a9b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 220 zcmeAS@N?(olHy`uVBq!ia0vp^JRr=$1|-8uW1a&kwj^(N7l!{JxM1({$v_d#0*}aI z1_o|n5N2eUHAey{SmWv97@~20>ZFal4F)_c=i^!!Gn8+rOm>(rr*=}!Wed*%l?xUf zOpQA~{cXLU|IjU}pRvOs`x4s|k(70EhRMt+3m(s8IwF!1E`0CI4ISo=wT2IqLvG*n zz7p-gzxI>x*2|SQw=654l+AzocqF42*QM(`7f(H0yJPiB`}KuP76wX}*Icfx2fBm7 M)78&qol`;+0Jh6dw*UYD diff --git a/skins/Blue/skin.lua b/skins/Blue/skin.lua index 04354c2..17253f4 100644 --- a/skins/Blue/skin.lua +++ b/skins/Blue/skin.lua @@ -104,9 +104,10 @@ skin.controls.checkbox_check_color = {128, 204, 255, 255} skin.controls.checkbox_text_font = smallfont -- radiobutton -skin.controls.radiobutton_body_color = {255, 255, 255, 255} -skin.controls.radiobutton_check_color = {128, 204, 255, 255} -skin.controls.radiobutton_text_font = smallfont +skin.controls.radiobutton_body_color = {255, 255, 255, 255} +skin.controls.radiobutton_check_color = {128, 204, 255, 255} +skin.controls.radiobutton_inner_border_color = {77, 184, 255, 255} +skin.controls.radiobutton_text_font = smallfont -- collapsiblecategory skin.controls.collapsiblecategory_text_color = {255, 255, 255, 255} @@ -1335,27 +1336,23 @@ function skin.DrawRadioButton(object) local hover = object:GetHover() local bodycolor = skin.controls.radiobutton_body_color local checkcolor = skin.controls.radiobutton_check_color + local inner_border = skin.controls.radiobutton_inner_border_color - --~ love.graphics.setColor(bodycolor) love.graphics.setColor(bordercolor) - --~ love.graphics.rectangle("fill", x, y, width, height) - love.graphics.circle("line", x + 10, y + 9, 10, 15) - - --~ love.graphics.setColor(bordercolor) - --~ skin.OutlinedRectangle(x, y, width, height) + love.graphics.setLineStyle("smooth") + love.graphics.setLineWidth(1) + love.graphics.circle("line", x + 10, y + 10, 8, 15) if checked then - local image = skin.images["circle-fill.png"] - love.graphics.setColor(255, 255, 255, 255) - -- FIXME: This does not blend as intended. - -- There are gray pixels on a white background. - love.graphics.setBlendMode("alpha") - love.graphics.draw(image, x + 4, y + 4) + love.graphics.setColor(checkcolor) + love.graphics.circle("fill", x + 10, y + 10, 5, 360) + love.graphics.setColor(inner_border) + love.graphics.circle("line", x + 10, y + 10, 5, 360) end if hover then love.graphics.setColor(bordercolor) - skin.OutlinedRectangle(x + 4, y + 4, width - 8, height - 8) + love.graphics.circle("line", x + 10, y + 10, 5, 360) end end diff --git a/skins/Orange/images/circle-fill.png b/skins/Orange/images/circle-fill.png deleted file mode 100644 index 271c62bdee52c63b67fda73ce0363b15a29660d0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 218 zcmeAS@N?(olHy`uVBq!ia0vp^JRr=$1|-8uW1a&kwj^(N7l!`~GZ`2TKKVqtvqV2M~3Lr4Ro&K1tPf(=3u zL2>MHob`L|OgQbjVuzWU0>fTU_6aJR#QJA!WEL{`;K$bF;%B-r^;jCGLryQN{N`Kd z;+n!3ZNHrIzvB1&>4i!6Jhg1!$fvWO5R&w6OL%%g>s{ur^VxTF@5?E0EIxh==n4i; LS3j3^P6